Waiting for a macro to complete
Moderators: JRL, Dorian (MJT support)
Waiting for a macro to complete
I don't know if this is an XP thing or a 7.1 problem [I'm just moving my world to my new XP system and slowly migrating all my msched macros over], BUT: I was pretty sure that when you did
Macro>OTHERMACRO
that it *waited* for the other macro to finish before it proceeded. I checked the help file for "Macro>" and it was silent on the matter. But I'm getting nailed because my 'call' isn't waiting for the macro to finish.
Here's the macro doing the calling:
2/4/2003 21:59:06:000 -
2/4/2003 21:59:06:000 - Macro>Dial GVA
2/4/2003 21:59:06:000 -
2/4/2003 21:59:06:000 - Let>RP_WINDOWMODE=2
2/4/2003 21:59:06:000 -
Notice that *NO* time elapsed from the "Macro>" to the "Let>". But when I look at the log for the other macro [Dial GVA] I have:
2/4/2003 21:59:06:765 - Started Macro : Dial GVA
[...]
2/4/2003 21:59:37:843 - Finished Macro : Dial GVA
Notice that the macro took 31 seconds. Is there some new thing about making one macro *wait* for another to finish before it proceeds?
Thanks!
Macro>OTHERMACRO
that it *waited* for the other macro to finish before it proceeded. I checked the help file for "Macro>" and it was silent on the matter. But I'm getting nailed because my 'call' isn't waiting for the macro to finish.
Here's the macro doing the calling:
2/4/2003 21:59:06:000 -
2/4/2003 21:59:06:000 - Macro>Dial GVA
2/4/2003 21:59:06:000 -
2/4/2003 21:59:06:000 - Let>RP_WINDOWMODE=2
2/4/2003 21:59:06:000 -
Notice that *NO* time elapsed from the "Macro>" to the "Let>". But when I look at the log for the other macro [Dial GVA] I have:
2/4/2003 21:59:06:765 - Started Macro : Dial GVA
[...]
2/4/2003 21:59:37:843 - Finished Macro : Dial GVA
Notice that the macro took 31 seconds. Is there some new thing about making one macro *wait* for another to finish before it proceeds?
Thanks!
/Bernie\
Hi,
In 7.1 you need to do:
Macro>c:\fullpath\macrofile.scp
Please see:
http://www.mjtnet.com/forum/viewtopic.php?t=56
That's the problem.
In 7.1 you need to do:
Macro>c:\fullpath\macrofile.scp
Please see:
http://www.mjtnet.com/forum/viewtopic.php?t=56
That's the problem.
MJT Net Support
[email protected]
[email protected]
Ah, I didn't see that in the announcements [and it didn't make it into the help file, alas]. I hope that what it says in the note [that you probably only need the .scp] is correct, because otherwise it'll be a pretty unfortunate decision for me:
I move my macros around and re-organize them from time to time, and if I need to put in a full path I'll a hve to edit a LOT Of macros to change the path all around UGH. Oh well...
What's odd is that the effect of only using the macro name wasn't that it couldn't *find* the other macro just fine, but it just didn't _wait_ for it to finish,... so maybe that's a programming trick for us folk who won't be using the compiler: if you use just the macro name, msched launches-and-goes, but if you use the full-path it launches-and-waits.
I move my macros around and re-organize them from time to time, and if I need to put in a full path I'll a hve to edit a LOT Of macros to change the path all around UGH. Oh well...
What's odd is that the effect of only using the macro name wasn't that it couldn't *find* the other macro just fine, but it just didn't _wait_ for it to finish,... so maybe that's a programming trick for us folk who won't be using the compiler: if you use just the macro name, msched launches-and-goes, but if you use the full-path it launches-and-waits.
/Bernie\
Hi,
Not sure which help file you're looking at, 'cos it's in mine - both under the Macro command topic and in the history list.
Check you have the correct help file installed. Should have installed the new one with the new version. Do you have the latest release installed?
Not sure which help file you're looking at, 'cos it's in mine - both under the Macro command topic and in the history list.
Check you have the correct help file installed. Should have installed the new one with the new version. Do you have the latest release installed?
MJT Net Support
[email protected]
[email protected]
Hi,
The latest is 7.1.15 so there have been a few updates since the one you have - I'd download 7.1.15 from http://www.mjtnet.com/dldregd.htm
Perhaps the help file wasn't modified until just after the one you have.
The latest is 7.1.15 so there have been a few updates since the one you have - I'd download 7.1.15 from http://www.mjtnet.com/dldregd.htm
Perhaps the help file wasn't modified until just after the one you have.
MJT Net Support
[email protected]
[email protected]
Something which may reduce the troubles that this /.scp change causes, would be the ability to obtain the current working directory and/or the directory that the currently running script is in.
If there's already a way to do this, then great! Someone tell.
Something like....
%CWD% = Current Working Directory
The one that is changed by the Cha>xxx command.
%SLD% = Script Location Directory
The directory that this script is in.
I have a Macro that currently is simply:
Macro>GetFELogs
And it works! When I added the .scp on the end, it fails (cannot find...). The GetFELogs.scp is in the same directory as the other script, and is also listed in MSChed (but under a different group). I haven't tried using the full path method.
(version 7.1.15)
If there's already a way to do this, then great! Someone tell.

Something like....
%CWD% = Current Working Directory
The one that is changed by the Cha>xxx command.
%SLD% = Script Location Directory
The directory that this script is in.
I have a Macro that currently is simply:
Macro>GetFELogs
And it works! When I added the .scp on the end, it fails (cannot find...). The GetFELogs.scp is in the same directory as the other script, and is also listed in MSChed (but under a different group). I haven't tried using the full path method.
(version 7.1.15)
I agree -- it'd be nice if there were a way to both allow Marcus to do the compiler and not have to hardcode a lot of directory names into our scripts!Captive wrote:Something which may reduce the troubles that this /.scp change causes, would be the ability to obtain the current working directory and/or the directory that the currently running script is in.
I had the same experience. Doulbe check on the first form: I think you'll find that while it found your script it didn't wait for it to complet.Captive wrote: I have a Macro that currently is simply:
Macro>GetFELogs
And it works! When I added the .scp on the end, it fails (cannot find...).
But when I put i the full path, then the wait-until-it-completes functionality reappeared [as I was counting on!].
So I'm wondering if this is a bug/misfeature: [and one I hesitate to recommend that anyone take advantage of]: if you do
Macro>fullpath
you get the wait-until-complete functionality, while if you do
Macro>macroname
you get the "start the other macro and then keep going" functionality.
/Bernie\
Yes, it was updated at the same time and is available http://www.mjtnet.com/support.htmbernie wrote:
Is there an updated version of the PDF documentation that corresponds to 7.1.15?
Thanks!
MJT Net Support
[email protected]
[email protected]