• 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: Handler Call "can't continue" Illustrator CS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Handler Call "can't continue" Illustrator CS


  • Subject: RE: Handler Call "can't continue" Illustrator CS
  • From: "Andrew Turner" <email@hidden>
  • Date: Mon, 10 Oct 2005 06:20:22 -0400
  • Thread-topic: Handler Call "can't continue" Illustrator CS

The problem is, when you run the script it's looking for a handler
called "replace_chars" that belongs to the Finder. To get it to work,
you should change that line to

 set x to my replace_chars(ourText, findIt, replaceItWith)

By the way, you seem to be throwing away the result of the replacement.
Replace_chars will be working on a copy of the strings, so nothing gets
changed.

HTH

-A-


-----Original Message-----
From: Natalie Lambert [mailto:email@hidden]
Sent: 07 October 2005 17:55
To: email@hidden
Subject: Handler Call "can't continue" Illustrator CS

I'm having a bad day. I just started a new script to find and replace
text in AI CS and right off the bat I'm having issues. the first part of
the script seems to do the right thing but then it errors on the handler
with "Can't Continue". I can't find a reference to figure out what is
up.

Is it the "ourText" variable? Maybe it doesn't like the list. Even when
I "hard-wire" the variable it still doesn't work.

Anyone? Anyone?

Does anyone already have or know of  a find and replace  (text) script
for illustrator? i can't find one.



tell application "Illustrator CS"
	activate
	tell document 1
		set ourText to contents of every text frame as list

		set findIt to "JobNumber" as text
		set replaceItWith to "5ABSP-279" as text
		tell application "Finder"
			set x to replace_chars(ourText, findIt,
replaceItWith)
			return ourText
		end tell
	end tell
end tell

on replace_chars(this_text, search_string,
replacement_string)
	set AppleScript's text item delimiters to the search_string
	set the item_list to every text item of this_text
	set AppleScript's text item delimiters to the replacement_string
	set this_text to the item_list as string
	set AppleScript's text item delimiters to ""
	return this_text
end replace_chars

ntle




__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Sending AppleScript to yourself
  • Next by Date: Re: recursion depth
  • Previous by thread: Re: Handler Call "can't continue" Illustrator CS
  • Next by thread: The Save command will replace, without asking
  • Index(es):
    • Date
    • Thread