Jump to content
Macro Express Forums

Directly Selecting A Menu Item


Recommended Posts

In AutoIt (a scripting program similar to ME) there is a command that directly selects an item in a window menu. Below is an example of the command.




The above script line would instantly select "New" in the File menu of the program Woodwop. It would do so even if Woodwop was minimised or was not the current window, and would not visibly open the menu to do this, like an alt shortcut would.


I find this command extremely useful because in some programs it is more reliable than using ctrl or alt keyboard shortcuts, and using it you can control a program while it is minimised.


I've so far not been able to find a way to do this using ME alone, and am making one-line AutoIT scripts for ME to launch when needed. Is it possible to do what I've described using ME alone?

Link to comment
Share on other sites

Here is an example if anyone is interested. It launches Notepad in minimized state, then opens its Page Setup, Save As, and Font dialogues simultaneously. You need AutoIT installed for it to work. If indeed this is impossible to do with the current ME alone, I think it would be great if it could be considered for future versions.


<REM2:Put linefeed into T95><ASCIIC:95:1:13><ASCIIC:96:1:10><TVAR2:95:01:%T95%%T96%><REM2:><REM2:><REM2:Create AutoIT script><TVAR2:01:01:AutoItSetOption("WinTitleMatchMode",2)%T95%WinMenuSelectItem("Untitled - Notepad","","F&ormat","&Font")%T95%WinWait("Font")%T95%WinMenuSelectItem("Untitled - Notepad","","&File","Page Set&up")%T95%WinWait("Page Setup")%T95%WinMenuSelectItem("Untitled - Notepad","","&File","Save &As")><TMVAR2:17:01:00:000:000:C:\Example.au3F><REM2:><REM2:><REM2:Launch Notepad in minimized state><LAUNCHDEL2:0:00C:\WINDOWS\NOTEPAD.EXE1><WAITWIN2:000010:000000:Untitled - Notepad><REM2:><REM2:><REM2:Launch AutoIT script to select various menu items of the minimized notepad><LAUNCHDEL2:0:00C:\Example.au3><REM2:><REM2:><REM2:Delete AutoIT script><DOFILE:08:NN:C:\Example.au3>>

Link to comment
Share on other sites

Really? Usually they are very good at responding. However I'll share some insight with you about Insight... If you use the form on their webpage it goes directly into a tracking system and these never go wrong or get lost. I've entered feature requests and bug reports some as long as a year ago that I had forgotten about that I will suddenly get an automated email from them stating that it has been implemented in the next version! I think email doesn't get the same regimented treatment and is susceptible to getting caught in spam filters and such so it’s much less reliable.


The guys at Insight are very cool and very responsive and would never ignore your message on purpose. Just try them again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...