• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Every running application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Every running application


  • Subject: Re: Every running application
  • From: Steve Thompson <email@hidden>
  • Date: Sat, 26 Jul 2003 00:46:49 +0100

On Saturday, July 26, 2003, at 12:31 am, Craig Sutherland wrote:

> Tell app "Finder"
> set listProc to processes whose visible is true
> end tell

OK, thanks for that. However, that was one of the ones I tried and I
didn't get the expected result. Basically, this script

tell application "Finder"
set runningApps to processes whose visible is true
end tell

repeat with i from 1 to (count of runningApps)
tell (item i of runningApps)
activate
display dialog i
end tell
end repeat

would only activate the Finder:

tell application "Finder"
get every process whose visible = true
end tell
tell application "System Events"
get every process whose visible = true
--> {
application process "Finder",
application process "iSync",
application process "Script Debugger",
application process "Mail"
}
end tell
tell application "Finder"
activate
display dialog 1
--> {
button returned:"OK"
}
activate
display dialog 2
--> {
button returned:"OK"
}
activate
display dialog 3
--> {
button returned:"OK"
}
activate
display dialog 4
--> {
button returned:"OK"
}
end tell


In other words, even though the tell block is *inside* the repeat loop,
the tell block is executed first. What am I missing?

Steve
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Every running application
      • From: Andrew Oliver <email@hidden>
  • Prev by Date: Re: Script Editor 2.0 beta 2
  • Next by Date: do JavaScript -- giving it a variable
  • Previous by thread: Re: Every running application
  • Next by thread: Re: Every running application
  • Index(es):
    • Date
    • Thread