Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. Local $filename
  2. If $CmdLine[0] = 1 Then
  3.       $filename = $CmdLine[1]
  4.    else
  5.       MsgBox(0, "ERROR", "File not found")
  6.       Exit
  7.    EndIf
  8.    
  9. ; Wait for 5 seconds.
  10.   Sleep(5000)
  11.  
  12.  
  13. ; Wait 10 seconds for the Upload window to appear
  14.   Local $hWnd=WinWait("[CLASS:#32770]","",10)
  15.  
  16. ; Set input focus to the edit control of Upload window using the handle returned by WinWait
  17.   ControlFocus($hWnd,"","Edit1")
  18.  
  19. ; Wait for 2 seconds.
  20.   Sleep(2000)
  21.  
  22. ; Set the File name text on the Edit field
  23. ControlSetText($hWnd, "", "Edit1", $filename)
  24.  
  25.   Sleep(2000)
  26. ; Click on the Open button
  27.   ControlClick($hWnd, "","Button1");