Sign in to follow this  
Followers 0
Misha

Little Problem

2 posts in this topic

#1 ·  Posted (edited)

darn it

Func AutoPick ()
    TrayTip( "AutoPicker", "AutoPicker Activated.", 4, 4)
    GuiCreate( "AutoPicker" ,300,100)
    $EditCreate=GUICtrlCreateEdit( "Delay" , 200, 50)
    GUISetState()
    while 1 
    $Edit=GuiCtrlRead( $editCreate )
    if $editCreate > 0 then
    $AutoPicker = 1
    while 1
        Sleep($edit)
        Send( " ", 1)
    WEnd
Wend
EndFunc

for a game..and it doesnt work says I am missing a while :S or a wend

Edited by Misha

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Func AutoPick ()

TrayTip( "AutoPicker", "AutoPicker Activated.", 4, 4)

GuiCreate( "AutoPicker" ,300,100)

$EditCreate=GUICtrlCreateEdit( "Delay" , 200, 50)

GUISetState()

while 1

$Edit=GuiCtrlRead( $editCreate )

if $editCreate > 0 then

$AutoPicker = 1

while 1

Sleep($edit)

Send( " ", 1)

WEnd

Wend

EndFunc

Should be:
Func AutoPick ()
    TrayTip( "AutoPicker", "AutoPicker Activated.", 4, 4)
    GuiCreate( "AutoPicker" ,300,100)
    $EditCreate=GUICtrlCreateEdit( "Delay" , 200, 50)
    GUISetState()
    while 1
    $Edit=GuiCtrlRead( $editCreate )
    if $editCreate > 0 then
    $AutoPicker = 1
    while 1
        Sleep($edit)
        Send( " ", 1)
    WEnd
    EndIf
Wend
EndFunc
I don't know where you want the EndIf, but I put it after the first WEnd Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0