Ermittelt die Anzahl von Items in dem festgelegten Menü
#include <GuiMenu.au3>
_GUICtrlMenu_GetItemCount ( $hMenu )
$hMenu | Handle des Menüs |
Erfolg: | Die Anzahl von Items in dem Menü |
Fehler: | 0 |
- - - - - - - - Erklärung der Controls - - - - - - - -
Suche nach GetMenuItemCount in der MSDN Bibliothek.
#include <GuiMenu.au3>
Example()
Func Example()
Local $hWnd, $hMain
; Startet den Editor.
Run("notepad.exe")
WinWaitActive("[CLASS:Notepad]")
$hWnd = WinGetHandle("[CLASS:Notepad]")
; Ermittelt das Handle des Hauptmenüs.
$hMain = _GUICtrlMenu_GetMenu($hWnd)
; Ermittelt die Anzahl an Items im Hauptmenü.
Writeln("Anzahl an Items im Hauptmenü: " & _GUICtrlMenu_GetItemCount($hMain))
EndFunc ;==>Example
; Schreibt eine Zeile mit Text in den Editor.
Func Writeln($sText)
ControlSend("[CLASS:Notepad]", "", "Edit1", $sText & @CRLF)
EndFunc ;==>Writeln