Hi Liebe Community,
ich habe ein Traymenu geschrieben und möchte gern Run & Send befehle damit ausführen, nur leider klappt das nicht. Es passiert nichts wenn ich die befehle anklicke.
Habt Ihr einen Tipp für mich?
Opt("TrayMenuMode", 1+2)
$Open = FileOpen(@ScriptDir & "\RUNTIMES\position.txt")
$x = FileReadLine ($Open,1)
$y = FileReadLine ($Open,2)
GUISetState(@SW_SHOW)
Global Const $hGUI = GUICreate("CASE LOGGER 1.2.01.01", 527, 460, $x, $y) ;Start GUI
GUISetFont(13, 400, 0, "HelveticaNeueRoman")
GUISetBkColor(0xFFFFFF)
$menu50 = TrayCreateMenu("SUPPORTTOOLS")
$tool1 = TrayCreateItem("RUN", $menu50)
$tool5 = TrayCreateItem("COMMAND CMD", $menu50)
$tool10 = TrayCreateItem("MSTSC", $menu50)
$tool15 = TrayCreateItem("MSTSC /CONSOLE", $menu50)
$tool20 = TrayCreateItem("NOTEPAD", $menu50)
$tool25 = TrayCreateItem("OnScreenKeyboard", $menu50)
$Exit = TrayCreateItem("Exit")
If TrayGetMsg() = $Exit Then
If Not WinActive ($hGUI) Then WinActivate($hGUI)
$Pos = WinGetPos($hGUI)
$Open = FileOpen(@ScriptDir & "\RUNTIMES\position.txt",2)
FileWrite($Open,$Pos[0] & @CRLF & $Pos[1])
FileClose($Open)
Exit
EndIf
If $nMsg = $tool1 Then
Send("#r")
EndIf
If $nMsg() = $tool5 Then
ShellExecute("cmd")
EndIf
If $nMsg() = $tool10 Then
RUN("mstsc")
EndIf
If $nMsg() = $tool5 Then
Run("mstsc /console")
EndIf
If $nMsg() = $tool20 Then
ShellExecute("notepad")
EndIf
If TrayGetMsg() = $tool25 Then
ShellExecute("osk")
EndIf
vielen Dank an euch...
Gruß dabronko1