how select a radio button

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
cimerio
Posts: 44
Joined: 29 Apr 2019, 15:37

how select a radio button

Post by cimerio » 29 Apr 2019, 15:43

Hello.
how can I select the option below using ahk? (Deposito em continuacao)
window.png
window.png (240.01 KiB) Viewed 2010 times

User avatar
JoeWinograd
Posts: 2189
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: how select a radio button

Post by JoeWinograd » 29 Apr 2019, 16:34

It depends on that particular form, as it is possible to build forms that behave however you want, but in most cases, the arrow keys (Left, Right, Up, Down) will do it. With just two radio buttons, I suspect any of these will work:

Code: Select all

Send {Left}
Send {Right}
Send {Up}
Send {Down}
After expermenting and finding one of those that works (likely, they all will), do this to press the Confirmar button:

Code: Select all

Send {Enter}
Regards, Joe

AviationGuy
Posts: 188
Joined: 17 Jan 2019, 10:13

Re: how select a radio button

Post by AviationGuy » 30 Apr 2019, 02:20

Or you could, of course, use PixelSearch or ImageSearch.

cimerio
Posts: 44
Joined: 29 Apr 2019, 15:37

Re: how select a radio button

Post by cimerio » 02 May 2019, 13:28

I will try the PixelSearch.

Joe, its not possible use the arrow keys. in that windows, the focus doesn't passes by radio. only by buttons (X, Confirmar)

User avatar
JoeWinograd
Posts: 2189
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: how select a radio button

Post by JoeWinograd » 02 May 2019, 14:07

Wow! Hard to believe that you can't get focus to the radio buttons. Make sure that the dialog Window is active via a WinActivate command before you send the arrow key. Forgetting AutoHotkey for a moment, what happens when you click the title bar and then the arrow keys — does the radio button selection change?

Vaklev
Posts: 47
Joined: 04 Mar 2019, 13:58
Contact:

Re: how select a radio button

Post by Vaklev » 02 May 2019, 15:15

I think image search would be the best approach for this one, make sure you select your top left corner coordinates of the image within the actual radio button so that when you use mouse move to the variables at which it finds the image it clicks just those, but image search aside, given that the box is always in the same coordinate you can just use the same x,y coordinates for the mouse move button relative to the window by default and that should do it!
Les medecins choisissent viagrasansordonnancefr.com sans danger pour la sante

cimerio7
Posts: 12
Joined: 30 May 2019, 12:06

Re: how select a radio button

Post by cimerio7 » 30 May 2019, 12:34

joe, I believe that the problem is on site (poorly built)
it only focus if I use the mouse

https www.dropbox.com /s/5zuod4afacf39un/focus.wmv?dl=0 Broken Link for safety


that video show how happens

cimerio7
Posts: 12
Joined: 30 May 2019, 12:06

Re: how select a radio button

Post by cimerio7 » 30 May 2019, 12:58

Vaklev, how can I use the Imagesearch to focus?

the line below doesn't works

Code: Select all

Click, 366, 359

Edit: I put the CoordMode, but it seems the script select always window with SciTE4, not with the browser (I use two monitors)

Post Reply

Return to “Ask for Help (v1)”