• 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: Very Irritating Open Handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Very Irritating Open Handler


  • Subject: Re: Very Irritating Open Handler
  • From: Tommy Bollman <email@hidden>
  • Date: Tue, 05 Apr 2011 09:45:40 +0200

Hello Luther

Continuing on Axels elaboration:


Try adding this to your handler:

on quit
	display dialog "Hi im trapped"
end quit

This is a parallell to what is described about the run handler in the aforementioned book.

You could have a system of some flags, which identifies the situation, and some logic in the on open location handler  which lets you reenter it from the on quit handler given  that the circumstances (conditions)  are right. In order to continue etc.

Such a scheme is laborious, but it should work.



Den 4. apr. 2011 kl. 22.40 skrev Axel Luttgens:

> Le 4 avr. 2011 à 17:13, Luther Fuller a écrit :
>
>> [...]
>>
>> I tried this. (Interrupted by a Sat afternoon power outage.)
>> As far as I can determine, it does not trap anything.
>> Here is what I tried, with comments ...
>>
>> [...]
>>
>> on open location WL
>> 	display dialog "open location" -- this displays correctly for a .webloc
>> 	display dialog WL -- this displays correctly for a .webloc
>> 	display dialog "finished" -- this displays correctly for a .webloc
>> 	error "open loc" -- but no error is returned. Should return -2700 error.
>> end open location
>>
>> The application simply dies within the open location handler without returning.
>>
>> [...]
>
> Hello Luther,
>
> So, in the case of a .webloc, the open location handler gets invoked as announced; this means that if you don't insert a:
> 	continue open location
> statement within that handler, the event would indeed be trapped.
>
> Now, I'm not sure whether issuing an error statement from within the handler is a good idea; what happens without that statement?
>
> 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
>

Best regards



Tommy Bollman
--------------------------------------------------------------------------------------------------
Mollison's Bureaucracy Hypothesis:
	If an idea can survive a bureaucratic review
	and be implemented it wasn't worth doing.

 _______________________________________________
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: 
 >Re: Very Irritating Open Handler (From: Axel Luttgens <email@hidden>)
 >Re: Very Irritating Open Handler (From: Luther Fuller <email@hidden>)
 >Re: Very Irritating Open Handler (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Renaming files
  • Next by Date: Re: Very Irritating Open Handler
  • Previous by thread: Re: Very Irritating Open Handler
  • Next by thread: Mail Rules and getting ID number
  • Index(es):
    • Date
    • Thread