Moin,
ich versuche seit Tagen einen Binder für mich und meine Freunde zu erstellen.
Allerdings haben wir alle einen anderen Geschmack, was Binds angeht.
Meine Frage wäre jetzt:
Wie kann ich meine Binds duch ein Textfeld einstellen und speichern?
Habe auch ein Beispiel gefunden welches meinen Vorstellungen entspricht:
https://ibb.co/QXZ1TBY
Binds anpassen
Moderator: jNizM
-
- Posts: 15
- Joined: 23 May 2020, 02:06
Binds anpassen
Last edited by gregster on 23 May 2020, 02:43, edited 2 times in total.
Reason: Link fixed again.
Reason: Link fixed again.
Re: Binds anpassen
Es gibt ein Hotkey-GUI-Element: https://www.autohotkey.com/docs/commands/GuiControls.htm#Hotkey
Aber es ist etwas limitiert:
Vielleicht hilft auch das : https://www.autohotkey.com/boards/viewtopic.php?t=38651#p177277
Aber es ist etwas limitiert:
- ich glaube es gibt auch benutzererstellte Bibliotheken für sowas...The Hotkey control has limited capabilities. For example, it does not support mouse/joystick hotkeys or the Win key (LWin and RWin). One way to work around this is to provide one or more checkboxes as a means for the user to enable extra modifiers such as the Win key.
Vielleicht hilft auch das : https://www.autohotkey.com/boards/viewtopic.php?t=38651#p177277
-
- Posts: 15
- Joined: 23 May 2020, 02:06
Re: Binds anpassen
Danke für deine schnelle Antwort. Allerdings weiß ich nicht wie ich noch ein Textfeld erstelle was mit dem Hotkey zusammenhängt.gregster wrote: ↑23 May 2020, 02:42Es gibt ein Hotkey-GUI-Element: https://www.autohotkey.com/docs/commands/GuiControls.htm#Hotkey
Aber es ist etwas limitiert:- ich glaube es gibt auch benutzererstellte Bibliotheken für sowas...The Hotkey control has limited capabilities. For example, it does not support mouse/joystick hotkeys or the Win key (LWin and RWin). One way to work around this is to provide one or more checkboxes as a means for the user to enable extra modifiers such as the Win key.
Vielleicht hilft auch das : https://www.autohotkey.com/boards/viewtopic.php?t=38651#p177277
-
- Posts: 15
- Joined: 23 May 2020, 02:06
Re: Binds anpassen
Danke für deine schnelle Antwort. Ich habe jetzt deinen oberen Vorschlag übernommen und der funktionniert auch.gregster wrote: ↑23 May 2020, 02:42Es gibt ein Hotkey-GUI-Element: https://www.autohotkey.com/docs/commands/GuiControls.htm#Hotkey
Aber es ist etwas limitiert:- ich glaube es gibt auch benutzererstellte Bibliotheken für sowas...The Hotkey control has limited capabilities. For example, it does not support mouse/joystick hotkeys or the Win key (LWin and RWin). One way to work around this is to provide one or more checkboxes as a means for the user to enable extra modifiers such as the Win key.
Vielleicht hilft auch das : https://www.autohotkey.com/boards/viewtopic.php?t=38651#p177277
Allerdings weiß ich nicht wie ich noch ein Textfeld hinzufüge welches mit dem Anderen reagiert und es dann noch abspeichern damit der Hotkey nicht gelöscht wird.
Re: Binds anpassen
Das oben erwähnte Hotkey-GUI-Element ist bereits ein Edit-Feld, spezialisiert auf die Erstellung von Tastenkombinationen.
Hast du mal reingeguckt in den Link? Hier auch auf deutsch: https://ahkde.github.io/docs/commands/GuiControls.htm#Hotkey
Edit: Ah so, inzwischen hast du nochmal gepostet... am besten zeigst du mal deinen bisherigen Code.
Hast du mal reingeguckt in den Link? Hier auch auf deutsch: https://ahkde.github.io/docs/commands/GuiControls.htm#Hotkey
Edit: Ah so, inzwischen hast du nochmal gepostet... am besten zeigst du mal deinen bisherigen Code.
-
- Posts: 15
- Joined: 23 May 2020, 02:06
Re: Binds anpassen
Code: Select all
#IfWinActive, RAGE Multiplayer
Gui, Show, x30 y40 h610 w960, Rarebinder
#UseHook
Gui, Font, S10 Cgrey, Arial
Gui, Add, Picture, x0 y0 h610 w960, rare_logo.png
Gui, Add, Edit, x10 y10 w500 h20 ReadOnly, Herzlich Willkommen im Rarebinder. Wir wünschen dir viel Spaß auf Rare-V
Gui, Add, Button, x22 y60 w140 h30 gTestfunktionsname, Beenden
Gui, Add, Button, x22 y30 w140 h30 gStartSAMP, auf Rare-V verbinden
Gui, Add, Hotkey, x22 y80 w140 h30 vChosenHotkey
return
vChosenHotkey:
Testfunktionsname:
msgbox,4,Beenden, Sind Sie sicher, dass Sie den Beenden wollen?
IfMsgBox Yes
2GUIclose:
ExitApp
return
StartSAMP:
Run, updater.exe, C:\RAGEMP
NumpadDiv::
SendInput {t}/duty{enter}
return
Numpad3::
SendInput {t}/s >>LSPD<< Stehenbleiben Sie sind verhaftet{enter}
return
NumpadMult::
SendInput {t}/s >>LSPD<< Stehenbleiben Sie sind verhaftet{enter}
return
F6::
FormatTime,Uhrzeit, HH:mm:ss
SendInput {t}/me schaut auf die Uhrzeit. (%Uhrzeit%) {Enter}
return
Del::
Suspend
return
NumpadSub::
SendInput {t}3{enter}
sleep 1000
SendInput {t}2{enter}
sleep 1000
SendInput {t}1{enter}
sleep 1000
SendInput tDer Countdown ist zuende{!}{enter}
return
^::
SendInput {t}/afk{enter}
return
-
- Posts: 15
- Joined: 23 May 2020, 02:06
Re: Binds anpassen
und sry vorhin für 2 mal das gleich posten ich habe die Nachricht auf der stand dass es noch 2 Minuten braucht nicht gelesen
Re: Binds anpassen
Vielleicht so eine Grundstruktur:
Nur flüchtig getestet, aber ist erweiterbar für weitere Tastenkombos und Features.
Mit IniWrite und IniRead könntest du das Ganze dann noch in einer ini-Datei für die Nachwelt (oder die nächste Spielrunde) speichern.
Code: Select all
; Set default keys
Oldkeys := ["Numpad1", "Numpad2"]
HotKey, IfWinActive, RAGE Multiplayer ; replaces #IfWinActive, RAGE Multiplayer
for i, key in Oldkeys
Hotkey, % key, label%i%
; Gui
Gui, Add, Hotkey, x22 w150 vChosenHotkey1, % Oldkeys[1]
Gui, Add, Checkbox, vaddWin1 , mit Win-Modifier
Gui, Add, Hotkey, x22 w150 vChosenHotkey2, % Oldkeys[2]
Gui, Add, Checkbox, vaddWin2 , mit Win-Modifier
Gui, Add, Button, gUpdateKey, Save
Gui, Show
return
UpdateKey:
Gui, Submit, nohide
loop % Oldkeys.count() ; number of Hotkeys
{
Hotkey, % Oldkeys[A_index], label%A_index%, Off ; disable previous hotkeys
if (addWin%A_index% = 1) ; check for win modifier
ChosenHotkey%A_index% := "#" ChosenHotkey%A_index%
Hotkey, % "$" ChosenHotkey%A_index%, label%A_index%, On ; set new hotkey
Oldkeys[A_index] := ChosenHotkey%A_index% ; store hotkey
}
return
label1:
SendInput {t}/duty{enter}
return
label2:
SendInput {t}/s >>LSPD<< Stehenbleiben Sie sind verhaftet{enter}
return
Mit IniWrite und IniRead könntest du das Ganze dann noch in einer ini-Datei für die Nachwelt (oder die nächste Spielrunde) speichern.
Who is online
Users browsing this forum: No registered users and 57 guests