Hallo,
ich möchte das "_IsPressed" nur im Aktiven fenster was ich selbst erstellt habe.
Vllt hat ja jemmand eine schnelle Idee.
Gruß Nitrama
Hallo,
ich möchte das "_IsPressed" nur im Aktiven fenster was ich selbst erstellt habe.
Vllt hat ja jemmand eine schnelle Idee.
Gruß Nitrama
GUISetAccelerators
und
GUICtrlCreateDummy
Damit geht das ganz komfortabel. ![]()
lg chess
Oder folgendes, wenn du unbedingt bei _IsPressed bleiben willst:
#include <Misc.au3>
[/autoit] [autoit][/autoit] [autoit]Global $h_Gui = GUICreate('')
GUISetState(@SW_SHOW, $h_Gui)
While True
If _IsPressed('0D') And WinActive($h_Gui) Then Exit MsgBox(64, '', '')
; 0D = Enter
WEnd
Ich muss aber zugeben, dass die Methode mit den Accelerators (meistens) besser ist.
Lediglich bei Games würde ich zu _IsPressed tendieren.
$var danke hat Funktioniert
chesstiger ich hab zwar rumprobiert aber habs nicht hinbekommen ![]()
ich hab zwar rumprobiert aber habs nicht hinbekommen
vieleicht so:
[autoit]#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 442, 192, 124)
$Dummy1 = GUICtrlCreateDummy()
Dim $Form1_AccelTable[1][2] = [["a", $Dummy1]]
GUISetAccelerators($Form1_AccelTable)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Dummy1
MsgBox(0,"","")
a()
EndSwitch
WEnd
Func a()
MsgBox(0,"","")
EndFunc