Jump to content

Two loops?


lolp1
 Share

Recommended Posts

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
Link to comment
Share on other sites

  • Developers

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?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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?

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