Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 15:46

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Kleines Problem

Discussion on Kleines Problem within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
Belur's Avatar
 
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"625426192124)
$Button1 GUICtrlCreateButton("Button2"48888129410)
$Button2 GUICtrlCreateButton("Button1"48832129410)
$Button3 GUICtrlCreateButton("Button3"488200129410)
$Button4 GUICtrlCreateButton("Button4"488144129410)
$Button5 GUICtrlCreateButton("Button5"488256129410)
$Combo1 GUICtrlCreateCombo("Combo1"644025725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo2 GUICtrlCreateCombo("Combo2"649625725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo3 GUICtrlCreateCombo("Combo1"6415225725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo4 GUICtrlCreateCombo("Combo1"6420825725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo5 GUICtrlCreateCombo("Combo1"6426425725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Group1 GUICtrlCreateGroup("Taste"1616385305)
$Group3 GUICtrlCreateGroup("Interwall"400241297)
GUICtrlCreateGroup("", -99, -9911)
GUICtrlCreateGroup("", -99, -9911)
$Group2 GUICtrlCreateGroup("Start"47216153305)
GUICtrlCreateGroup("", -99, -9911)
$Input1 GUICtrlCreateInput("Input1"408965721)
$Input2 GUICtrlCreateInput("Input1"4082645721)
$Input3 GUICtrlCreateInput("Input1"4081525721)
$Input4 GUICtrlCreateInput("Input1"4082085721)
$Input5 GUICtrlCreateInput("Input1"408485721)
$Group4 GUICtrlCreateGroup("Interwall"4001673305)
GUICtrlCreateGroup("", -99, -9911)
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
Belur is offline  
Old 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"625426192124)

$Button1 GUICtrlCreateButton("1"48832129410)
$Button2 GUICtrlCreateButton("2"48888129410)

$Button3 GUICtrlCreateButton("3"488144129410)
$Button4 GUICtrlCreateButton("4"488200129410)
$Button5 GUICtrlCreateButton("5"488256129410)


$Combo1 GUICtrlCreateCombo("Combo1"644025725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo2 GUICtrlCreateCombo("Combo2"649625725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo3 GUICtrlCreateCombo("Combo1"6415225725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo4 GUICtrlCreateCombo("Combo1"6420825725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo5 GUICtrlCreateCombo("Combo1"6426425725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Group1 GUICtrlCreateGroup("Taste"1616385305)
$Group3 GUICtrlCreateGroup("Interwall"400241297)
GUICtrlCreateGroup("", -99, -9911)
GUICtrlCreateGroup("", -99, -9911)
$Group2 GUICtrlCreateGroup("Start"47216153305)

$Input1 GUICtrlCreateInput("1"408485721)
GUICtrlCreateGroup("", -99, -9911)
$Input2 GUICtrlCreateInput("2"408965721)
$Input3 GUICtrlCreateInput("3"4081525721)
$Input4 GUICtrlCreateInput("4"4082085721)
$Input5 GUICtrlCreateInput("5"4082645721)


$Group4 GUICtrlCreateGroup("Interwall"4001673305)
GUICtrlCreateGroup("", -99, -9911)
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"625426192124)

$Button1 GUICtrlCreateButton("1"48832129410)
$Button2 GUICtrlCreateButton("2"48888129410)

$Button3 GUICtrlCreateButton("3"488144129410)
$Button4 GUICtrlCreateButton("4"488200129410)
$Button5 GUICtrlCreateButton("5"488256129410)


Global 
$Combo1 GUICtrlCreateCombo("Combo1"644025725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo2 GUICtrlCreateCombo("Combo2"649625725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo3 GUICtrlCreateCombo("Combo1"6415225725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo4 GUICtrlCreateCombo("Combo1"6420825725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo5 GUICtrlCreateCombo("Combo1"6426425725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Group1 GUICtrlCreateGroup("Taste"1616385305)
$Group3 GUICtrlCreateGroup("Interwall"400241297)
GUICtrlCreateGroup("", -99, -9911)
GUICtrlCreateGroup("", -99, -9911)
$Group2 GUICtrlCreateGroup("Start"47216153305)

$Input1 GUICtrlCreateInput("1"408485721)
GUICtrlCreateGroup("", -99, -9911)
$Input2 GUICtrlCreateInput("2"408965721)
$Input3 GUICtrlCreateInput("3"4081525721)
$Input4 GUICtrlCreateInput("4"4082085721)
$Input5 GUICtrlCreateInput("5"4082645721)


$Group4 GUICtrlCreateGroup("Interwall"4001673305)
GUICtrlCreateGroup("", -99, -9911)
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
maxi39 is offline  
Thanks
1 User
Old 10/08/2010, 22:32   #3


 
dacx's Avatar
 
elite*gold: 558
The Black Market: 296/0/0
Join Date: Jan 2010
Posts: 22,776
Received Thanks: 10,538
Kannst du mir bitte verraten, wo der Fehler war?
dacx is offline  
Old 10/08/2010, 22:36   #4
 
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
Quote:
Originally Posted by 4LPH4! View Post
Kannst du mir bitte verraten, wo der Fehler war?
guck dir doch erstma die Variabeln an:

bsp:

PHP Code:
$Input1 GUICtrlCreateInput("Input1"408965721
PHP Code:
$Button1 GUICtrlCreateButton("Button2"48888129410

PHP Code:
Case $Button2
            
While 1=1
            
If GUICtrlRead($Combo1) = "F1" Then ControlSend("FLYFF""""""{F1}")
            
Sleep (GUICtrlRead($Input1)) 
maxi39 is offline  
Old 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"625426192124)

$Button1 GUICtrlCreateButton("1"48832129410)
$Button2 GUICtrlCreateButton("2"48888129410)

$Button3 GUICtrlCreateButton("3"488144129410)
$Button4 GUICtrlCreateButton("4"488200129410)
$Button5 GUICtrlCreateButton("5"488256129410)


Global 
$Combo1 GUICtrlCreateCombo("Combo1"644025725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo2 GUICtrlCreateCombo("Combo2"649625725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo3 GUICtrlCreateCombo("Combo1"6415225725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo4 GUICtrlCreateCombo("Combo1"6420825725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo5 GUICtrlCreateCombo("Combo1"6426425725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Group1 GUICtrlCreateGroup("Taste"1616385305)
$Group3 GUICtrlCreateGroup("Interwall"400241297)
GUICtrlCreateGroup("", -99, -9911)
GUICtrlCreateGroup("", -99, -9911)
$Group2 GUICtrlCreateGroup("Start"47216153305)

$Input1 GUICtrlCreateInput("1"408485721)
GUICtrlCreateGroup("", -99, -9911)
$Input2 GUICtrlCreateInput("2"408965721)
$Input3 GUICtrlCreateInput("3"4081525721)
$Input4 GUICtrlCreateInput("4"4082085721)
$Input5 GUICtrlCreateInput("5"4082645721)


$Group4 GUICtrlCreateGroup("Interwall"4001673305)
GUICtrlCreateGroup("", -99, -9911)
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???
maxi39 is offline  
Old 10/08/2010, 22:47   #6
 
Belur's Avatar
 
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 :<
Belur is offline  
Old 10/08/2010, 22:52   #7
 
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
Quote:
Originally Posted by Belur View Post
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
maxi39 is offline  
Thanks
1 User
Old 10/08/2010, 23:03   #8
 
Belur's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 3,441
Received Thanks: 1,473
Ahh Verstehe. Danke dir.

Nur wo soll das Return hin?
Belur is offline  
Old 10/08/2010, 23:14   #9
 
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
Quote:
Originally Posted by Belur View Post
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 View Post
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"625426192124)

$Button1 GUICtrlCreateButton("1"48832129410)
$Button2 GUICtrlCreateButton("2"48888129410)

$Button3 GUICtrlCreateButton("3"488144129410)
$Button4 GUICtrlCreateButton("4"488200129410)
$Button5 GUICtrlCreateButton("5"488256129410)


Global 
$Combo1 GUICtrlCreateCombo("Combo1"644025725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo2 GUICtrlCreateCombo("Combo2"649625725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo3 GUICtrlCreateCombo("Combo1"6415225725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo4 GUICtrlCreateCombo("Combo1"6420825725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Combo5 GUICtrlCreateCombo("Combo1"6426425725)
GUICtrlSetData(-1"F1|F2|F3|F4|F5|F6|F7|F8|F9|F10|F11|F12")
$Group1 GUICtrlCreateGroup("Taste"1616385305)
$Group3 GUICtrlCreateGroup("Interwall"400241297)
GUICtrlCreateGroup("", -99, -9911)
GUICtrlCreateGroup("", -99, -9911)
$Group2 GUICtrlCreateGroup("Start"47216153305)

$Input1 GUICtrlCreateInput("1"408485721)
GUICtrlCreateGroup("", -99, -9911)
$Input2 GUICtrlCreateInput("2"408965721)
$Input3 GUICtrlCreateInput("3"4081525721)
$Input4 GUICtrlCreateInput("4"4082085721)
$Input5 GUICtrlCreateInput("5"4082645721)


$Group4 GUICtrlCreateGroup("Interwall"4001673305)
GUICtrlCreateGroup("", -99, -9911)
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???
maxi39 is offline  
Thanks
1 User
Old 10/08/2010, 23:20   #10
 
Belur's Avatar
 
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.
Belur is offline  
Thanks
1 User
Old 10/08/2010, 23:24   #11
 
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
Quote:
Originally Posted by Belur View Post
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
maxi39 is offline  
Old 10/08/2010, 23:33   #12
 
PenGuin :O's Avatar
 
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!
PenGuin :O is offline  
Thanks
1 User
Old 10/08/2010, 23:39   #13
 
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
Quote:
Originally Posted by pinguin94 View Post
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^^
maxi39 is offline  
Old 10/09/2010, 00:26   #14
 
lolkop's Avatar
 
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.
lolkop is offline  
Thanks
2 Users
Old 10/09/2010, 01:19   #15
 
Belur's Avatar
 
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.
Belur is offline  
Reply


Similar Threads 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.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.