I discovered that msched does *NOT* pass through command line arguments when you invoke a macros directly. that is, I tried:
> fixfile.scp /filename=
and it didn't work and it took me a while to figure out WHY. To get it to work I had to type:
> C:\program files\mjtnet\macroscheduler\msched d:\macros\fixfile.scp /filename=
What a mess to have to type! [this with 7.3.11.4 on XP/Pro]. Is there something wrong with my setup [I don't recall doing
anything much except telling the installer to associate .scp files with msched]? Or a bug/misfeature?
Problem with command line arguments
Moderators: Dorian (MJT support), JRL
Problem with command line arguments
/Bernie\
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
It appears that Macro Scheduler executable and the macro script file are not in the same working directory, defautl paths.
I suspect that is why you must provide the complete path.
HELP section on calling macros mentions the need to provide complete path of the macro file.
Why not make a shortcut with the correct values so you only need to double-click on the icon vs. typing that long strng.
I suspect that is why you must provide the complete path.
HELP section on calling macros mentions the need to provide complete path of the macro file.
Why not make a shortcut with the correct values so you only need to double-click on the icon vs. typing that long strng.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
That's correct -- msched is in a read-only directory on my C drive and my macros are all in appropriate directories accessible from my limited user account.Bob Hansen wrote:It appears that Macro Scheduler executable and the macro script file are not in the same working directory, defautl paths. .
You're missing the point: when I run "somemacro.scp" from the command line, the macro runs perfectly. BUT: msched won't pass command lineHELP section on calling macros mentions the need to provide complete path of the macro file.
arguments into the macro [which I think is a bug!].
That's not the problem: I need to provide a command-line argument. I suppose I could create a new shortcut every time I want to feed the macro a different filename, but that's really pretty ugly and inconvenience. Typing that gigantic string [with full paths both to msched and to the macro] is also incredibly ugly and inconvenient . What I was asking was why:Why not make a shortcut with the correct values so you only need to double-click on the icon vs. typing that long strng.
macro.scp /filename=SOMEFILE
won't pass the command-line arg: it will run the macro just fine, but the macro *always* starts up with no command-line args [so I can't pass vbs in]
/Bernie\
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Still trying to create an easy workaround.
------------------------
How about a batch file that takes the parameter?
FixFile.bat contents:
Run batch file with filename as parameter:
------------------------
How about a batch file that takes the parameter?
FixFile.bat contents:
Code: Select all
C:\program files\mjtnet\macroscheduler\msched d:\macros\fixfile.scp /filename=%1
Code: Select all
FixFile.bat <SOMETHING>
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Yes, that'll do it... and I guess that's the sort of thing that I'll have to do.. thanks!
I wonder if/how this is supposed to work in general. I see that the file-association for .scp files is basically the same as the association for other types of files [basically PATHTOMSCHED %1] I don't know enough about that part of windows to know if there's some '%' thing you can put in for "the rest of the arguments" or some such.. oh well, the batch file will do fine... thanks!
I wonder if/how this is supposed to work in general. I see that the file-association for .scp files is basically the same as the association for other types of files [basically PATHTOMSCHED %1] I don't know enough about that part of windows to know if there's some '%' thing you can put in for "the rest of the arguments" or some such.. oh well, the batch file will do fine... thanks!
/Bernie\