I'm writing a small script with autohotkey.
- Opens App 2. Type in Login & Pass 3. Login 4. Do some Clicking.
I had some trouble of sending text to the application, only way it worked was "send {A}" which is like clicking a keyboard button.
I would like to create a loop around this steps and change Login each time. Standard procedure would be to have a text file a read from it but i don't know how i could do this with my send. Worst case would be to type a function for every login.
So is there a smart way to dynamically change the type on each loop interval? For example in the idea, i don't know how i can build the loop which changes the function each time, so on loop 1 = fn_login , login 2 = fn_login1 ...
Loop
{
FN_OpenApp()
FN_Login()
}
ExitApp
===================================
FN_OpenApp()
{
Click, 100, 100
}
FN_Login()
{
Click, 100, 100
Send {U}
Send {S}
Send {E}
Send {R}
Click, 111, 111
Send {P}
Send {A}
Send {S}
Send {S}
}
;idea__________________________________________
Loop
{
FN_OpenApp()
FN_LoginLoop()
}
ExitApp
FN_OpenApp()
{
Click, 100, 100
}
FN_Login01()
{
Click, 100, 100
Send {U}
Send {S}
Send {E}
Send {R}
Click, 111, 111
Send {P}
Send {A}
Send {S}
Send {S}
}
FN_Login02()
{
Click, 100, 100
Send {U}
Send {S}
Send {E}
Send {R}
Click, 111, 111
Send {P}
Send {A}
Send {S}
Send {S}
}
FN_LoginLoop()
{
login := Object (FN_Login01(), FN_Login02())
for ....
}
Send {USER}
instead. I suggest you take a look at arrays and strings in the official autohotkey documentation. – 2501