Tab function vs tab character

Get help with using AutoHotkey and its commands and hotkeys
Slammish
Posts: 2
Joined: 17 Nov 2020, 17:55

Tab function vs tab character

17 Nov 2020, 18:03

Aloha,

TL;DR I need tab to go to next field, even when inside of a text box, where the key only produces an indent and is stuck inside the text box.


I'm hoping this is a quick solution. I found plenty of topics addressing the opposite of this, but have an app I interact with that would sure be easier to use if I could tab to the "OK" button underneath the text box.
Tab works up until I reach that, since it allows text formatting options.
Once I'm there, all tab does is create an indent. I need it to go to the next field.
I never use indent at my job, anywhere, ever, so if the only solution that comes up involves disabling that? I'm game.

Is there something like {Nextfield} or {Nextbutton} that I can use after sendinput?
User avatar
boiler
Posts: 6631
Joined: 21 Dec 2014, 02:44

Re: Tab function vs tab character

17 Nov 2020, 18:27

How about having the script perform a mouse click in the next field to move the keyboard focus to it? Better yet, see if the app has individual controls so that you can use ControlFocus to move to that field. The first step is seeing if the various fields have unique control names by using the Window Spy tool that comes with AHK.
User avatar
mikeyww
Posts: 3967
Joined: 09 Sep 2014, 18:38

Re: Tab function vs tab character

17 Nov 2020, 20:00

I agree.

In case that fails, in some cases, although pressing TAB inserts a tab character, pressing SHIFT+TAB navigates to the previous control. It might be possible to send that sequence multiple times, to navigate the controls in a reverse sequence, until you get to the right one.

Another strategy can be sending a keyboard shortcut to jump to a different control, and then sending TAB to get to the right control from there.
Slammish
Posts: 2
Joined: 17 Nov 2020, 17:55

Re: Tab function vs tab character

18 Nov 2020, 08:51

Thanks guys, I'll try to set some time aside to learn the control function. I was just kinda hoping there was something I could throw in some brackets that specifically meant next field and decided to ask here first. AHK did a great job of accounting for every other key with multiple uses, I was thinking "There's gotta be..." lol

Again, thanks all.
User avatar
mikeyww
Posts: 3967
Joined: 09 Sep 2014, 18:38

Re: Tab function vs tab character

18 Nov 2020, 10:01

If you don't care about inserting tab characters, it might be possible to set up a Tab hotkey that does something different when you press that key. You could then also set ^Tab to send the tab character.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], isuckatahk, jly and 43 guests