Re: AppleScript-Users Digest, Vol 4, Issue 6
Re: AppleScript-Users Digest, Vol 4, Issue 6
- Subject: Re: AppleScript-Users Digest, Vol 4, Issue 6
- From: deivy petrescu <email@hidden>
- Date: Wed, 3 Jan 2007 21:47:39 -0500
On Jan 3, 2007, at 13:40, Stockly, Ed wrote:
<snip>...
You see if I run this script on my mac, when there is NO Finder
window open...
tell application "Finder"
activate
tell Finder window 1 to if exists then
set current view to list view
--do other stuff
end if
end tell
Then the script actually opens a new window, but doesn't execute
any of the other commands within the freaky tell/if block.
Which, by your analogy would be like telling your son to turn off
the light in his room if it's on, and having him turn it on but not
telling the younger son to turn them off, which is not the intended
result.
As I said before that's a pretty nifty construct, but I'm not sure
how reliable it is and I certainly wouldn't recommend it for
ordinary AppleScripters.
ES
Actually Ed, I am with kai here.
It works reliably.
Using my analogy above, I'd read your statements as follows:
tell "older son"
tell "younger son" if he is there then
turn the lights on
...
And this is what happens in my house. If younger son is not there, he
will not show up, but if he is, the lights will be turned off.
And, they better be turned of, the kids know what happens if they
don't listen to me... :)
Deivy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden