• 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: Image events: How do I cut out a region
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Image events: How do I cut out a region


  • Subject: Re: Image events: How do I cut out a region
  • From: Axel Luttgens <email@hidden>
  • Date: Thu, 17 Apr 2008 14:13:12 +0200

Le 17 avr. 08 à 08:58, Skeeve a écrit :
Axel Luttgens wrote:
This is very likely because your script tries to write back values of global entities, such as global variables or properties.
That's what I want to achieve.


Sorry, it seems I misunderstood your question... :-(


The localitity/globality of variables in the run handler (either implicit or explicit) is somewhat surprising...
Try to replace your "on run" handler with a custom "on DoIt()" handler, and call "DoIt()" from within your run handler; this should make variables such as "clicked" local ones.
So in a run handler they are not local?

Well, let's try this one:

	on Test()
		global V
		display dialog V
	end Test

	on run
		set V to 1
		Test()
	end run

and compare it to:

	on Test()
		global V
		display dialog V
	end Test

	on DoIt()
		set V to 1
	end DoIt

	on run
		DoIt()
		Test()
	end run


Unless I'm wrong, your script does not change properties values, so the above should be sufficient.
It does! sframe, eframe and last_folder are properties I change.


Again, sorry; I only had a quick look to your (rather long) script, and I missed those ones...

So, back to your question:

Le 15 avr. 08 à 21:08, Skeeve a écrit :
[...]

One question in regards to that: I saved it as a program bundle and always recveive an error when it finishes because it cant write back the changed properties. If anyone has an idea how to solve that, please tell me...

By "program bundle", did you mean "application bundle"?
What are the ownership/permissions on the bundle (especially on its Contents/Resources/Scripts/main.scpt component)?
Which version of OS X are you running? And could you please describe with more details the way you "receive an error"?


Axel _______________________________________________
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/archives/applescript-users

This email sent to email@hidden
References: 
 >Image events: How do I cut out a region (From: Skeeve <email@hidden>)
 >Re: Image events: How do I cut out a region (From: Skeeve <email@hidden>)
 >Re: Image events: How do I cut out a region (From: "Pat Cannon" <email@hidden>)
 >Re: Image events: How do I cut out a region (From: Skeeve <email@hidden>)
 >Re: Image events: How do I cut out a region (From: "Pat Cannon" <email@hidden>)
 >Re: Image events: How do I cut out a region (From: Skeeve <email@hidden>)
 >Re: Image events: How do I cut out a region (From: Axel Luttgens <email@hidden>)
 >Re: Image events: How do I cut out a region (From: Skeeve <email@hidden>)

  • Prev by Date: RE: Applescript ToDo
  • Next by Date: Re: Image events: How do I cut out a region
  • Previous by thread: Re: Image events: How do I cut out a region
  • Next by thread: Re: Image events: How do I cut out a region
  • Index(es):
    • Date
    • Thread