Skip to main content
Inspiring
Oct 8, 2024 9:00 AM UTC
Answered

Autohotkey - how to press next menu command?

This script executes first entry from a Scripts with name starting with "f". 

 

 

	RWin::Send, !frf

 

 

How to press second entry (script) which name starts with f?

Example, Scriprs menu commans (scripts): 

...
exportDocs
fitAndCenter
fitSelection
fitAndScale
...

 
Currently that script executes firAndCenter, but I need fitSelection.

This topic is closed to new replies. Start a new post to keep the conversation going.
CarlosCanto
CarlosCantoCorrect answer
Community Expert
Oct 10, 2024 3:49 PM UTC

it might not be possible. As an alternative, after pressing Alt+F, R, press the down arrow as many times as needed to highlight your menu item, then press Enter

5 replies

CarlosCanto
Community Expert
CarlosCantoCommunity ExpertCorrect answer
Community Expert
Oct 10, 2024 3:49 PM UTC

it might not be possible. As an alternative, after pressing Alt+F, R, press the down arrow as many times as needed to highlight your menu item, then press Enter

Translate
Legend
Oct 11, 2024 4:30 AM UTC

CarlosCanto's way of doing things made it possible. However, it could not be executed with the Windows key alone in my environment, so the following code is triggered with the Windows key + A.

; Syntax of AutoHotkey 2.0
#HotIf WinActive("ahk_exe Illustrator.exe")

#A::{
  send("{Alt}frf{Down}{Enter}")
  return
}
Translate
Inspiring
Oct 11, 2024 10:24 AM UTC

@sttk3 it seems that 

frf{Down}{Enter}

still executes the first script on f, at least for the first version of AutoHotkey

Translate