• 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
loading a subroutine properly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

loading a subroutine properly


  • Subject: loading a subroutine properly
  • From: Bill Planey <email@hidden>
  • Date: Thu, 1 Feb 2001 17:14:24 -0600

Simply because I wanted to modularize part of one of my scripts, I copied
and pasted a certain chunk of code into another compiled script. The
mother
script makes calls to handlers and the daughter script makes calls to some
of the same handlers (in other words, some of my handlers are called by
both
routine and sub-routine). I copied the variables from the mother script
(those
which identify the location of the handlers - the "set" statements which
spell
their location out). I am sure there is some way to avoid this
redundancy, but
that is not my main concern (unless it might be the cause of my main
problem).

My subroutine is basically:

on run

set handlers -- create variable and declare locations
tell application "Microsoft Word"
do stuff -- using handlers
end tell

end run

...and this subroutine is called in the mother script this way:

load script SubroutineFile -- where the location of SubroutineFile
-- has already been set earlier

this step occurs between chunks of code that call the exact same handler
used in the subroutine.

The actions that the subroutine is supposed to perform do not happen.
They are simply skipped.

What am I doing wrong?

Thanks,



Bill Planey
3311 Oak Lawn Ave., Suite 300
Dallas, TX 75219
214-528-5990 ext. 241 (office)


  • Prev by Date: Re: Test for multiples a character in a paragraph- Tex-Edit or OSAX
  • Next by Date: Re: Intro and Can this be done?
  • Previous by thread: Re: Test for multiples a character in a paragraph- Tex-Edit or OSAX
  • Next by thread: Re: loading a subroutine properly
  • Index(es):
    • Date
    • Thread