I am developing a Batch Script which i will not go into too much detail and within the batch script i am calling on a couple of AHK scripts.
I am a little stuck and i was wondering whether anyone had experienced a similar thing, the bit i am stuck on does:
1.Searches a text file for a ID and sets it as a variable
2.Inputs the variable into a web addy and opens chrome with the full addy
3.Delays for 6 seconds
4.Runs a AHK script (converted to .exe)
5.Delays for 6 seconds
6.Loops back round to the start (1. above) and looks at the next ID in the text file. This carries on doing this until there are no IDs left in the text file to search
The section of this i am stuck on is the AHK part. The AHK script basically imitates tabs and returns and then selects a field from a drop down box on the webpage, this information is governed at the start of my batch script where you manually enter the field you need AHK to select, its a simply copy paste jobby. This is not good for me to be honest and i need to change it so AHK can look at a separate text file and work on a loop alongside the loop within my batch script.
The big question is (sorry for the rambling!), can you have a loop working in a batch script that will call on a AHK file that also has a loop within. At the moment i have struggled to get the two to work alongside each other, AHK either just looks at the first entry in the text file or trys to do the loop through the whole text file every time it is called (in some cases it may be 80 times!).
Does anyone have any ideas? By all means fire questions at me.
My code for the AHK script is (this was the start where it pasted the variable within the batch script):
ifwinexist, ahk_class Chrome_WidgetWin_0
{
winactivate,
sleep, 750
send ^fPatient ID
sleep, 750
Send {Escape}
sleep, 750
send {tab}{tab}{tab}{tab}
send %clipboard%
sleep, 750
send {tab}{tab}{tab}{tab}{tab}{tab}{tab}{tab}{tab}{tab}{tab}{tab}{tab}{tab}
send {enter} ;Commit Edits
sleep, 750
send {Shift Down}
send {tab}
send {Shift Up}
sleep, 750
send {enter} ;Confirm
return
}
else MsgBox,0, Google Chrome Is Not Open!
returnModerator's Note: Topic locked, please refer to your previous thread for support. ~ sinkfaze




This topic is locked