• 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
Question about handler efficiency
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question about handler efficiency


  • Subject: Question about handler efficiency
  • From: Bill Planey <email@hidden>
  • Date: Mon, 5 Feb 2001 20:20:52 -0600

I have a question about handlers. I have a variety of handlers that load
for different search/replace circumstances in MSWord (the handlers make
calls to Visual Basic, and since those calls are by nature very wordy,
they save me a lot of trouble.

My question is this: would it be smart/efficient to combine several of
these handlers into the same handler (say "TextHandler"), just with
different tags calling the different appropriate portion. For example:

on ReplaceText(oldText, newText)
-- do stuff, invoking oldText and newText
end ReplaceText

on ReplaceCase(oldText, newText)
-- do stuff, invoking oldText and newText
end ReplaceCase

...so that in the Script which uses TextHandler its different parts could
be invoked thus:

tell TextHandler
ReplaceText("FindString", "ReplaceString") -- where "FindString" and
-- "ReplaceString" are stated in the script
ReplaceText("FindString", "ReplaceString")
ReplaceText("FindString", "ReplaceString") -- etc.
end tell

tell TextHandler
ReplaceCase("FindString", "ReplaceString")
ReplaceCase("FindString", "ReplaceString")
ReplaceCase("FindString", "ReplaceString") -- etc.
end tell

...or would it be better to keep them as they are now, separated into
different scripts, and loaded separately (which takes several more
statements to articulate)?

Thanks,

Bill Planey


  • Prev by Date: Re: Extracting Text from a PDF or EPS
  • Next by Date: Script activaton
  • Previous by thread: RE: sub-folders and file listing
  • Next by thread: Re: Question about handler efficiency
  • Index(es):
    • Date
    • Thread