• 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
Folder Action and Sub routines (and thanks for help with Zap Gremlins)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Folder Action and Sub routines (and thanks for help with Zap Gremlins)


  • Subject: Folder Action and Sub routines (and thanks for help with Zap Gremlins)
  • From: Dan Doughtie <email@hidden>
  • Date: Fri, 28 Nov 2003 15:48:20 -0500

I9ve got ZAP Gremlins working. I was overlooking the 3with2 instruction
after making command call. if I had realized BBEdit was recordable I would
have saved about 3 hours.

New question.

I9ve written a script that tells BBEdit to clean up some very dirty text. I
extract a copy of the test and grab a range of characters out of the
imbedded header 3set mySlug to characters 65 thru 90 of myText2

Then I have to clean 3mySlug2 up to remove nasty things like colons (:) and
slashes because I will use this slug to name the clean file. But a Unix
system will be sucking this file up so I don9t want question marks and other
nasties.

I use the Apple touted sub-routine in the dev script (on replace_chars) to
sub out those characters.

But when I put this script into a Folder Actions wrapper so it will process
files that hit the folder it fails at this point. Works fine as standalone
script running under Debugger where I manually select the folder and process
the items in the folder. If I commend out the search and replace routine
(and there are no forbidden characters) then it works.

I also tried Acme Replace to clean it up and no luck. I can9t get Bbedit to
do it very well because I only want to affect a certain number of characters
without changing any similar occurrences down in the main text (I strip out
the header before saving).

Can you have multiple sub-routines in a folder action script and if so where
do you put them?
Any suggestions on grabbing a variable and cleaning it up when used in a
folder action?
--

Dan Doughtie
Augusta
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Selected text from Terminal?
  • Next by Date: PowerMail and moving attachments
  • Previous by thread: Selected text from Terminal?
  • Next by thread: PowerMail and moving attachments
  • Index(es):
    • Date
    • Thread