Re: Looking for "Terminate Event" in Windows Script Components???

From: Al Dunbar [MS-MVP] (alan-no-drub-spam_at_hotmail.com)
Date: 02/06/05


Date: Sun, 6 Feb 2005 12:30:55 -0700


"Gerry Hickman" <gerry666uk@yahoo.co.uk> wrote in message
news:O%23kuhi%23CFHA.2232@TK2MSFTNGP14.phx.gbl...
> Hi Al,
>
> > Well, the class wouldn't be called (it's not a subroutine), but used to
> > instantiate objects based on the class (somehow I think you know of
these
> > basics). The "packaged" (the OP's term) script (i.e. the .wsf file)
would be
> > called (invoked, run) in the usual manner.
>
> What is the "usual manner"? Bear in mind the "packaged script" is in a
> separate file?

I meant that the .wsf file would be: "called (invoked, run) in the usual
manner", namely, in the same way that wsh scripts are run. This could be by
double-clicking in windows explorer, invoking from batch or the command
prompt, running from another script with .run, etc, etc,.

> >> I'm trying to
> >>think in terms of how command line parameters would be passed and
> >>validated to these packages...
> >
> > By the usual methods.
>
> Hehe, that's what I'm trying to understand. This is a separate file
> right (?) so would it have <script> tags referencing the "packaged" file
> in the calling file, or would it be called from the CMD line?

The .wsf file is logically considered a unit; whether all script code is
contained within that one file, or in separate source files and referenced
with <script src=path> tags is immaterial. The subs, functions, and classes
would not be "run" in some manner by specifying them from the command line,
they would be used as required by the .wsf script.

> The reason I ask is that there's a difference between "packaging"
> something that can merely be "run" by supplying command line paramaters
> and "packaging" something using <script> tags in the caller, because in
> the latter case you'd need to make direct calls into Subs or Functions
> the packaged script. In the former case the packaged script would run as
> a separate process, but in the latter case it's merely shared blocks of
> code...

I think that your understanding of the term "packaging" and that of the OP
is still different.

/Al



Relevant Pages

  • Re: Gnuplot 4.2: Animated GIFs
    ... I am a bit confused about the demo script at the Gnuplot site, ... out they call a separate file "gnuplot.rot". ... All of these demos are distributed with gnuplot, ... "Are you trying to make a plot like the one at URL? ...
    (comp.graphics.apps.gnuplot)
  • Re: Looking for "Terminate Event" in Windows Script Components???
    ... in the usual manner. ... This is a separate file ... right so would it have <script> tags referencing the "packaged" file ... The reason I ask is that there's a difference between "packaging" ...
    (microsoft.public.scripting.wsh)
  • Re: Samba Q?
    ... Since Samba is an SMB server, and cifs an SMB client, I have no idea ... However, if I cat the line from the file, copy & paste it but without the passwd portion and exec it, it then asks me for it, and its fine with that long a passwd from the interactive shell. ... Why can't I put it in the script? ... user and password stored in a separate file? ...
    (Fedora)
  • Re: script callng created function within the script
    ... If you make your function B a separate file called ... functionname.m you will not have this trouble. ... Otherwise make script A a function - ... I tried to add the line with load, ...
    (comp.soft-sys.matlab)
  • Re: Design Model Question
    ... this architecture is one of the leading ... > The proper way to share code between script is to enclose it in functions, ... > keep these in an separate file, include it where it's needed, then call ... A single entry point architecture is sometimes known as a Front Controller ...
    (comp.lang.php)