AppleScript's text item delimiters have stopped working
AppleScript's text item delimiters have stopped working
- Subject: AppleScript's text item delimiters have stopped working
- From: tom wible <email@hidden>
- Date: Sun, 04 Jul 2010 07:07:08 -0400
i have a top-level handler:
to extractValFrom(txt, delim)
log "extractValFromDelim(" & delim & ")"
set AppleScript's text item delimiters to {delim}
set val to item 2 of txt
set AppleScript's text item delimiters to DEFAULT_TID -- previously set
log "extractValFrom(" & txt & ")=" & val & "="
return val
end extractValFrom
which i call thusly:
extractValFrom("run longer =30", "=")
and there's what i get:
(*extractValFromDelim(=)*)
(*extractValFrom(run longer =30)=u=*)
this used to work, until i implemented s.o. constructors:-(
_______________________________________________
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