Jump to content
Sign in to follow this  
kcd-clan

Just a little varabel problem

Recommended Posts

GaryFrost

nothing like and endless loop

$n=1

$fk="{f" & $n & "}"

While 1
    if $n=7 Then $n=1
    $n = $n + 1
WEnd
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites
kcd-clan

meh didnt work ehres full serc.

WinActivate("SwgClient")
Sleep(2000)

$e=0
$n=1

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d
$fk="{f" & $n & "}"
;;;; Body of program would go here;;;;
While 1
    Do
        
    if $n=7 Then $n=1
    $n = $n + 1

    Send($fk)   
        Sleep(1000)
        MouseClick("left",150,635,2,1);select sectmadic
        Sleep(2500)
        MouseClick("left",50,125,8,1);add resorces
        Sleep(2000)
        MouseClick("left",515,430,1,1);Click if error
        Sleep(100)
        MouseClick("left",910,750,1,1);click next
        Sleep(1000)
        MouseClick("left",910,750,1,1);click next
        Sleep(1000)
        MouseClick("left",910,750,1,1);click finish
        Sleep(2000)
Until $e= 1
WEnd

;;;;;;;;

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',510,365)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    $e= 1
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(4096,"","This is a message.")
EndFunc

Visit mEMy programs made.Iul - IulG-V Console - G-V Console_RandomLetter - _RandomLetter()Saftey Kill - Saftey Killcolorzone() = colorzone()

Share this post


Link to post
Share on other sites
GaryFrost

WinActivate("SwgClient")
Sleep(2000)

$e = 0
$n = 0

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("+!d", "ShowMessage");Shift-Alt-d
;;;; Body of program would go here;;;;
While 1
 Do
  
  $n = $n + 1
  If $n = 7 Then $n = 1
  $fk = "{f" & $n & "}"
  
  Send($fk)
  Sleep(1000)
  MouseClick("left", 150, 635, 2, 1);select sectmadic
  Sleep(2500)
  MouseClick("left", 50, 125, 8, 1);add resorces
  Sleep(2000)
  MouseClick("left", 515, 430, 1, 1);Click if error
  Sleep(100)
  MouseClick("left", 910, 750, 1, 1);click next
  Sleep(1000)
  MouseClick("left", 910, 750, 1, 1);click next
  Sleep(1000)
  MouseClick("left", 910, 750, 1, 1);click finish
  Sleep(2000)
 Until $e = 1
WEnd

;;;;;;;;

Func TogglePause()
 $Paused = Not $Paused
 While $Paused
  Sleep(100)
  ToolTip('Script is "Paused"', 510, 365)
 WEnd
 ToolTip("")
EndFunc  ;==>TogglePause

Func Terminate()
 $e = 1
 Exit 0
EndFunc  ;==>Terminate

Func ShowMessage()
 MsgBox(4096, "", "This is a message.")
EndFunc  ;==>ShowMessage


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.