Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[SAMP] [API] - Keybinder (Freibelegbare Hotkeys und Binds)


  • Please log in to reply
1 reply to this topic
Kevvo
  • Members
  • 1 posts
  • Last active: Apr 09 2014 10:24 AM
  • Joined: 05 Apr 2014

Hallo.

Erstmal der Code ...

Gui, Add, Picture, x-8 y0 w660 h560 , %Stammverzeichnis%Einstellungen\Bilder\LWood.png
Gui, Add, Text, x2 y0 w40 h30 +Center BackgroundTrans, Hotkey
Gui, Add, Text, x182 y0 w100 h30 +Center BackgroundTrans, Nachricht
Gui, Add, Hotkey, x2 y30 w40 h20 , 
Gui, Add, Hotkey, x2 y60 w40 h20 , 
Gui, Add, Hotkey, x2 y90 w40 h20 , 
Gui, Add, Hotkey, x2 y120 w40 h20 , 
Gui, Add, Hotkey, x2 y150 w40 h20 , 
Gui, Add, Hotkey, x2 y180 w40 h20 , 
Gui, Add, Hotkey, x2 y210 w40 h20 , 
Gui, Add, Hotkey, x2 y240 w40 h20 , 
Gui, Add, Hotkey, x2 y270 w40 h20 , 
Gui, Add, Hotkey, x2 y300 w40 h20 , 
Gui, Add, Edit, x52 y30 w420 h20 , Edit1
Gui, Add, Edit, x52 y60 w420 h20 , Edit2
Gui, Add, Edit, x52 y90 w420 h20 , Edit3
Gui, Add, Edit, x52 y120 w420 h20 , Edit4
Gui, Add, Edit, x52 y150 w420 h20 , Edit5
Gui, Add, Edit, x52 y180 w420 h20 , Edit6
Gui, Add, Edit, x52 y210 w420 h20 , Edit7
Gui, Add, Edit, x52 y240 w420 h20 , Edit8
Gui, Add, Edit, x52 y270 w420 h20 , Edit9
Gui, Add, Edit, x52 y300 w420 h20 , Edit10
Gui, Add, Button, x182 y340 w100 h30 , Speichern
Gui, Show, x276 y291 h379 w479, Binds
Return

GuiClose:
ExitApp

Wie bekomme ich folgendes hin:

(Unten ist ein Bild zur verdeutlichung was ich meine)

 

- Das der Hotkey in Zeile 1 auch direkt mit dem gegenüberliegenden Editfeld zusammenarbeit? und das gleiche mit den anderen. (Und eben somit auch einen Text ins Spiel sendet)

Screenshot: http://s22.postimg.o...t/Unbenannt.png

Da sieht man das er mit "Numpad2" "Text" ins Spiel senden soll. [Jedoch im Script später mit "SendChat("Text") (deshalb API im Titel) und nicht SendInput.]

Aber es kann auch sein, dass ich "Numpad2" zu "Numpad3" ändern möchte ... (einfach ins Hotkeyfeld reinklicken und Taste drücken)

 

Wie kriegt man sowas hin? Freibelegbare Hotkeys und Texte.

Mit  "vorprogrammierten" Hotkeys weiß ich wie das geht.... aber so nicht, hoffe auf Hilfe.

 

Das ist nur nen Teil von einem Script der mit einem Button "Binds" aufgerufen wird, die anderen teile konnte ich Problemlos machen nur hier steh ich Planlos bis verzweifelt vor.



Kibo
  • Members
  • 36 posts
  • Last active: Aug 09 2015 07:56 PM
  • Joined: 14 Mar 2012

mach doch lieber nen button zum bestimmen des Keys, den fragst du denn per A_PriorKey ab. Wäre doch doof wenn einer Numpad da eintippen müsste (Oder Dropdownliste)

Einen dynamischen Key kannste dann mit

 

Hotkey, %Variablediekeyenthält%, Subdietextsendet

 

machen.