Jump to content

how to make sleep in some function but not interrupted other func???


Recommended Posts

hi, 

how to make sleep in some function but not interrupted other func???

my code is something like this

While 1;
   phase1() ; go to some function to do stuff
   sleep(10)
   phase2()
   sleep(10)
   phase3()
   sleep(10)
   phase4()
   sleep(10)
Else
Sleep(10);pause for 10 miliseconds
Wend

Func phase1()
;do whatever you need the program to do
EndFunc

Func phase2()
;;;doiing some stuff
sleep(60000)
EndFunc

Func phase3()
;do whatever you need the program to do
EndFunc

Func phase4()
;doin some stuff
endfunc

 

 

 

i want to loop phase1 to phase 4 but its stuck because sleep in Phase 2..

thx in adv

 

 

Edited by Tripoz
correction code
Link to comment
Share on other sites

Maybe someone has some magic for you that I am not aware of.  Here are a few observations....

1.  This code is pretty useless for us to be able to actually help, in my opinion.

2.  You are calling Phase 4 with the Phase 2 function?

3.  You are asking the script to sleep for what looks like 1min.  What do you want it to do instead?  Your interactions here are very unclear. 

4.  My guess is you could probably accomplish what you want with an Adlib Function, but again...not clear.

Link to comment
Share on other sites

Maybe someone has some magic for you that I am not aware of.  Here are a few observations....

1.  This code is pretty useless for us to be able to actually help, in my opinion.

2.  You are calling Phase 4 with the Phase 2 function?

3.  You are asking the script to sleep for what looks like 1min.  What do you want it to do instead?  Your interactions here are very unclear. 

4.  My guess is you could probably accomplish what you want with an Adlib Function, but again...not clear.

sorry bro..my mistake... i was corrected my code

 

Link to comment
Share on other sites

what is the purpose of the Sleep?, Simply to get it past the 30min mark on the clock or something else?

that phase4 is just for "refresh" some web every couples minute

the other code doin some other stuff..but the whole code cant wait the web refreshed..

what i must to do then?

Link to comment
Share on other sites

my guess is you are trying to do some bot / game automation that is against the forum rules.  I have asked you very specific questions and you have given me very UNspecific answers.  Now.....

1.  What is the purpose of the SLEEP?  I didn't ask about Phase 4.

2. Post the code so that we can help you more accurately.  I highly doubt the more elite members of this forum will be interested in guessing games when they do attempt to help you.

Link to comment
Share on other sites

my guess is you are trying to do some bot / game automation that is against the forum rules.  I have asked you very specific questions and you have given me very UNspecific answers.  Now.....

1.  What is the purpose of the SLEEP?  I didn't ask about Phase 4.

2. Post the code so that we can help you more accurately.  I highly doubt the more elite members of this forum will be interested in guessing games when they do attempt to help you.

relax bro..dont judge before u know it exactly...

im answered ur question already . the sleep in phase 4 is to wait 60sec after that it will refresh the browser. (only once in couple minute)

if u asked me sleep(10) its just for delay so it will not consume my cpu

 

i want to learn in here n not begging u a whole code... even its purpose to bot or what ever that against the forum (im not playing game too bro).

i just asked the logic for doing that (not a whole code).. if u dont want to help me its okey bro (no offense).. but dont judge the people u dont know for sure.

CMIIW

Regards,

 

note:

my english is so bad..so pardon me if im wrong with spell or words.

Edited by Tripoz
Link to comment
Share on other sites

If your code in first post is similar to the actual code you can do it like this:

While 1;
  phase1() ; go to some function to do stuff
  sleep(10)
  phase2()
  phase3()
  sleep(10)
  phase4()
  sleep(10)
WEnd

Func phase1()
;do whatever you need the program to do
EndFunc

Func phase2()
  Local Static $iCounter = 0
  $iCounter += 1
  If $iCounter < 6000 Then Return sleep(10)
  $iCounter = 0
  ;;;doiing some stuff
  sleep(10)
EndFunc

Func phase3()
;do whatever you need the program to do
EndFunc

Func phase4()
;doin some stuff
EndFunc

You can also use AdlibRegister to execute phase2(). That's probably better.

Edited by LarsJ
AdlibRegister
Link to comment
Share on other sites

If your code in first post is similar to the actual code you can do it like this:

While 1;
  phase1() ; go to some function to do stuff
  sleep(10)
  phase2()
  phase3()
  sleep(10)
  phase4()
  sleep(10)
WEnd

Func phase1()
;do whatever you need the program to do
EndFunc

Func phase2()
  Local Static $iCounter = 0
  $iCounter += 1
  If $iCounter < 6000 Then Return sleep(10)
  $iCounter = 0
  ;;;doiing some stuff
  sleep(10)
EndFunc

Func phase3()
;do whatever you need the program to do
EndFunc

Func phase4()
;doin some stuff
EndFunc

You can also use AdlibRegister to execute phase2(). That's probably better.

thats what i searching for bro..

thx alot..

case closed.

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