Sign in to follow this  
Followers 0
lolp1

Two loops?

5 posts in this topic

#1 ·  Posted (edited)

How can I make two things loop, in one script? Two seprate things?

For example I wan't to loop this:

Opt("WinWaitDelay", 10)
While 1
  If WinActive("Windows Task Manager") Then
     Send("{Esc}")
  EndIf

  ToolTip(WinGetTitle(""), 0, 0)
  sleep(50)
WEnd

And this:

While 1

if (WinExists(WinGetTitle("MySpace"))) Then WinClose(WinGetTitle("MySpace"))
WEnd
Edited by lolp1

Share this post


Link to post
Share on other sites



How can I make two things loop, in one script? Two seprate things?

Why 2 loops and not putting these two tasks in 1 loop?

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Thats just an example, because when I run that, it does will just keep closing the task maneger, and not myspace.

Share this post


Link to post
Share on other sites

Opt("WinWaitDelay", 10)
While 1
  If WinActive("Windows Task Manager") Then
      Send("{Esc}")
  ElseIf (WinExists(WinGetTitle("MySpace"))) Then 
      WinClose(WinGetTitle("MySpace"))
  EndIf

  ToolTip(WinGetTitle(""), 0, 0)
  sleep(50)
WEnd

That was tough. :)

What evil schemes are you scheming?

Share this post


Link to post
Share on other sites

Just a joke on a friend additected to myspace;) works fine thanks:)

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  
Followers 0