varibles in handler
varibles in handler
- Subject: varibles in handler
- From: Robert Poland <email@hidden>
- Date: Mon, 17 Jan 2011 15:17:04 -0700
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