Jump to content
Sign in to follow this  
dreivilo47

[Solved] WinMenuSelectItem doesn't work with my Dutch Notepad

Recommended Posts

I have a Dutch version of Windows 10.
The Dutch word for "File" = "Bestand" and for "Page Setup" = "Pagina-instelling".
WinMenuSelectItem doesn't select this items.  What can be the reason?

 

Run("notepad.exe")
WinWaitActive("[CLASS:Notepad]")
WinMenuSelectItem("[CLASS:Notepad]", "", "Bestand", "Pagina-instelling...")
Sleep(4000)
WinClose("[CLASS:Notepad]")

 

Edited by dreivilo47

Share this post


Link to post
Share on other sites

@dreivilo47 look again at the example script in the help file. Notice the & symbol in front of the menu item...


"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Jahar
      Hi All,
      Please help me on how to fetch date/time of last windows 10 system restore point using autoit? Basically its about querying the last restore point.
    • By Langmeister
      Hi, I'm sure that this is a simple question regarding webdriver udf but my search on the forum did not result in the exact same scenario that I need. I will adapt it to my corporate needs but at first I want it to work with an example everybody can reproduce if needed.
      I navigate to https://www.daysoftheyear.com/ and want to find out what special day today is. Using the following Code returns the wanted text that today is 'shark awareness day' in the console but it is not pasted in notepad as it is not copied as it probably should be.
      #include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities, $sSession, $sID _WD_Option("Driver", "C:\Program Files (x86)\AutoIt3\chromedriver.exe") _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true }}}}' _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Navigate($sSession, "https://www.daysoftheyear.com/?timezone_offset=nan") _WD_LoadWait($sSession) Sleep(3000) Local $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "/html/body/div[2]/header/div/div[1]/div/div[2]/h3/a") _WD_ElementAction($sSession, $sElement, 'text') ClipGet() Run("notepad.exe") Sleep(500) Send("^v") Scite returns this, therefore the text has been found but the last mile to paste it to notepad or excel does not work for me.
      __WD_Get: URL=HTTP://127.0.0.1:9515/session/b72166b774d7fefb258b3721fc1d4306/element/657e6b5d-31a9-46a8-85c4-acb7f72bf659/text __WD_Get: StatusCode=200; $iResult = 0; $sResponseText={"value":"Shark Awareness Day"}... _WD_ElementAction: {"value":"Shark Awareness Day"}... Thanks in advance! 
       
    • By kingjacob90
      Hi
      So I am trying to click the green button, this button is not always in the same place. So fare I am trying to click it by finding the color but there is also something else with the same color on the screen (circled in yellow) that is causing issues. Is there a way to use the Title and Class of the window (can't be just the window as there are more than one with the same name).
      How does AutoIt Info get this information?

    • By Skysnake
      Hi guys
      AutoIt content - Microsoft thinks any AutoIt content is unwanted.
      What it does is simply delete any EXEs. No option of do you want to continue...
      The March 2020 updated has substantially changed the Defender Virus Protection logic and layout.
      I found three pages relevant to the help, and lots of outdated content. Is there a quick and easy way to set folder exclusions? Any help is appreciated and simply using google is not good enough, as this is a new problem, caused by the update.
      Any ideas please?
      ____________________________
      ANSWER
      Found it.
      Accessing the menu through the Control Panel does not work
      Click the Defender shield in the icon tray.
      Scroll down to Virus & threat protection settings click Manage Settings Scroll down to Exclusions click Add or remove exclusions then click the + for Add an exclusion, and select File / Folder / File type / Process 
      Select Folder and browse to select. 😥
       
      Skysnake
    • By jantograaf
      Hi all,
      I'm trying to automate the install of a specific networking device. All goes well, I can install the driver on both Windows 7 & 10, rescan for hardware, set the IP-settings and all, but there's one issue. In Windows 10, I can disable all connection protocols using Powershell, but Windows 7 does not offer this Powershell-Cmdlet. So I programmed a way (two years ago) to let AutoIt open the network-adapter properties and then deselect all checkboxes except for the TCP/IP-V4. I recovered this snippet somewhere in my old files and tried to reintegrate this into my latest script, but it doesn't seem to work. On Windows 10 I get a blank screen for a few seconds and that's it, on Windows 7 it makes explorer crash. 
      I think it's quite safe to test this on your own system as long as you're not using IPv6 to connect to the internet and as long as you return to check all the boxes again (so you don't break your connectivity).
      If  anyone has any idea, I'd be glad to hear from you!
      Thanks in advance and stay safe in these Corona-ridden times 🙂
      Kind regards,
      Jan
       

      There are three functions involved:
      DisableAllProtocols($AdapterName)
      This one is the main function that 'should' uncheck all the checkboxes in the adapter's Properties-window.
      Func DisableAllProtocols($AdapterName) OpenNetConnToAdapter($AdapterName) ;Find the IDs of all relevant controls Local $Handle_Window_Properties = WinWaitActive($Adaptername & " Properties","") Local $Handle_Listview_Protocols = ControlGetHandle($Adaptername & " Properties","","[CLASSNN:SysListView321]") Local $Handle_OK_Button = ControlGetHandle($Adaptername & " Properties","","[CLASSNN:Button6]") Local $List_CMN_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","Client for Microsoft Networks") Local $List_FPSMN_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","File and Printer Sharing for Microsoft Networks") Local $List_QOS_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","QoS Packet Scheduler") Local $List_MNAMP_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","Microsoft Network Adapter Multiplexor Protocol") Local $List_MLLDPPD_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","Microsoft LLDP Protocol Driver") Local $List_IPV6_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","Internet Protocol Version 6 (TCP/IPv6)") Local $List_LLTDR_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","Link-Layer Topology Discovery Responder") Local $List_LLTDMIOD_ID = ControlListView($Adaptername & " Properties","","[CLASSNN:SysListView321]","FindItem","Link-Layer Topology Discovery Mapper I/O Driver") ; Disable All Protocols Except IPV4 SetCheckboxState($Handle_Listview_Protocols,$List_CMN_ID,3) SetCheckboxState($Handle_Listview_Protocols,$List_FPSMN_ID,3) SetCheckboxState($Handle_Listview_Protocols,$List_QOS_ID,3) SetCheckboxState($Handle_Listview_Protocols,$List_MNAMP_ID,3) SetCheckBoxState($Handle_Listview_Protocols,$List_MLLDPPD_ID,3) SetCheckboxState($Handle_Listview_Protocols,$List_IPV6_ID,3) SetCheckboxState($Handle_Listview_Protocols,$List_LLTDR_ID,3) SetCheckboxState($Handle_Listview_Protocols,$List_LLTDMIOD_ID,3) ;Click OK ControlClick($Handle_Window_Properties,"","Button6") Sleep(50) WinClose("Network Connections") EndFunc OpenNetConnToAdapter($AdapterName)
      This function opens the network adapter's Properties-page
      Func OpenNetConnToAdapter($AdapterName) ShellExecute("control.exe","ncpa.cpl",@WindowsDir,"",@SW_SHOW) WinWait("Network Connections","") WinActivate("Network Connections","") Local $Handle_Window_NetworkConnections = WinWaitActive("Network Connections","") Send("{F5}") Sleep(250) Local $AdapterNameArray = StringSplit($AdapterName,"") For $i = 1 To $AdapterNameArray[0] Step 1 Send($AdapterNameArray[$i]) Sleep(10) Next Sleep(50) Send("{APPSKEY}") Sleep(50) Send("{R}") Sleep(500) Return EndFunc SetCheckboxState($Handle,$checkbox_id,$wantedstate)
      This function changes the state of a checkbox
      Func SetCheckboxState($handle,$checkbox_id,$wantedstate) ;$handle : SysListView32-handle ;$checkbox_id : The ID of the checkbox you want to control ;$wantedstate : The wanted status (2 for checked, 3 for unchecked) Local $currentstate = _GUICtrlListView_GetItemStateImage($handle,$checkbox_id) If $currentstate = $wantedstate Then Return Else _GUICtrlListView_SetItemSelected($handle,$checkbox_id,True,True) Send("{Space}") Sleep(50) Return EndIf EndFunc  
×
×
  • Create New...