mr-es335 Posted November 6, 2023 Share Posted November 6, 2023 Good day, Is there any way to find the menu ID number? Via the example in HelpFile, i was able to insert the example menu in one application, but not another? Contacting the developer, this is what i was told, "Perhaps the menu id numbers are clashing in SAW...try using different values starting at 30,000." Thanks! mr-es335 Sentinel Music Studios Link to comment Share on other sites More sharing options...
Andreik Posted November 6, 2023 Share Posted November 6, 2023 People will just guess what are your talking about if you don't post some code. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
mr-es335 Posted November 6, 2023 Author Share Posted November 6, 2023 (edited) Good day, OKAY! The first snippet is derived fr the HelpFile "_GUICtrlMenu_GetMenu" - the other two are from SAC and SAW - with just the sections that matter: expandcollapse popup; Example #1: From the HelpFile example ; Open Notepad Run("notepad.exe") WinWaitActive("[CLASS:Notepad]") $hWnd = WinGetHandle("[CLASS:Notepad]") $hMain = _GUICtrlMenu_GetMenu($hWnd) ; Insert new menu into Notepad _GUICtrlMenu_InsertMenuItem($hMain, 6, "&AutoIt", 0, $hItem2) _GUICtrlMenu_DrawMenuBar($hWnd) ; -------------------------------------------------------------- ; Example #2 ; In one application, I discovered that the [6] needed to updated to [7]... ; and that worked great!: ; Open SAC Run("C:\RML\SAC\SAC64.exe") WinWaitActive("[CLASS:SAC_MAIN]") $hWnd = WinGetHandle("[CLASS:SAC_MAIN]") $hMain = _GUICtrlMenu_GetMenu($hWnd) ; Insert new menu into SAC _GUICtrlMenu_InsertMenuItem($hMain, 7, "&AutoIt", 0, $hItem2) _GUICtrlMenu_DrawMenuBar($hWnd) ; -------------------------------------------------------------- ; Example #3 ; However, in the other application, I discovered that the [6] needed to ; updated to [13]...and that did NOT work out so great!: ; Open SAW Run("C:\RML\SAW\SAWStudio64.exe") WinWaitActive("[CLASS:SAWSTUDIO_MAIN]") $hWnd = WinGetHandle("[CLASS:SAWSTUDIO_MAIN]") $hMain = _GUICtrlMenu_GetMenu($hWnd) ; Insert new menu into SAW _GUICtrlMenu_InsertMenuItem($hMain, 13, "&AutoIt", 0, $hItem2) _GUICtrlMenu_DrawMenuBar($hWnd) ; -------------------------------------------------------------- See the following: As noted, I was told to try ""Perhaps the menu id numbers are clashing in SAW...try using different values starting at 30,000." - which I DID, but to no avail. I tried various numbers, again with no results. "HELP!" PS: I should mention that I did come across this [Link] ...but not too sure what this is doing...the result are in the attached... Menu-Information.txt Edited November 8, 2023 by mr-es335 mr-es335 Sentinel Music Studios Link to comment Share on other sites More sharing options...
junkew Posted November 6, 2023 Share Posted November 6, 2023 Whats the class of the menubar in all applications? Whats your endgoal? When you are able to extend a menu its not automagically possible to run code in context of that application. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
mr-es335 Posted November 6, 2023 Author Share Posted November 6, 2023 junkew, I have two applications by the same developer...one works, the other does not [...please note...I am a neophyte here...] You stated, "Whats the class of the menubar in all applications?" My response: I am not sure how to find that information? You stated, "Whats your endgoal?" My response: I use a number of "external scripts" that would be much more efficient if i could access such scripts "integrally". I do hope that this makes sense? mr-es335 Sentinel Music Studios Link to comment Share on other sites More sharing options...
junkew Posted November 6, 2023 Share Posted November 6, 2023 Use au3inf or see faq 31 and 40 for other tools to spy on classnames. Regarding your endgoal it really depends on what your script needs to do. Some sendkeys will be easy. Did you try in notepad to really have the menuitem do something usefull? FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
mr-es335 Posted November 7, 2023 Author Share Posted November 7, 2023 Good day, Are there utilities that can determine the menu ID number? mr-es335 Sentinel Music Studios Link to comment Share on other sites More sharing options...
mr-es335 Posted November 8, 2023 Author Share Posted November 8, 2023 Good day, I am really at loss on just how to proceed from here.. Is the anyone that could provide some assistance? Such would be greatly appreciated! Thank you. mr-es335 Sentinel Music Studios Link to comment Share on other sites More sharing options...
Andreik Posted November 8, 2023 Share Posted November 8, 2023 On 11/7/2023 at 9:44 PM, mr-es335 said: Are there utilities that can determine the menu ID number? Use AutoIt Window Info tool and see what kind of controls you are dealing with. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
mr-es335 Posted November 8, 2023 Author Share Posted November 8, 2023 (edited) Andriek, This tool I have employed with "other" projects, but in this case, the tool apparently shows me nothing at all...[...or maybe I have no idea what it IS showing me!] Edited November 8, 2023 by mr-es335 mr-es335 Sentinel Music Studios Link to comment Share on other sites More sharing options...
mr-es335 Posted November 14, 2023 Author Share Posted November 14, 2023 Good day, I have been attempting to discover the menu ID for a specific application - all with any success. • See post above [Link] Can anyone please provide me with any assistance. Such assistance would be greatly appreciated! PS: I am a "rank:" neophyte here!!! mr-es335 Sentinel Music Studios Link to comment Share on other sites More sharing options...
junkew Posted November 14, 2023 Share Posted November 14, 2023 What did you try from faq 31? FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
mr-es335 Posted November 14, 2023 Author Share Posted November 14, 2023 junkew, Following is what I have deployed.... au3inf simplespy uia spy jabsimplespy control viewer ranorex spy mr-es335 Sentinel Music Studios Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now