Assigned command & parameters passed by command line
Moderators: JRL, Dorian (MJT support)
Assigned command & parameters passed by command line
I am executing a macro and passes some of its parameters by command line.
I was wondering if the command "assigned>" works with those transmitted parameters, because it always returns me false.
Code example:
Command line call : "myMacro.exe /rate=9600"
Then in the macro script:
Message>rate
Assigned>rate,isRateAssigned
Message>isRateAssigned
The first message will show "9600", the seconde "FALSE", whatever I do. but the variable obviously is assigned!!
Can someone help me? I couldn't find any post about it...
Thanks a lot,
greetings from Switzerland
I was wondering if the command "assigned>" works with those transmitted parameters, because it always returns me false.
Code example:
Command line call : "myMacro.exe /rate=9600"
Then in the macro script:
Message>rate
Assigned>rate,isRateAssigned
Message>isRateAssigned
The first message will show "9600", the seconde "FALSE", whatever I do. but the variable obviously is assigned!!
Can someone help me? I couldn't find any post about it...
Thanks a lot,
greetings from Switzerland
Hi armsys,
Have you tried such a code at your place (with a exe file)?
I did indeed remove trailing spaces. I checked manually and then used the "edit" "remove trailing space". The problem doesn't come from here. I also tried the %variable% style. I have already done some scripts and read a lot of posts on this forum. Must say thank to you, Bob and the support for the useful information.
I really think I can expect Assigned to return TRUE, or am I expecting too much from Macro Scheduler?
Thanks for the help
Choubi
Have you tried such a code at your place (with a exe file)?
and call : myMacro.exe /rate=9600Message>rate
Assigned>rate,isRateAssigned
Message>isRateAssigned
I did indeed remove trailing spaces. I checked manually and then used the "edit" "remove trailing space". The problem doesn't come from here. I also tried the %variable% style. I have already done some scripts and read a lot of posts on this forum. Must say thank to you, Bob and the support for the useful information.
I really think I can expect Assigned to return TRUE, or am I expecting too much from Macro Scheduler?
Thanks for the help
Choubi
Hi Choubi,
1. I'm terribly sorry for pointing you to a wrong direction.
2. I would like to confirm that all your reported anomalies can be repeated here.
3. Please allow me to offer a work-around solution:
Message>rate
Let>xrate=rate
Assigned>xRate,isRateAssigned
Message>isRateAssigned
I tested the above script fully without any surprise. That's, the script was compiled per your requirement.
4. Please allow me to postulate: Assisgned> can only "see" local variables. The above-mentioned "rate" wasn't created locally; therefore, Assign> deems it "FALSE". What an unfortunate misunderstanding!
Happy scripting. Hope you enjoy using Macro Scheduler.
1. I'm terribly sorry for pointing you to a wrong direction.
2. I would like to confirm that all your reported anomalies can be repeated here.
3. Please allow me to offer a work-around solution:
Message>rate
Let>xrate=rate
Assigned>xRate,isRateAssigned
Message>isRateAssigned
I tested the above script fully without any surprise. That's, the script was compiled per your requirement.
4. Please allow me to postulate: Assisgned> can only "see" local variables. The above-mentioned "rate" wasn't created locally; therefore, Assign> deems it "FALSE". What an unfortunate misunderstanding!
Happy scripting. Hope you enjoy using Macro Scheduler.
Last edited by armsys on Thu Sep 02, 2004 7:42 am, edited 1 time in total.
Hi,
I've looked at this and unfortunately it is in fact the case that Assigned is not checking variables passed as parameters. This is an ommission and will be fixed in the next release.
I've looked at this and unfortunately it is in fact the case that Assigned is not checking variables passed as parameters. This is an ommission and will be fixed in the next release.
MJT Net Support
[email protected]
[email protected]
I would be glad to have the next release for free 
Thanks armsys for the hand, but your code is not still what I want, since it will return true, even if rate is not passed as parameter..
I have tried several around. Nothing worked. Perhaps the key is to do so:
Let>xRate=rate
And then some VB script that checks if xRate is a string (rate not Assigned) or an Integer (rate assigned).
Does someone has a better idea? I am not at ease with VB...
/Choubi

Thanks armsys for the hand, but your code is not still what I want, since it will return true, even if rate is not passed as parameter..
I have tried several around. Nothing worked. Perhaps the key is to do so:
Let>xRate=rate
And then some VB script that checks if xRate is a string (rate not Assigned) or an Integer (rate assigned).
Does someone has a better idea? I am not at ease with VB...
/Choubi
qu'importe le flacon pourvu qu'on ait l'ivresse
I guess MSched lacks similar commands, which in this case are from AutoHotkey.if xRate is a string (rate not Assigned) or an Integer (rate assigned
if var is type
if var is not type



Let>Var=ThisIsAText
Let>VarValidateResult=%Var%/1
If>VarValidateResult=0,NotANumber
Hej Lumumba,
your code unfortunately doesn't make the trick for me.
That's too bad! Thanks any way
I hope we will soon be able to end this topic, I am still looking for the solution with pure Macro Scheduler syntax, but I think it's not possible.
your code unfortunately doesn't make the trick for me.
If I execute it, VarValidateResult is equal to "rate/1" and not to 0 as you say..Let>Var=rate
Let>VarValidateResult=%Var%/1
If>VarValidateResult=0,NotANumber
That's too bad! Thanks any way
I hope we will soon be able to end this topic, I am still looking for the solution with pure Macro Scheduler syntax, but I think it's not possible.
qu'importe le flacon pourvu qu'on ait l'ivresse