Jump to content

Need assistance with loops


JeEnYuS
 Share

Recommended Posts

Alright so im new to this. Basically I am writing a basic script for just clicking/dragging on the screen and i want the whole script to loop but inside that loop i want another section to loop by itself, if you catch my drift. Example, my script movements are a, b, c, and d. I want the whole script to continuous loop but say every 20 minutes i want c and d to loop inside this loop. Do you get what I'm saying? I tried to look for something similar to this in the forum but i can't seem to find it.

Link to comment
Share on other sites

I'm a little confused but would this work for you?

$begin = TimerInit()
While 1
    Sleep(100)
    If TimerDiff($begin) > 5000 Then
        MsgBox(0, "", "5 seconds have passed")
        $begin = TimerInit()
    EndIf
WEnd

Not quite sure if thats the best way to do it but I'm not totally sure what you want to do.

PS. Welcome to the foum!

Edited by someone
While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd
Link to comment
Share on other sites

forgive me if i do this wrong..like i said this is my first time to this forum as actually playing with scripts..so im sure these scripts extremely..uh..noobie lol

i am going to merge these 2 scripts once i finish the main one

this is the main script

Run("C:/Program Files/Guild Wars/gw.Exe" )
Sleep(10000)
MouseClick( "left", 908, 415)
Sleep(90000)
MouseClick( "left", 853, 557)
MouseClick( "left", 853, 557) 
Sleep(1000)
MouseClickDrag( "left", 532, 391, 640, 400)
Sleep(1000)
MouseClick("left", 272, 173)
Sleep(1000)
MouseClick("left" 882, 561)
Sleep(1000)
MouseClick("left", 656, 408)
Sleep(1000)oÝ÷ ÚØb²+-ërÝj¼¬r¸©¶,ÛaÊ'zÚ+ºw¯z¼¶Òh§º×¬jëh×6Run("c:/program files/guild wars/gw.exe")
Sleep(10000)
Send( "g" )
Sleep(1000)
MouseClick( "left", 361, 137)
Sleep(20000)
Send( "g" )
Sleep(1000)
MouseClick( "left", 596, 165)
Sleep(10000)
Send( "v" )
Send( "{SPACE}" )  
Sleep(5000)
MouseClick( "left", 543, 485)
Sleep(1000)
MouseClick( "left", 526, 435)
Send( "g")
sleep(1000)
MouseClick( "left", 361, 137)
Sleep(10000)
Send("g")
Sleep(1000)

so basically i want the main script looping consistently but every 20 minutes i want the secondary script to kick in for me..i know this isn't a very technical script..im still learning this stuff :P..i hope this helps to help me out..i wish to learn a lot more of scripting...i find it rather fun so far :)

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