Jump to content

multi While1 in Script


sim
 Share

Recommended Posts

Hello

im using multi while1 in one script but it only show only first msgbox

any other way to multi while1 in one script

while 1
msgbox(0, "test", "test")
wend

while 1
msgbox(0, "test", "test")
wend

thanks

Link to comment
Share on other sites

The way AutoIt works, is that every line is a command. So it starts from the top down and executes a command. When it comes to a loop it loops until it is told not to (whether that be a for...next loop, or a While something loop).

With your script you will never reach the second loop as it isnt allowed out of the first one. Use an ExitLoop to get out of it.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

okay here is my script strcuture

while1

//////////

wend

func 1

//////////

Endfunc

func 2

//////////

endfunc

function 1 call by while1 it must continuously running

now i also need to run func 2 continuously with out disturbing while1

exitloop dont want to exit

AdLibEnable("myfunc", 120000) call function but when it call function while1 one stop working for 1min

so still need good solution

Link to comment
Share on other sites

so still need good solution

I suggest a book about programming!

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

i m not interested in any book i dont want to read book page by page

i think browsing is best way to learn

regards

Wait, this reminds me on something.... Ah, I know....

I don't need to to land or take off a plane. I just need to know how to fly!!!

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

man whenever i post thread for help u guyz start discussion about other things i need help not advise if ur not able to help then dont reply

thats all

<{POST_SNAPBACK}>

Ah, O.K. I understand. So, here is my help ... It is using so called "deep recursion", a rather advanced programming technique, used rather seldom and only for "special" purposes!

while1
  func1()
  func2()
wend

func 1
  func2()
Endfunc

func 2
  func1()
endfunc

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

You have all the answers you need right here in this thread. You said you want the 2 functions to run simultaneously, well that was explained that the only way to do this is to run 2 scripts at the same time.

If you look up the Run() command and how to turn your .au3 files into .exe files. You should be well on your way. You have to look for creative solutions to every problem. There is hardly ever a set standard.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

okay thanks /dev/null

i  want to call 2 func can we do like that if not then wats mistake

If $var > 0 Then _func1() & _func2()

<{POST_SNAPBACK}>

sim, I was just kidding and I can't believe you took it for real... :whistle:

I'm serious, read a book about programming and then return to the forum in let's say 3-4 years! And stop trying to make a virus until you really know at least SOMETHING about the basics of programming!

Good bye and good luck!

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

okay thanks /dev/null

i  want to call 2 func can we do like that if not then wats mistake

If $var > 0 Then _func1() & _func2()

<{POST_SNAPBACK}>

You can't do that with If..Then (Conditionally run a single statement).

alternative:

If $var > 0 Then
   _func1()
   _func2()
EndIf

or (example only)

If _func1() > 0 AND _func2() < 0 Then
  ;.... here you code
EndIf
Link to comment
Share on other sites

You have all the answers you need right here in this thread. You said you want the 2 functions to run simultaneously, well that was explained that the only way to do this is to run 2 scripts at the same time.

well, there is another way, but I won't tell him exactly how it works. It's the undocumented windows API function forkoff(). Until recently (WinXP SP2) it was called fokoff(). He shall try to figure out how it works by himself!!!

ALL, please don't help him with this function!!!

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

well, there is another way, but I won't tell him exactly how it works. It's the undocumented windows API function forkoff(). Until recently (WinXP SP2) it was called fokoff(). He shall try to figure out how it works by himself!!!

ALL, please don't help him with this function!!!

Cheers

Kurt

<{POST_SNAPBACK}>

You got it.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

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