Re: varibles in handler
Re: varibles in handler
- Subject: Re: varibles in handler
- From: Robert Poland <email@hidden>
- Date: Mon, 17 Jan 2011 16:15:12 -0700
Mark,
In the line "my setDelimiters(originalDelimiters)" originalDelimiters is a variable. It seems to be totally ignored by the handler.
On Jan 17, 2011, at 3:38 PM, Mark J. Reed wrote:
I don't understand what you're talking about with variables in
handlers, or what problem you're trying to solve?
On Mon, Jan 17, 2011 at 5:17 PM, Robert Poland <email@hidden> wrote:
> Hi,
>
> Since this use of a variable in a handler call apparently is not allowed, why not;
>
> my setDelimiters(originalDelimiters)
>
> -- Complete test script
> global applicationName, originalDelimiters
>
> set AppleScript's text item delimiters to ""
> set applicationName to "GraphicConverter.app"
> my setDelimiters(".")
> set applicationName to my fixLinkToGraphicConverter(applicationName) -- seperate GraphicConverter6 & GraphicConverter7
> my setDelimiters(originalDelimiters)
>
> tell application "System Events"
> activate
> display dialog applicationName & return & "-" & AppleScript's text item delimiters & "-" default button 1
> end tell
>
> on setDelimiters(newDelimiter)
> set originalDelimiters to AppleScript's text item delimiters
> set AppleScript's text item delimiters to newDelimiter -- parse off ".app"
> -- set AppleScript's text item delimiters to originalDelimiters
> end setDelimiters
>
> on fixLinkToGraphicConverter(applicationName) -- seperate GraphicConverter6 & GraphicConverter7
> my setDelimiters(".")
> set applicationName to (first text item of applicationName)
> my setDelimiters(originalDelimiters)
> return applicationName
> end fixLinkToGraphicConverter
>
>
> Robert Poland - Fort Collins, CO
>
>
>
> _______________________________________________
> 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
>
--
Mark J. Reed <email@hidden>
Robert Poland - Fort Collins, CO
_______________________________________________
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