• 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: App and droplet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: App and droplet


  • Subject: Re: App and droplet
  • From: kai <email@hidden>
  • Date: Wed, 18 Oct 2006 19:10:28 +0100


On 14 Oct 2006, at 21:43, Philip Aker wrote:

I think there was a miniscule typo in kai's example. The following works OMM:

So miniscule, Philip, that it continues to escape me - not to mention my Mac (on which it runs as intended).

I can see only 3 differences between your version and mine: a changed variable label, the insertion of an action in the open handler - and a variation of the Boolean test; <if really_quit then quit> vs. <if (really_quit is true) then quit>. Are you saying the former test fails on your machine?

It was the boolean test that did not work when I first tried your script. When I changed that then it worked.

That's curious. My understanding is that, in its simplest form, a conditional statement consists of a Boolean expression and a statement to be
executed if the value of that Boolean expression is true:


if <Boolean expression> then <statement to execute>

If the value of the <Boolean expression> is true, then the <statement to execute> is executed. So this, for example, should result in a dialog:

--------
property p : true
test_expression()
to test_expression()
	if p then display dialog "It's true."
end test_expression
--------

As, of course, should:

--------
property p : true
test_expression()
to test_expression()
	if p is true then display dialog "It's true."
end test_expression
--------

I've known a script to fail in Script Editor on a first attempt (either to run it or to save it) - when it ends with a one-line conditional statement, followed by less than 2 return characters. (There are some exceptions, but they don't include the kind of syntax variation discussed above. And such a failure shouldn't occur when using handlers, anyway.)

If the former syntax doesn't work for you in 10.4.8/Intel, you might want to consider filing a bug report.

---
kai


_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: App and droplet
      • From: Philip Aker <email@hidden>
References: 
 >App and droplet (From: Craig Stanton <email@hidden>)
 >Re: App and droplet (From: kai <email@hidden>)
 >Re: App and droplet (From: Craig Stanton <email@hidden>)
 >Re: App and droplet (From: Philip Aker <email@hidden>)
 >Re: App and droplet (From: kai <email@hidden>)
 >Re: App and droplet (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: App and droplet
  • Next by Date: Re: Move files to the right folder.
  • Previous by thread: Re: App and droplet
  • Next by thread: Re: App and droplet
  • Index(es):
    • Date
    • Thread