• 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
Another BBEdit/AS question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Another BBEdit/AS question


  • Subject: Another BBEdit/AS question
  • From: Chris Goedde <email@hidden>
  • Date: Thu, 5 Feb 2009 14:36:52 -0600

I've got another question. Is the result below an AS quirk or a BBEdit
quirk or my misunderstanding of something?

tell application "BBEdit"

	set searchOptions to {search mode:literal, starting at top:true}

	set theText to text of front document

	--> This works
	set theResult to replace "x" using "y" searching in text of front
document options searchOptions

	--> This gives error "BBEdit got an error: File not found (MacOS
Error code: -43)"
	set theResult to replace "z" using "y" searching in theText options
searchOptions

end tell

The dictionary for BBEdit says that the replace function syntax is:

set theResult to replace string using string ....

I don't understand why it accepts (text of front document) but not a
variable that's been set to (text of front document).

Thanks!

Chris Goedde
 _______________________________________________
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

  • Follow-Ups:
    • Re: Another BBEdit/AS question
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: unable to execute javascript via applescript in acrobat - result "undefined"
  • Next by Date: Re: Simple AS question (BBEdit)
  • Previous by thread: Re: Finding and shelling out to a sh script in the same
  • Next by thread: Re: Another BBEdit/AS question
  • Index(es):
    • Date
    • Thread