Hello All-
I am new to AutoIT, this is my first script. It is supposed to open a program, get a menu option, then open a file on the network. I was able to get it to run however now that the exe is out on the network, when my boss opens it the first time it runs successfully until it reaches the part where it’s supposed to browse out & grab the file. Then it returns an error that the file is not present & it leaves off the first several letters of the file name (should be “PdxBatch09122012.pbt” – see screenshot, it leaves off the beginning & calls it “09122012.pbt"). The weird thing is, when he re-runs the script it finishes successfully. Can anyone help me out with the cause of this weird behavior? As long as he runs the script twice it performs as it should. Here is my code for the tool:
And I'm attaching a screenshot of the error message:
ScriptError.bmp 576.05K
6 downloads
Thank you in advance for any guidance you give!
I am new to AutoIT, this is my first script. It is supposed to open a program, get a menu option, then open a file on the network. I was able to get it to run however now that the exe is out on the network, when my boss opens it the first time it runs successfully until it reaches the part where it’s supposed to browse out & grab the file. Then it returns an error that the file is not present & it leaves off the first several letters of the file name (should be “PdxBatch09122012.pbt” – see screenshot, it leaves off the beginning & calls it “09122012.pbt"). The weird thing is, when he re-runs the script it finishes successfully. Can anyone help me out with the cause of this weird behavior? As long as he runs the script twice it performs as it should. Here is my code for the tool:
[ autoit ]
; This tool will open Change Analysis, & run the shapefile ; maintenance batch file located on the L drive. Run("C:\Program Files (x86)\Pictometry\ChangeAnalysis2.7\ChangeAnalysis.exe") WinWaitActive("ChangeAnalysis -") ;Get the window by using keystrokes Send("!a") Send("{UP}") Send("{Enter}") WinWaitActive("Shapefile/DBF Maintenance") ControlClick("Shapefile/DBF Maintenance", "Browse...", "[ID:2333]") WinActivate("Open", "2") ;Get the file off the L drive Send("L:\PdxBatch09122012.pbt") WinActivate("Open", "10") Send("{Enter}") WinWaitActive("Shapefile/DBF Maintenance") ControlClick("Shapefile/DBF Maintenance", "Run", "[ID:2334]") WinWaitActive("Shapefile/DBF Maintenance", "List1", "30")
And I'm attaching a screenshot of the error message:
![Attached File](http://aut1.autoit-cdn.com/forum/public/style_extra/mime_types/gif.gif)
Thank you in advance for any guidance you give!