• 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: varibles in handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: varibles in handler


  • Subject: Re: varibles in handler
  • From: "Stockly, Ed" <email@hidden>
  • Date: Mon, 17 Jan 2011 18:16:35 -0600
  • Acceptlanguage: en-US
  • Thread-topic: varibles in handler

>>> Unless I'm totally confused, the variable originalDelimiters is defined.

Yes, it is defined in a couple of the handlers.

>I think the issue is that the line "set AppleScript's text item delimiters to
newDelimiter" won't work with a variable is place of text.

That's not the case at all. We've been able to set and change those values
using variables from the beginning. Text item delimiters are a property of
appleScript.

_____________
set commaSpace to ", "
set AppleScript's text item delimiters to {"!"}
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to commaSpace
set myList to text items of "Hello, world, good, night, moon"
set AppleScript's text item delimiters to oldDelims
choose from list myList
set myText to myList as text
display dialog myText
______________

In fact, your script as posted, compiles and runs on my mac.  If you're
using a runhandler, and the global is declared inside the run handler, then
you also need to declare the global inside the handler.  Just to be safe, if
you're using a global inside a hander, go ahead and declare it.

Anyway, I'm confused about what the issue is here.


ES

 _______________________________________________
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: varibles in handler (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: Top-posting [ was Variable names]
  • Next by Date: Re: varibles in handler
  • Previous by thread: Re: varibles in handler
  • Next by thread: Re: varibles in handler
  • Index(es):
    • Date
    • Thread