Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Autohotkey - how to press next menu command?

Engaged ,
Oct 08, 2024 Oct 08, 2024

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.

TOPICS
How-to , Scripting , Tools
428
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 10, 2024 Oct 10, 2024

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
Adobe
Community Expert ,
Oct 10, 2024 Oct 10, 2024

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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 10, 2024 Oct 10, 2024

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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 11, 2024 Oct 11, 2024

@sttk3 it seems that 

frf{Down}{Enter}

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 11, 2024 Oct 11, 2024

It is written in AutoHotkey 2.0 syntax, so it should be run in 2.0.

 

And the fact that you chose CarlosCanto's method as the correct answer probably means that you have successfully rewritten it to AutoHotkey 1 syntax to make it work. Kindly leave a record of your results here. It will help us all.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 11, 2024 Oct 11, 2024
LATEST

in my case accesing second script in the whole list was done by !fr{Down}{Enter} that's why it's strange that your option works, even despite the difference in syntax, the basic commands are the same

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines