Gui Funktion für scriptfunktion auslesen und veräandern ohne code umzuschreiben

Stelle Fragen zur Automatisierung von Spielen

Moderator: jNizM

User avatar
vaselbur
Posts: 1
Joined: 04 Aug 2017, 02:36

Gui Funktion für scriptfunktion auslesen und veräandern ohne code umzuschreiben

04 Aug 2017, 03:26

Hallo ich habe eine Frage zu der Funktion Gui Funktionen in Funktionen einbinden ( Beispiel man hat eine Dropdown liste und möchte die ausgewählte Sektion im eigenen ahk Code anzeigen, wobei man diese aktiv im Gui verändern kann ohne den Code um zu schreiben.
Wie kann ich das Anstellen? :geek:

Code: Select all

Gui:
Gui, Color, 9EC8FF
Gui, Show, h440 w740 ;zeigtdasGui
Gui, Font, s12 000000 Verdana ;schriftart


Gui, Add, DropDownList, x5 y5 w730 h340, #HotKeyInterval | Col | ColVn | AnShakeX | AnShakeY | ZeroX | ZeroY | CFoX | CFovY | DirX | DirY | MoveX | MoveY ;Box mit vielen Codes
Gui, Add, GroupBox, x5 y40 w730 h140 , DropDownlistCode ;Textbox inder die values von den ausgewählten Dropdownlist optionen Stehen sollten.
Gui, Add, text, v#HotKeyInterval, %Some_value% ;sollteeigden text der Dropdownliste zeigen.


Gui, Add, Button, x685 y200 w50 h50, + ;Plus zeichen
Gui, Add, Button, x5 y200 w50 h50, - ;Minus zeichen


Gui Add, GroupBox, x5 y360 w730 h75
Gui Add, Text, x5 y720 h12, Um zu schließen drücke Numlock
Gui Add, Text, x120 y720 h12, Um zu pausieren drücke Einfügen.

Gui, Add, Slider, vMySlider, 100 x220 y310

msgbox, Um diese Software zu schließen drücke die Taste, Numlock.
msgbox, Um diese Software zu Pausieren drücke die Taste, Einfügen.


EMCol := 0xff0000
ColVn := 42
AnShakeX := 20
AnShakeY := 20
ZeroX := 960
ZeroY := 536.76
CFovX := 75
CFovY := 75

Loop, {
GetKeyState, Mouse1, LButton, P
PixelSearch, AimPixelX, AimPixelY, Fast RGB
if (!ErrorLevel=0) {
loop, {
PixelSearch, AimPixelX, AimPixelY, ColVn, Fast RGB
GoSub GetWayOffset
GoSub GetWayMoves
GoSub MouseMoves
}
}
}

GetWayOffset:

  If ( AimX > 0 ) {
   DirX := 1
  }
  If ( AimX < 0 ) {
   DirX := -1
  }
  If ( AimY > 0 ) {
   DirY := 1
  }
  If ( AimY < 0 ) {
   DirY := -1
  }
Return

GetWayMoves:
 RootX :=(( AimOffsetX ( 1 / 2 ))
 RootY :=(( AimOffsetY ( 1 / 2 ))
MoveX :=(( AimOffsetX ( 1 / 2 )))
MoveY :=(( AimOffsetY ( 1 / 2 )))
Return

MouseMoves:
If ( Mouse1 == "U" ) {
 DllCall(MoveX*1, int, MoveY*1)
 }
Return

$*ins::
Suspend
Pause,,1
SoundBeep, 560, 100
return

NumLock::
SoundBeep, 320, 100
ExitApp
Vasel was here :D
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: Gui Funktion für scriptfunktion auslesen und veräandern ohne code umzuschreiben

04 Aug 2017, 15:05

Du solltest dir mal Variablen, Ausdrücke und Funktionen in der Hilfe durchlesen:

Code: Select all

Gui, Add, DropDownList, x5 y5 w730 h340 vVariablenName, #HotKeyInterval | Col | ColVn | AnShakeX | AnShakeY | ZeroX | ZeroY | CFoX | CFovY | DirX | DirY | MoveX | MoveY
Gui, show
return
Enter::
Gui,Submit
MsgBox %VariablenName%
ExitApp
Recommends AHK Studio

Return to “Spiele”

Who is online

Users browsing this forum: No registered users and 19 guests