Yinan Posted January 6, 2009 Share Posted January 6, 2009 (edited) guys, I m new to AutoIt. Now I have a problem when I try to use AutoIt to click a menu item from a right-click context menu in XP. The AutoIt Window Info can't detect any information in that menu, so that I can't use AutoIt to click it. I m looking for something besides using Send key for this. Any idea? Thanks! Edited January 6, 2009 by Yinan Link to comment Share on other sites More sharing options...
FireFox Posted January 6, 2009 Share Posted January 6, 2009 @Yinan MouseClick("left",x,y,1) Send("{ENTER}") Cheers, FireFox. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 6, 2009 Moderators Share Posted January 6, 2009 WinMenuSelect() doesn't work? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
charvi Posted January 6, 2009 Share Posted January 6, 2009 (edited) WinMenuSelect() doesn't work?@SmOke_N I have a menu too, created this format: Local $m_Gam = GUICtrlCreateMenu("&Games") Local $m_GamSol = GUICtrlCreateMenuItem("Solitaire", $m_Gam) Local $m_GamSpi = GUICtrlCreateMenuItem("Spider Solitaire", $m_Gam) and I am running the programs in the While 1 ... WEnd loop: While 1 $ai_Msg = GUIGetMsg(1) Select Case $ai_Msg[0] = $m_GamSol And $ai_Msg[1] = $h_WinMain If @OSVersion = "WIN_VISTA" Then Run("C:\Program Files\Microsoft Games\Solitaire\Solitaire.exe") If @OSVersion = "WIN_XP" Then Run("C:\Windows\System32\sol.exe") Case $ai_Msg[0] = $m_GamSpi And $ai_Msg[1] = $h_WinMain If @OSVersion = "WIN_VISTA" Then Run("C:\Program Files\Microsoft Games\SpiderSolitaire\SpiderSolitaire.exe") If @OSVersion = "WIN_XP" Then Run("C:\Windows\System32\spider.exe") ;EndCase EndSelect WEnd but I don't understand the WinMenuSelect(). The example in the helpfile is too short for analyse. How should I use it in the above example? Thanks in advance Cheers, Charvi Edited January 6, 2009 by charvi Link to comment Share on other sites More sharing options...
Yinan Posted January 6, 2009 Author Share Posted January 6, 2009 WinMenuSelect() doesn't work?Looks like WinMenuSelect will only work for the menu item from the menu bar of a window.What I face is the context menu from IE7's add favorate, as you can see from the snapshot of the first post of mine. 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