Hallo!
Ich wollte einen Keybinder mit AHK erstellen für eine Reporter Fraktion.
Jeder Bericht geht mit "+++" los. Also z.B. +++Wetter News+++
Leider werden bei meinem Keybinder die Plus Zeichen nicht mit ins Spiel gebracht, sondern nur "Wetter News".
Was soll ich tun?
Mein zweites Problem: Wenn ich z.B. auf Taste 2 den Satz. Gute Morgen Community! , Und die Taste dann im Spiel drücke, verkleinert sich GTA.
Ich weiß das dies an dem ! liegt und man das so schreiben soll: {!}
Aber nicht jeder Nutzer dieses Keybinders kann wissen das man das so machen muss und will einfach nur ein ! schreiben.
Was muss ich ändern damit mach Ausrufezeichen einfach so schreiben kann?
Hier meine Script:
#NoEnv
#Persistent
#SingleInstance Force
#UseHook
#IfWinActive, GTA:SA:MP
Gui, Show, w930 h650, Keybinder
Gui, Color, black
Gui, Font, s9, Arial
ini = %A_ScriptDir%\Settings.ini
IfNotExist, %ini%
{
Loop, 15
{
IniWrite, %A_Space%, %ini%, Texte, Text%A_Index%
}
}
Loop, 15
{
IniRead, Hotkey%A_Index%, %ini%, Hotkeys, Hotkey%A_Index%
IniRead, Text%A_Index%, %ini%, Texte, Text%A_Index%
}
gosub, Hotkeydefine
Gui, Add, Hotkey, x20 y55 w65 h27 vHotkey1 , %Hotkey1%
Gui, Add, Hotkey, x20 y90 w65 h27 vHotkey2 , %Hotkey2%
Gui, Add, Hotkey, x20 y125 w65 h27 vHotkey3 , %Hotkey3%
Gui, Add, Hotkey, x20 y160 w65 h27 vHotkey4 , %Hotkey4%
Gui, Add, Hotkey, x20 y195 w65 h27 vHotkey5 , %Hotkey5%
Gui, Add, Hotkey, x20 y230 w65 h27 vHotkey6 , %Hotkey6%
Gui, Add, Hotkey, x20 y265 w65 h27 vHotkey7 , %Hotkey7%
Gui, Add, Hotkey, x20 y300 w65 h27 vHotkey8 , %Hotkey8%
Gui, Add, Hotkey, x20 y335 w65 h27 vHotkey9 , %Hotkey9%
Gui, Add, Hotkey, x20 y370 w65 h27 vHotkey10 , %Hotkey10%
Gui, Add, Hotkey, x20 y405 w65 h27 vHotkey11 , %Hotkey11%
Gui, Add, Hotkey, x20 y440 w65 h27 vHotkey12 , %Hotkey12%
Gui, Add, Hotkey, x20 y475 w65 h27 vHotkey13 , %Hotkey13%
Gui, Add, Hotkey, x20 y510 w65 h27 vHotkey14 , %Hotkey14%
Gui, Add, Hotkey, x20 y545 w65 h27 vHotkey15 , %Hotkey15%
Gui, Add, Edit, x100 y55 w800 h27 vText1, %Text1%
Gui, Add, Edit, x100 y90 w800 h27 vText2, %Text2%
Gui, Add, Edit, x100 y125 w800 h27 vText3, %Text3%
Gui, Add, Edit, x100 y160 w800 h27 vText4, %Text4%
Gui, Add, Edit, x100 y195 w800 h27 vText5, %Text5%
Gui, Add, Edit, x100 y230 w800 h27 vText6, %Text6%
Gui, Add, Edit, x100 y265 w800 h27 vText7, %Text7%
Gui, Add, Edit, x100 y300 w800 h27 vText8, %Text8%
Gui, Add, Edit, x100 y335 w800 h27 vText9, %Text9%
Gui, Add, Edit, x100 y370 w800 h27 vText10, %Text10%
Gui, Add, Edit, x100 y405 w800 h27 vText11, %Text11%
Gui, Add, Edit, x100 y440 w800 h27 vText12, %Text12%
Gui, Add, Edit, x100 y475 w800 h27 vText13, %Text13%
Gui, Add, Edit, x100 y510 w800 h27 vText14, %Text14%
Gui, Add, Edit, x100 y545 w800 h27 vText15, %Text15%
Gui, Font, s10 bold
Gui, Add, Button, x180 y600 w150 h30 gSave, Speichern
Gui, Add, Button, x350 y600 w150 h30 gClose, Beenden
Gui, Font, s20 bold
Gui, Add, Text, x300 y13 w500 h30 cwhite +BackgroundTrans, News Keybinder by Martin.
Gui, Font, s16 bold
Gui, Add, Text, x600 y603 w300 h30 cwhite +BackgroundTrans, F12 - Keybinder Ein/Aus
return
GuiClose:
ExitApp
return
Save:
gosub, Hotkeydefine
Gui, 1: Submit, NoHide
Loop, 15 {
HHotkey := Hotkey%A_Index%
IniWrite, %HHotkey%, %ini%, Hotkeys, Hotkey%A_Index%
HTexte := Text%A_Index%
IniWrite, %HTexte%, %ini%, Texte, Text%A_Index%
}
Reload
return
Hotkeydefine:
Loop, 15
{
HHotkey := Hotkey%A_Index%
Hotkey, ~%HHotkey%, Label%A_Index%, UseErrorlevel
}
return
Close:
ExitApp
return
F12::
Suspend
if ( A_IsSuspended )
{
SendInput t/me schaltet seinen Keybinder aus.{Enter}
}
if ( !A_IsSuspended )
{
SendInput t/me schaltet seinen Keybinder ein.{Enter}
}
return
t::
Suspend On
SendInput t
Hotkey, Enter, On
Hotkey, Escape, On
Hotkey, t, Off
return
NumpadEnter::
Enter::
Suspend Permit
Suspend Off
SendInput {Enter}
Hotkey, t, On
Hotkey, Enter, Off
Hotkey, Escape, Off
return
Escape::
Suspend Permit
Suspend Off
SendInput {Escape}
Hotkey, t, On
Hotkey, Enter, Off
Hotkey, Escape, Off
return
Label1:
SendInput, t%Text1%{enter}
return
Label2:
SendInput, t%Text2%{enter}
return
Label3:
SendInput, t%Text3%{enter}
return
Label4:
SendInput, t%Text4%{enter}
return
Label5:
SendInput, t%Text5%{enter}
return
Label6:
SendInput, t%Text6%{enter}
return
Label7:
SendInput, t%Text7%{enter}
return
Label8:
SendInput, t%Text8%{enter}
return
Label9:
SendInput, t%Text9%{enter}
return
Label10:
SendInput, t%Text10%{enter}
return
Label11:
SendInput, t%Text11%{enter}
return
Label12:
SendInput, t%Text12%{enter}
return
Label13:
SendInput, t%Text13%{enter}
return
Label14:
SendInput, t%Text14%{enter}
return
Label15:
SendInput, t%Text15%{enter}
return