Download Auto IT installer and install it on your windows machine.
Write the following code to your Auto IT Script Editor.:
Code:
opt("MustDeclareVars", 1);0=no, 1=require pre-declare
Main()
Func Main()
Local Const $dialogTitle = $CmdLine[2]
Local Const $timeout = 5
Local $windowFound = WinWait($dialogTitle, "", $timeout)
$windowFound = WinWait($dialogTitle, "", $timeout)
Local $windowHandle
If $windowFound Then
$windowHandle = WinGetHandle("[LAST]")
WinActivate($windowHandle)
ControlSetText($windowHandle, "", "[CLASS:Edit; INSTANCE:1]", $CmdLine[1])
ControlClick($windowHandle, "", "[CLASS:Button; TEXT:&Open]")
Else
MsgBox(0, "", "Could not find window.")
Exit(1)
EndIf
EndFunc
And then Go to Tools and Compile which generates exe file that can be used in any language binding.
To upload multiple files in windows environment use the following example syntax :
C:\Users\User1Name\Documents>FileUploadScript.exe Open
C:\Users\ddefilippo\Pict
ures\"{space}""'Image1"""{space}"""Image1- Copy"""
No comments:
Post a Comment