|
You last visited: Today at 15:46
Advertisement
Kleines Problem
Discussion on Kleines Problem within the AutoIt forum part of the Coders Den category.
10/08/2010, 20:35
|
#1
|
elite*gold: 0
Join Date: Jul 2009
Posts: 3,441
Received Thanks: 1,473
|
Kleines Problem
Hey E*pvpers
Hab grad versucht einen kleinen Bot für Flyff zu machen, der F1-F12 in bestimmten Interwallen senden sollte.
Mit F1 klappt das auch auch alles, doch sobald ich etwas andres als F1 senden will, passiert einfach nichts.
Ich poste mal ein paar Zeilen, vllt seht ihr den Fehler
PHP Code:
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 625, 426, 192, 124)
$Button1 = GUICtrlCreateButton("Button2", 488, 88, 129, 41, 0)
$Button2 = GUICtrlCreateButton("Button1", 488, 32, 129, 41, 0)
$Button3 = GUICtrlCreateButton("Button3", 488, 200, 129, 41, 0)
$Button4 = GUICtrlCreateButton("Button4", 488, 144, 129, 41, 0)
$Button5 = GUICtrlCreateButton("Button5", 488, 256, 129, 41, 0)
$Combo1 = GUICtrlCreateCombo("Combo1", 64, 40, 257, 25)
GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo2 = GUICtrlCreateCombo("Combo2", 64, 96, 257, 25)
GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo3 = GUICtrlCreateCombo("Combo1", 64, 152, 257, 25)
GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo4 = GUICtrlCreateCombo("Combo1", 64, 208, 257, 25)
GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo5 = GUICtrlCreateCombo("Combo1", 64, 264, 257, 25)
GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Group1 = GUICtrlCreateGroup("Taste", 16, 16, 385, 305)
$Group3 = GUICtrlCreateGroup("Interwall", 400, 24, 1, 297)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Start", 472, 16, 153, 305)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Input1 = GUICtrlCreateInput("Input1", 408, 96, 57, 21)
$Input2 = GUICtrlCreateInput("Input1", 408, 264, 57, 21)
$Input3 = GUICtrlCreateInput("Input1", 408, 152, 57, 21)
$Input4 = GUICtrlCreateInput("Input1", 408, 208, 57, 21)
$Input5 = GUICtrlCreateInput("Input1", 408, 48, 57, 21)
$Group4 = GUICtrlCreateGroup("Interwall", 400, 16, 73, 305)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button2
While 1=1
If GUICtrlRead($Combo1) = "F1" Then ControlSend("FLYFF", "", "", "{F1}")
Sleep (GUICtrlRead($Input1))
WEnd
Case $Button2
While 1=1
If GUICtrlRead($Combo1) = "F2" Then ControlSend("FLYFF", "", "", "{F2}")
Sleep (GUICtrlRead($Input1))
WEnd
EndSwitch
WEnd
Freu mich über jede Hilfe.
Lg
Niklas
|
|
|
10/08/2010, 22:26
|
#2
|
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
|
so hab erstmal dein script in ordnung gebracht, ich sag dir gleich ne lösung
PHP Code:
#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 625, 426, 192, 124)
$Button1 = GUICtrlCreateButton("1", 488, 32, 129, 41, 0) $Button2 = GUICtrlCreateButton("2", 488, 88, 129, 41, 0)
$Button3 = GUICtrlCreateButton("3", 488, 144, 129, 41, 0) $Button4 = GUICtrlCreateButton("4", 488, 200, 129, 41, 0) $Button5 = GUICtrlCreateButton("5", 488, 256, 129, 41, 0)
$Combo1 = GUICtrlCreateCombo("Combo1", 64, 40, 257, 25) GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12") $Combo2 = GUICtrlCreateCombo("Combo2", 64, 96, 257, 25) GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12") $Combo3 = GUICtrlCreateCombo("Combo1", 64, 152, 257, 25) GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12") $Combo4 = GUICtrlCreateCombo("Combo1", 64, 208, 257, 25) GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12") $Combo5 = GUICtrlCreateCombo("Combo1", 64, 264, 257, 25) GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12") $Group1 = GUICtrlCreateGroup("Taste", 16, 16, 385, 305) $Group3 = GUICtrlCreateGroup("Interwall", 400, 24, 1, 297) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("Start", 472, 16, 153, 305)
$Input1 = GUICtrlCreateInput("1", 408, 48, 57, 21) GUICtrlCreateGroup("", -99, -99, 1, 1) $Input2 = GUICtrlCreateInput("2", 408, 96, 57, 21) $Input3 = GUICtrlCreateInput("3", 408, 152, 57, 21) $Input4 = GUICtrlCreateInput("4", 408, 208, 57, 21) $Input5 = GUICtrlCreateInput("5", 408, 264, 57, 21)
$Group4 = GUICtrlCreateGroup("Interwall", 400, 16, 73, 305) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ###
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit
Case $Button1 _send()
EndSwitch
WEnd
Func _send()
While 1 If GUICtrlRead($Combo1) = "F1" Then ControlSend("FLYFF", "", "", "{F1}") Sleep(GUICtrlRead($Input1))
WEnd
EndFunc ;==>_send
Spontan würd ich deinen script so schreiben:
PHP Code:
#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 625, 426, 192, 124)
$Button1 = GUICtrlCreateButton("1", 488, 32, 129, 41, 0) $Button2 = GUICtrlCreateButton("2", 488, 88, 129, 41, 0)
$Button3 = GUICtrlCreateButton("3", 488, 144, 129, 41, 0) $Button4 = GUICtrlCreateButton("4", 488, 200, 129, 41, 0) $Button5 = GUICtrlCreateButton("5", 488, 256, 129, 41, 0)
Global $Combo1 = GUICtrlCreateCombo("Combo1", 64, 40, 257, 25) GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12") $Combo2 = GUICtrlCreateCombo("Combo2", 64, 96, 257, 25) GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12") $Combo3 = GUICtrlCreateCombo("Combo1", 64, 152, 257, 25) GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12") $Combo4 = GUICtrlCreateCombo("Combo1", 64, 208, 257, 25) GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12") $Combo5 = GUICtrlCreateCombo("Combo1", 64, 264, 257, 25) GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12") $Group1 = GUICtrlCreateGroup("Taste", 16, 16, 385, 305) $Group3 = GUICtrlCreateGroup("Interwall", 400, 24, 1, 297) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("Start", 472, 16, 153, 305)
$Input1 = GUICtrlCreateInput("1", 408, 48, 57, 21) GUICtrlCreateGroup("", -99, -99, 1, 1) $Input2 = GUICtrlCreateInput("2", 408, 96, 57, 21) $Input3 = GUICtrlCreateInput("3", 408, 152, 57, 21) $Input4 = GUICtrlCreateInput("4", 408, 208, 57, 21) $Input5 = GUICtrlCreateInput("5", 408, 264, 57, 21)
$Group4 = GUICtrlCreateGroup("Interwall", 400, 16, 73, 305) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ###
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit
Case $Button1 _send()
EndSwitch
WEnd
Func _send()
$1=GUICtrlRead($Combo1)
While 1 ControlSend("FLYFF", "", "", "{"&$1&"}") Sleep(GUICtrlRead($Input1)) if GUICtrlRead($Combo1) <> "F1" then ExitLoop
WEnd
EndFunc ;==>_send
hiermiet kommste ganz sauber aus der schleife raus wenn du die hotkeys änderst
Code:
Func _send()
$1=GUICtrlRead($Combo1)
[B]While 1[/B]
ControlSend("FLYFF", "", "", "{"&$1&"}")
Sleep(GUICtrlRead($Input1))
[B]if GUICtrlRead($Combo1) <> "F1" then ExitLoop[/B]
[B] WEnd[/B]
EndFunc ;==>_send
aus der while schleife versteht sich
|
|
|
10/08/2010, 22:32
|
#3
|
elite*gold: 558
Join Date: Jan 2010
Posts: 22,776
Received Thanks: 10,538
|
Kannst du mir bitte verraten, wo der Fehler war?
|
|
|
10/08/2010, 22:36
|
#4
|
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
|
Quote:
Originally Posted by 4LPH4!
Kannst du mir bitte verraten, wo der Fehler war?
|
guck dir doch erstma die Variabeln an:
bsp:
PHP Code:
$Input1 = GUICtrlCreateInput("Input1", 408, 96, 57, 21)
PHP Code:
$Button1 = GUICtrlCreateButton("Button2", 488, 88, 129, 41, 0)
PHP Code:
Case $Button2 While 1=1 If GUICtrlRead($Combo1) = "F1" Then ControlSend("FLYFF", "", "", "{F1}") Sleep (GUICtrlRead($Input1))
|
|
|
10/08/2010, 22:46
|
#5
|
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
|
ich habe ma dein script vollendet:
PHP Code:
#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 625, 426, 192, 124)
$Button1 = GUICtrlCreateButton("1", 488, 32, 129, 41, 0) $Button2 = GUICtrlCreateButton("2", 488, 88, 129, 41, 0)
$Button3 = GUICtrlCreateButton("3", 488, 144, 129, 41, 0) $Button4 = GUICtrlCreateButton("4", 488, 200, 129, 41, 0) $Button5 = GUICtrlCreateButton("5", 488, 256, 129, 41, 0)
Global $Combo1 = GUICtrlCreateCombo("Combo1", 64, 40, 257, 25) GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12") $Combo2 = GUICtrlCreateCombo("Combo2", 64, 96, 257, 25) GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12") $Combo3 = GUICtrlCreateCombo("Combo1", 64, 152, 257, 25) GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12") $Combo4 = GUICtrlCreateCombo("Combo1", 64, 208, 257, 25) GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12") $Combo5 = GUICtrlCreateCombo("Combo1", 64, 264, 257, 25) GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12") $Group1 = GUICtrlCreateGroup("Taste", 16, 16, 385, 305) $Group3 = GUICtrlCreateGroup("Interwall", 400, 24, 1, 297) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("Start", 472, 16, 153, 305)
$Input1 = GUICtrlCreateInput("1", 408, 48, 57, 21) GUICtrlCreateGroup("", -99, -99, 1, 1) $Input2 = GUICtrlCreateInput("2", 408, 96, 57, 21) $Input3 = GUICtrlCreateInput("3", 408, 152, 57, 21) $Input4 = GUICtrlCreateInput("4", 408, 208, 57, 21) $Input5 = GUICtrlCreateInput("5", 408, 264, 57, 21)
$Group4 = GUICtrlCreateGroup("Interwall", 400, 16, 73, 305) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ###
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit
Case $Button1 _send1() case $Button2 _send2() Case $Button3 _send3() case $Button4 _send4() case $Button5 _send5()
EndSwitch
WEnd
Func _send1()
$1=GUICtrlRead($Combo1)
While 1 MsgBox(0,"","") Sleep(GUICtrlRead($Input1)) if GUICtrlRead($Combo1) <> "F1" then ExitLoop
WEnd
Return
EndFunc ;==>_send
Func _send2()
$1=GUICtrlRead($Combo2)
While 1 MsgBox(0,"","") Sleep(GUICtrlRead($Input2)) if GUICtrlRead($Combo2) <> "F1" then ExitLoop
WEnd
EndFunc ;==>_send
Func _send3()
$1=GUICtrlRead($Combo3)
While 1 MsgBox(0,"","") Sleep(GUICtrlRead($Input3)) if GUICtrlRead($Combo3) <> "F1" then ExitLoop
WEnd
EndFunc ;==>_send
Func _send4()
$1=GUICtrlRead($Combo4)
While 1 MsgBox(0,"","") Sleep(GUICtrlRead($Input4)) if GUICtrlRead($Combo4) <> "F1" then ExitLoop
WEnd
EndFunc ;==>_send
Func _send5()
$1=GUICtrlRead($Combo5)
While 1 MsgBox(0,"","") Sleep(GUICtrlRead($Input5)) if GUICtrlRead($Combo5) <> "F1" then ExitLoop
WEnd
EndFunc ;==>_send
jetzt stellt sich nur noch die frage: willst du das alle funktionen gleichzeitig laufen???
|
|
|
10/08/2010, 22:47
|
#6
|
elite*gold: 0
Join Date: Jul 2009
Posts: 3,441
Received Thanks: 1,473
|
Danke erstmal. Ich versteh nur nicht so ganz, was an meinem falsch war, da F1 ja gesendet wird.
Wenn ich aber F1 ersetze passiert nichts mehr :<
|
|
|
10/08/2010, 22:52
|
#7
|
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
|
Quote:
Originally Posted by Belur
Danke erstmal. Ich versteh nur nicht so ganz, was an meinem falsch war, da F1 ja gesendet wird.
Wenn ich aber F1 ersetze passiert nichts mehr :<
|
du hattes ja ne While schliefe
Quote:
While 1=1
If GUICtrlRead($Combo1) = "F1" Then ControlSend("FLYFF", "", "", "{F1}")
Sleep (GUICtrlRead($Input1))
WEnd
|
d.h das das script nur die ganze zeit nur f1 drückt,wenn du jetzt die taste änderst bemerkt das das script nicht sozusagen, da du nicht reingeschireben hast, was passieren soll wenn du was änderst am gui
das wäre das hier z.b damit das script merkt das du was ändern willst :
Quote:
|
if GUICtrlRead($Combo1) <> "F1" then ExitLoop
|
Mit worten : WEnn die combobox nicht mehr die variable F1 besitzt, soll die While schliefe mit Exitloop verlassen werden
|
|
|
10/08/2010, 23:03
|
#8
|
elite*gold: 0
Join Date: Jul 2009
Posts: 3,441
Received Thanks: 1,473
|
Ahh Verstehe. Danke dir.
Nur wo soll das Return hin?
|
|
|
10/08/2010, 23:14
|
#9
|
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
|
Quote:
Originally Posted by Belur
Ahh Verstehe. Danke dir.
Nur wo soll das Return hin?
|
du hast den befehl zu funktion _send1 gegeben nach dem du auf button 1 gedrückt hast:
PHP Code:
Case $Button1 _send1()
die funktion steht irgen wo unter deinem gui:
Code:
Func _send1()
$1=GUICtrlRead($Combo1)
While 1
MsgBox(0,"","")
Sleep(GUICtrlRead($Input1))
if GUICtrlRead($Combo1) <> "F1" then ExitLoop
WEnd
[COLOR="Red"]Return[/COLOR]
EndFunc ;==>_send
und das return muss natürlich immer unter die while schleife, da du mit ExitLoop
aus der schleife raus gehst und mit return die funktion beendest
du muss dir das vorstellen wie eine machschine die alles schritt für schritt abarbeitet
wenn du dir den post genauer angesehen hättes , dann hättes du es wahrscheinlich gemerkt:
Quote:
Originally Posted by maxi39
ich habe ma dein script vollendet:
PHP Code:
#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 625, 426, 192, 124)
$Button1 = GUICtrlCreateButton("1", 488, 32, 129, 41, 0) $Button2 = GUICtrlCreateButton("2", 488, 88, 129, 41, 0)
$Button3 = GUICtrlCreateButton("3", 488, 144, 129, 41, 0) $Button4 = GUICtrlCreateButton("4", 488, 200, 129, 41, 0) $Button5 = GUICtrlCreateButton("5", 488, 256, 129, 41, 0)
Global $Combo1 = GUICtrlCreateCombo("Combo1", 64, 40, 257, 25) GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12") $Combo2 = GUICtrlCreateCombo("Combo2", 64, 96, 257, 25) GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12") $Combo3 = GUICtrlCreateCombo("Combo1", 64, 152, 257, 25) GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12") $Combo4 = GUICtrlCreateCombo("Combo1", 64, 208, 257, 25) GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12") $Combo5 = GUICtrlCreateCombo("Combo1", 64, 264, 257, 25) GUICtrlSetData(-1, "F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12") $Group1 = GUICtrlCreateGroup("Taste", 16, 16, 385, 305) $Group3 = GUICtrlCreateGroup("Interwall", 400, 24, 1, 297) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("Start", 472, 16, 153, 305)
$Input1 = GUICtrlCreateInput("1", 408, 48, 57, 21) GUICtrlCreateGroup("", -99, -99, 1, 1) $Input2 = GUICtrlCreateInput("2", 408, 96, 57, 21) $Input3 = GUICtrlCreateInput("3", 408, 152, 57, 21) $Input4 = GUICtrlCreateInput("4", 408, 208, 57, 21) $Input5 = GUICtrlCreateInput("5", 408, 264, 57, 21)
$Group4 = GUICtrlCreateGroup("Interwall", 400, 16, 73, 305) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ###
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit
Case $Button1 _send1() case $Button2 _send2() Case $Button3 _send3() case $Button4 _send4() case $Button5 _send5()
EndSwitch
WEnd
Func _send1()
$1=GUICtrlRead($Combo1)
While 1 MsgBox(0,"","") Sleep(GUICtrlRead($Input1)) if GUICtrlRead($Combo1) <> "F1" then ExitLoop
WEnd
EndFunc ;==>_send
Func _send2()
$1=GUICtrlRead($Combo2)
While 1 MsgBox(0,"","") Sleep(GUICtrlRead($Input2)) if GUICtrlRead($Combo2) <> "F1" then ExitLoop
WEnd
EndFunc ;==>_send
Func _send3()
$1=GUICtrlRead($Combo3)
While 1 MsgBox(0,"","") Sleep(GUICtrlRead($Input3)) if GUICtrlRead($Combo3) <> "F1" then ExitLoop
WEnd
EndFunc ;==>_send
Func _send4()
$1=GUICtrlRead($Combo4)
While 1 MsgBox(0,"","") Sleep(GUICtrlRead($Input4)) if GUICtrlRead($Combo4) <> "F1" then ExitLoop
WEnd
EndFunc ;==>_send
Func _send5()
$1=GUICtrlRead($Combo5)
While 1 MsgBox(0,"","") Sleep(GUICtrlRead($Input5)) if GUICtrlRead($Combo5) <> "F1" then ExitLoop
WEnd
EndFunc ;==>_send
jetzt stellt sich nur noch die frage: willst du das alle funktionen gleichzeitig laufen???
|
|
|
|
10/08/2010, 23:20
|
#10
|
elite*gold: 0
Join Date: Jul 2009
Posts: 3,441
Received Thanks: 1,473
|
 Stehe ganz am Anfang in AutoIt. Bin im Moment der totale Noob :>
Wollte das mal zum üben machen. Sobald ich das erstmal hab, werd ich vllt mal versuchen Start / Stop einzubauen  In den Ferien bisschen dahinterklemmen besser mit AutoIt klarzukommen.
|
|
|
10/08/2010, 23:24
|
#11
|
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
|
Quote:
Originally Posted by Belur
 Stehe ganz am Anfang in AutoIt. Bin im Moment der totale Noob :>
Wollte das mal zum üben machen. Sobald ich das erstmal hab, werd ich vllt mal versuchen Start / Stop einzubauen  In den Ferien bisschen dahinterklemmen besser mit AutoIt klarzukommen.
|
start + stop kennste ja jetzt 
Naja ich würd dir empfehlen ersteinmal die grund kenntnisse mit einen guten tutorial zu füllen
|
|
|
10/08/2010, 23:33
|
#12
|
elite*gold: 2
Join Date: Mar 2008
Posts: 1,778
Received Thanks: 1,222
|
Das Return wird am Funktionsende nicht benötigt, streich das mal raus.
Return ist nur zum Übergeben von Rückgabeparameter!
|
|
|
10/08/2010, 23:39
|
#13
|
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
|
Quote:
Originally Posted by pinguin94
Das Return wird am Funktionsende nicht benötigt, streich das mal raus.
Return ist nur zum Übergeben von Rückgabeparameter!
|
ah ja stimmt, nachdem die while schleife beendet wird kommt ja nichts, also wird funktion von alleine beendet, hatte nen denkfehler^^
|
|
|
10/09/2010, 00:26
|
#14
|
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
|
ähm immer wenn etwas mehrmals ähnlich gemacht wird, sollte man das ganze in einer schleife realisieren.
desweiteren wird in den hier geposteten wegen immer eine verkettung von endlosschleifen genutzt, was auf jeden fall verhindert werden sollte. Dazu kommt noch das auch jedes der geposteten beispiele mit sleep arbeitet, wodurch immer der rest vom script blockiert wird.
hier mal der code wie ich ihn aufbauen würde (mal abgesehn vom gui, welches vom ersten post übernommen wurde):
Code:
Dim $btn[5], $combo[5], $input[5], $timer[5], $go[5], $name[2] = ['Stop', 'Start']
GUICreate("gui", 625, 426)
For $i=0 To 4
$go[$i] = False
$btn[$i] = GUICtrlCreateButton('Start', 488, 32+56*$i, 129, 41)
$combo[$i] = GUICtrlCreateCombo("F1", 64, 40+56*$i, 257, 25)
GUICtrlSetData(-1, "F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$input[$i] = GUICtrlCreateInput(1000, 408, 48+56*$i, 57, 21)
Next
GUICtrlCreateGroup("Taste", 16, 16, 385, 305)
GUICtrlCreateGroup("Start/Stop", 472, 16, 153, 305)
GUICtrlCreateGroup("Intervall", 400, 16, 73, 305)
GUISetState(@SW_SHOW)
While 1
$msg = GUIGetMsg()
If $msg=-3 Then Exit
For $i=0 To 4
If $msg=$btn[$i] Then
GUICtrlSetData($btn[$i], $name[$go[$i]])
$go[$i] = Not $go[$i]
EndIf
If $go[$i] And TimerDiff($timer[$i]) > GUICtrlRead($input[$i]) Then
ControlSend("FLYFF", "", "", '{'&GUICtrlRead($combo[$i])&'}')
$timer[$i] = TimerInit()
EndIf
Next
WEnd
Edit:
hab mal der übersicht halber den buttontext jeweils auf Start bzw Stop geändert.
|
|
|
10/09/2010, 01:19
|
#15
|
elite*gold: 0
Join Date: Jul 2009
Posts: 3,441
Received Thanks: 1,473
|
Vllt blick ich den Code in einer Woche xD Ist noch viel Unbekanntes drin.
|
|
|
 |
|
Similar Threads
|
Kleines Problem
10/02/2010 - Metin2 Private Server - 5 Replies
Hallo .
wer kann mir bei meinem hamachi sever helfen gestern (heute morgen) lief er wie geschmiert und jetzt komm ich nicht mehr rein -.- fehler beim verbinden des sever´s wer kann helfen Pn mee pls ;D
PS:Kriegt ein Thx
|
kleines problem
09/08/2010 - Metin2 Private Server - 0 Replies
hi ihr ^^ ich wollte mir nen eigenen server zu testzwecken erstellen aber bekomme ein kleines problem...
PUBLIC_IP: ********* interface de0
hostname first_ch2
PLAYER_SQL: localhost mt2 mt2!@# player
COMMON_SQL: localhost mt2 mt2!@# common
LOG_SQL: localhost mt2 mt2 @!# log
mysql_real_connect: Cant´t connect to local MySql server throug the socket ´/tmp/mysql.sock (2)
Cannot start server while no player sql connected
|
Kleines Problem
05/20/2010 - S4 League - 0 Replies
/Hat sich erledigt !
|
Êin kleines Problem
08/20/2008 - Metin2 Private Server - 5 Replies
Ich hab da ein Problem :
Wenn ich auf´m Pserver spiele wird keine Schrift angezeigt .KEINE!
Wie kann ich das beheben (hab nen WIN98:D)
|
Kleines Problem
10/22/2007 - Flyff - 12 Replies
sorry das ich wegen so einem scheiß ein neuen thread eröffne
aber ohne kann ich nicht mehr richtig hacken:(
ich bekomm keinen window mode mehr hin
egal ob ich es bei optionen änder und dann wieder neu starte
oder es in der neuz.ini änder..
ich habs auch schon neu installiert und alles
aber nix funzt
würde mich also über hilfe freuen =)
|
All times are GMT +1. The time now is 15:47.
|
|