Ermittelt, ob ein Menüpunkt den Standardstatus besitzt
#include <GuiMenu.au3>
_GUICtrlMenu_GetItemDefault ( $hMenu, $iItem [, $bByPos = True] )
$hMenu | Handle des Menüs |
$iItem | ID oder Position des Menüitems |
$bByPos | [optional] Menü-ID Flag: True - $iItem ist eine 0-basierende Itemposition False - $iItem ist ein Menüitem Identifizierer |
True: | Item ist das Standarditem |
False: | Item ist nicht das Standarditem |
- - - - - - - - Erklärung der Controls - - - - - - - -
#include <GuiMenu.au3>
Example()
Func Example()
Local $hWnd, $hMain, $hFile
; Startet den Editor
Run("notepad.exe")
WinWaitActive("[CLASS:Notepad]")
$hWnd = WinGetHandle("[CLASS:Notepad]")
$hMain = _GUICtrlMenu_GetMenu($hWnd)
$hFile = _GUICtrlMenu_GetItemSubMenu($hMain, 0)
; Ermittelt/Setzt das Standard-Menüitem
Writeln("Öffnen ist Standard: " & _GUICtrlMenu_GetItemDefault($hFile, 1))
_GUICtrlMenu_SetItemDefault($hFile, 1)
Writeln("Öffnen ist Standard: " & _GUICtrlMenu_GetItemDefault($hFile, 1))
EndFunc ;==>Example
; Schreibt eine Zeile mit Text in den Editor
Func Writeln($sText)
ControlSend("[CLASS:Notepad]", "", "Edit1", $sText & @CRLF)
EndFunc ;==>Writeln