Jump to content

Little Problem


Misha
 Share

Recommended Posts

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
Link to comment
Share on other sites

  • Moderators

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

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...