keystroke to the 'ok' button Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
AmDeG 11
Posts: 385
Joined: 28 Nov 2013, 11:42

keystroke to the 'ok' button

22 Jan 2021, 07:10

at a dialog how can I create a shortcut to the "OK" button instead of doing this?

Code: Select all

+Enter:: Click 3800,2050
User avatar
boiler
Posts: 6869
Joined: 21 Dec 2014, 02:44

Re: keystroke to the 'ok' button

22 Jan 2021, 07:33

Precede that with #IfWinActive followed by the title designation for the dialog box window.
AmDeG 11
Posts: 385
Joined: 28 Nov 2013, 11:42

Re: keystroke to the 'ok' button

22 Jan 2021, 10:04

indeed, I know that

my question is if there is another way to fulfill my goal without using the Click command
User avatar
boiler
Posts: 6869
Joined: 21 Dec 2014, 02:44

Re: keystroke to the 'ok' button  Topic is solved

22 Jan 2021, 11:45

It depends on the details of the dialog box.

Are there currently any other keyboard shortcuts associated with dismissing the dialog box that could be mapped to your desired shortcut?

Is there a control associated with the OK button revealed by the Window Spy tool? If so, you may be able to use ControlClick. You may also be able to use ControlClick to click on its location, which would have some benefits over the conventional Click approach.

You might be able to interface via browser controls such as COM with Internet Explorer or similar approaches with other browsers.

Is there a specific drawback to using Click that you are looking to avoid?
AmDeG 11
Posts: 385
Joined: 28 Nov 2013, 11:42

Re: keystroke to the 'ok' button

22 Jan 2021, 12:46

I solved it, thanks!

Return to “Ask For Help”

Who is online

Users browsing this forum: boiler, Google [Bot], nacken012, newbieforever, Richfilth, roysubs, scriptors, T1ran1403, w64bit, wastercaliari and 89 guests