0
votes

I am trying to write a script to select something from a drop down on a webpage and then tab to the next option and input text, then enter. FYI, this is my first script.

I have to create groupings and select from different areas. I have seen places where people have scripts to select certain things but says that can only work in IE browser. I will be using either firefox or chrome but not IE.

^q::Click, 284, 427 ;
Send {Up 10}
Send {Tab} ;
sleep 50 ;
Send BWI{Enter}

return

So what I want it to do is when I press control q, it will go to position 284,427 and click. The dropdown defaults to the bottom option. So I put in code to go up 10 which would select the 10th option from the bottom. Then I want it to tab. That will select the 10th option and go to the next text box at which point it will enter the text BWI and then enter. The BWI is a filter that will show all of the items that have BWI in their name.

Currently, it goes to the dropdown and clicks. Then it does nothing else.

1

1 Answers

2
votes

To have more than one command executed by a hotkey, put the first line beneath the hotkey definition and make the last line a return:

^q::
    Click, 284, 427
    Send {Up 10}
    Send {Tab}
    sleep 50
    Send BWI{Enter}
    ; ...
return

https://autohotkey.com/docs/Hotkeys.htm#Intro