EchaniDrgn Posted January 8, 2009 Posted January 8, 2009 As the title suggests I'm trying to use the arrow keys to switch between buttons in an AutoIt GUI. Is there an easy way to do this other than trapping the buttons and calculating which button to focus on? I have 5 columns of dynamically generated buttons that disappear when clicked, I would like to be able to traverse this "grid" of buttons using the arrow keys as tab will just take me to the next button in creation order. I'd post source, but the code is rather long, and pretty ugly. BUTTONA1 BUTTONB1 BUTTONC1 BUTTOND1 BUTTONE1 BUTTONA2 BUTTONB2 BUTTONC2 BUTTOND2 BUTTONE2 BUTTONA3 BUTTONB3 BUTTONC3 BUTTOND3 BUTTONE3 BUTTONA4 BUTTONB4 BUTTONC4 BUTTOND4 BUTTONE4 BUTTONA5 BUTTONB5 BUTTONC5 BUTTOND5 BUTTONE5 BUTTONA6 BUTTONB6 BUTTONC6 BUTTOND6 BUTTONE6 If anyone has any simple ideas I'm all ears, just trying to make it so I don't have to use my mouse. Clicking BUTTONA1 yields BUTTONA2 BUTTONB1 BUTTONC1 BUTTOND1 BUTTONE1 BUTTONA3 BUTTONB2 BUTTONC2 BUTTOND2 BUTTONE2 BUTTONA4 BUTTONB3 BUTTONC3 BUTTOND3 BUTTONE3 BUTTONA5 BUTTONB4 BUTTONC4 BUTTOND4 BUTTONE4 BUTTONA6 BUTTONB5 BUTTONC5 BUTTOND5 BUTTONE5 BUTTONB6 BUTTONC6 BUTTOND6 BUTTONE6
FireFox Posted January 8, 2009 Posted January 8, 2009 (edited) @EchaniDrgn Send("{TAB}") ;or ControlClick() Cheers, FireFox. Edited January 8, 2009 by FireFox
EchaniDrgn Posted January 8, 2009 Author Posted January 8, 2009 @EchaniDrgn Send("{TAB}") ;or ControlClick() Cheers, FireFox. I guess I was confusing in my description of the problem. I created the GUI in question, I'm not trying to get my script to traverse some other GUI. I would like for the down arrow to go to the next button down (default behavior), the up button to go to the next button up (default behavior), but for the left and right arrow keys to switch columns. The buttons are generated by column and where if I were to trap the left and right arrow keys and send a ton of tabs and sift-tabs to the gui I was hoping for something a little more elegant, as in an option of such.
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