Post by UnReALiTyy » 13 Nov 2019, 13:27
Bekkart wrote: ↑13 Nov 2019, 12:07
hm... Also in einem Testcode, hab ich das nicht hinbekommen. Es erfolgt kein Trigger nach der Auswahl.
Code: Select all
#ifWinActive, ahk_exe notepad++.exe
SetTitleMatchMode 2
{ ;Abschnitt Gruppe Gruppe Damit GUI nur in Editor und Send Fenster aktiv ist
GroupAdd, Test, ahk_exe AutoHotKey.exe
GroupAdd, Test, ahk_exe notepad++.exe
}
TabON: ; Vordergrund / Hintergund
WinWaitActive, ahk_group Test
{ ;GUI allgemeiner Part
Gui, +AlwaysOnTop +Caption
Gui, Color, C0C0C0
Gui, Show, x1314 y416 w400 h400, BlaBliBlub ; Titel GUI - 24 Zoll Variante
Gui, Add, Tab3, w400 h800, BlaBla|Test2|
}
;GUI alle Registerkarten und Buttons
Gui, Add, Text, x20 y50 w200 h15, Allgemein
Gui, Add, Button, Default w130 gbtn1, [E] Events
Gui, Add, DropDownList, vShortcut_Num gAbfrage, Shortcuts (NUM)||Num 1: Event
Gui Add, Text, x25 y293 w350 h2 +0x10 ; Strich
{
WinWaitNotActive, ahk_group Test
Gui, Destroy
;Gui, Minimize
gosub, TabON
return
}
Gui, Submit
Abfrage:
if (Shortcut_num= "E: Events")
Gosub, btn1
Return
;############################################################ allgemein
btn1:
winactivate ahk_exe notepad++.exe
send, ^f{raw}Events
send,{Enter}{Esc}{Home}{NumpadDown 5} ; Events
return
^E::gosub, btn1
Habe mal ein wenig Optimiert, vielleicht passt dir es ja so.
Code: Select all
SetTitleMatchMode 2
;Abschnitt Gruppe Gruppe Damit GUI nur in Editor und Send Fenster aktiv ist
GroupAdd, Test, ahk_exe AutoHotKey.exe
GroupAdd, Test, ahk_exe notepad++.exe
TabON: ; Vordergrund / Hintergund
WinWaitActive, ahk_group Test
;GUI allgemeiner Part
Gui, +AlwaysOnTop +Caption
Gui, Color, C0C0C0
Gui, Add, Tab3, w400 h800, BlaBla|Test2|
;GUI alle Registerkarten und Buttons
Gui, Add, Text, x20 y50 w200 h15, Allgemein
Gui, Add, Button, Default w130 gbtn1, [E] Events
Gui, Add, DropDownList, Choose1 vShortcut_Num gAbfrage, Shortcuts (NUM)|Num 1: Event|
Gui, Add, Text, x25 y293 w350 h2 +0x10 ; Strich
Gui, Show, x1314 y416 w400 h400, BlaBliBlub ; Titel GUI - 24 Zoll Variante
WinWaitNotActive, ahk_group Test
Gui, Destroy
gosub, TabON
Abfrage:
Gui, Submit ;,nohide
if (Shortcut_num = "Num 1: Event")
gosub, btn1
return
;############################################################ allgemein
^E::
btn1:
WinActivate ahk_exe notepad++.exe
send, ^f{raw}Events
send,{Enter}{Esc}{Home}{NumpadDown 5} ; Events
return
[quote=Bekkart post_id=301130 time=1573664847 user_id=116634]
hm... Also in einem Testcode, hab ich das nicht hinbekommen. Es erfolgt kein Trigger nach der Auswahl.
[Codebox=text file=Untitled.txt]#ifWinActive, ahk_exe notepad++.exe
SetTitleMatchMode 2
{ ;Abschnitt Gruppe Gruppe Damit GUI nur in Editor und Send Fenster aktiv ist
GroupAdd, Test, ahk_exe AutoHotKey.exe
GroupAdd, Test, ahk_exe notepad++.exe
}
TabON: ; Vordergrund / Hintergund
WinWaitActive, ahk_group Test
{ ;GUI allgemeiner Part
Gui, +AlwaysOnTop +Caption
Gui, Color, C0C0C0
Gui, Show, x1314 y416 w400 h400, BlaBliBlub ; Titel GUI - 24 Zoll Variante
Gui, Add, Tab3, w400 h800, BlaBla|Test2|
}
;GUI alle Registerkarten und Buttons
Gui, Add, Text, x20 y50 w200 h15, Allgemein
Gui, Add, Button, Default w130 gbtn1, [E] Events
Gui, Add, DropDownList, vShortcut_Num gAbfrage, Shortcuts (NUM)||Num 1: Event
Gui Add, Text, x25 y293 w350 h2 +0x10 ; Strich
{
WinWaitNotActive, ahk_group Test
Gui, Destroy
;Gui, Minimize
gosub, TabON
return
}
Gui, Submit
Abfrage:
if (Shortcut_num= "E: Events")
Gosub, btn1
Return
;############################################################ allgemein
btn1:
winactivate ahk_exe notepad++.exe
send, ^f{raw}Events
send,{Enter}{Esc}{Home}{NumpadDown 5} ; Events
return
^E::gosub, btn1[/Codebox]
[/quote]
Habe mal ein wenig Optimiert, vielleicht passt dir es ja so.
[code]SetTitleMatchMode 2
;Abschnitt Gruppe Gruppe Damit GUI nur in Editor und Send Fenster aktiv ist
GroupAdd, Test, ahk_exe AutoHotKey.exe
GroupAdd, Test, ahk_exe notepad++.exe
TabON: ; Vordergrund / Hintergund
WinWaitActive, ahk_group Test
;GUI allgemeiner Part
Gui, +AlwaysOnTop +Caption
Gui, Color, C0C0C0
Gui, Add, Tab3, w400 h800, BlaBla|Test2|
;GUI alle Registerkarten und Buttons
Gui, Add, Text, x20 y50 w200 h15, Allgemein
Gui, Add, Button, Default w130 gbtn1, [E] Events
Gui, Add, DropDownList, Choose1 vShortcut_Num gAbfrage, Shortcuts (NUM)|Num 1: Event|
Gui, Add, Text, x25 y293 w350 h2 +0x10 ; Strich
Gui, Show, x1314 y416 w400 h400, BlaBliBlub ; Titel GUI - 24 Zoll Variante
WinWaitNotActive, ahk_group Test
Gui, Destroy
gosub, TabON
Abfrage:
Gui, Submit ;,nohide
if (Shortcut_num = "Num 1: Event")
gosub, btn1
return
;############################################################ allgemein
^E::
btn1:
WinActivate ahk_exe notepad++.exe
send, ^f{raw}Events
send,{Enter}{Esc}{Home}{NumpadDown 5} ; Events
return[/code]