MattyJ2009 Posted May 13, 2014 Posted May 13, 2014 I have a script that reads numbers from a file and puts it in a textbox and does a search. If the script doesn't find a match I would like to be able to have a next button so it will go to the next line of the file. I would also like a retry button just in case the script would mess up and need to go back and retry the search again. I have the my current code below. I'm just not sure where to even start with getting this to work. expandcollapse popup#include <Array.au3> #include <File.au3> #include <IE.au3> msgbox(0,"Get Ready...","After you press OK here this script is going to start working. Make sure you have everything open and ready.") WinWaitActive("xxxxxxxx - Internet Explorer", "") Send("^f") Send("!c") Global $Paused HotKeySet("{ESC}", "TogglePause") $counter = 0 Local $aInput $file = "C:\test.txt" _FileReadToArray($file, $aInput) For $i = 1 to UBound($aInput) -1 $counter = FileReadLine($file, $i) Sleep(500) Send("!c") Sleep(1000) ControlSend("xxxxxxxx - Internet Explorer", "", "[CLASS:Internet Explorer_Server]", "{TAB 4}") Send($counter) Sleep(500) Send("!q") Do ControlSetText("xxxxxxx - Internet Explorer", "", "[CLASS:Edit; INSTANCE:2]", "Result can't be found") ; searches for Result can't be found Sleep(500) Until WinActive("", "1 match") ;After match is found we can go to the next line Next While 1 Sleep(100) WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc
Unc3nZureD Posted May 13, 2014 Posted May 13, 2014 Try to make a GUI with Koda Form Designer. It will give you an easy way to develop a GUI for your application. I think having a look at that will help.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now