Automatically open scripts in Editor
Moderators: JRL, Dorian (MJT support)
Automatically open scripts in Editor
How do I change it so that scripts are automatically opened in the editor instead of run, when I double click on them. I know the command is msched.exe -EDITOR as that is what it is in the shortcut to open the editor.
Naturally, if I browse to select the option I cannot put in the -EDITOR option. So, I'm thinking (could be wrong), it must be something that needs to be changed in the registry.
Naturally, if I browse to select the option I cannot put in the -EDITOR option. So, I'm thinking (could be wrong), it must be something that needs to be changed in the registry.
Opening Macros
That is what I want to do, ideally not even have to right click but double click to open in the editor. Currently, I have open and open with etc, all the normal options. If I select msched, it runs the script, it does not open the editor.
To open a script you need to pass msched -EDITOR to the line. At least that is what the shortcut does from All Programs\Macro Scheduler\Script Editor.
I have just tried compiling the lineand assigning it a new program name and it did not pass it on. But it was a first try. I am reasonably sure this has to be set in the registry.
To open a script you need to pass msched -EDITOR to the line. At least that is what the shortcut does from All Programs\Macro Scheduler\Script Editor.
I have just tried compiling the lineand assigning it a new program name and it did not pass it on. But it was a first try. I am reasonably sure this has to be set in the registry.
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Have you tried to associate *.scp with the editor?
The "EDIT" option probably looks like this default:
"C:\Program Files\Macro Scheduler 11\msched.exe" -EDITOR "%1"
The "RUN" option probably looks like this default:
"C:\Program Files\Macro Scheduler 11\msched.exe" "%1"
Changing the "RUN" line to match the "EDIT" line should cause the file to open in the Editor vs. running as a script when you double click. But if you right click, selecting Run and Edit will both open the Editor, you will not be able to execute a script file directly from a command line without using the full executable with the target file: msched.exe path:\filename.scp
The "EDIT" option probably looks like this default:
"C:\Program Files\Macro Scheduler 11\msched.exe" -EDITOR "%1"
The "RUN" option probably looks like this default:
"C:\Program Files\Macro Scheduler 11\msched.exe" "%1"
Changing the "RUN" line to match the "EDIT" line should cause the file to open in the Editor vs. running as a script when you double click. But if you right click, selecting Run and Edit will both open the Editor, you will not be able to execute a script file directly from a command line without using the full executable with the target file: msched.exe path:\filename.scp
Last edited by Bob Hansen on Mon Nov 24, 2008 3:21 pm, edited 1 time in total.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
When you install Macro Scheduler the default options will register the file associations. This will create two context menu items to the right click menu in Windows Explorer):
- Run: Runs the .scp file
- Edit: Opens the .scp file in the editor.
Run is the default, so when you double click the file it runs it.
If you don't see these options, reinstall Macro Scheduler and leave the defaults set.
- Run: Runs the .scp file
- Edit: Opens the .scp file in the editor.
Run is the default, so when you double click the file it runs it.
If you don't see these options, reinstall Macro Scheduler and leave the defaults set.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Are you saying you don't have Edit in your menu when you right click on a script file? My right click menu looks like:That is what I want to do, ideally not even have to right click but double click to open in the editor. Currently, I have open and open with etc, all the normal options. If I select msched, it runs the script, it does not open the editor.
Run
Edit
Open With
etc....
If I pick "Run" the script runs, if I pick "Edit" the script opens in the editor.
Bob is correct, you can change the .SCP association so that the editor will always be how a script opens but as he mentions, you won't be able to "Run" a script from Explorer if you alter the association.
The good news is that all you need to do to return the association back to Macro Scheduler defaults is reinstall Macro Scheduler and check the box to associate .SCP with Macro Scheduler.
Open in Editor
That is what I want to do.
Currenlty it is set to open in Notepad.
Under Folder Options\File Types SCP I an see that is is assigned to a Text Document and there is an advanced tab which when opened gives me options such as open, print, printto.
When I change it to open with msched the advanced option that would have open, edit, print etc is gone. There is no option to open it with the editor.
So I compiled a a Run Program>C:\Program Files\Macro Scheduler\msched.exe -EDITOR into C:\Program Files\Macro Scheduler\msched2.exe and tried that and it opens the editor but not with the script opened.
Any other ideas?
Currenlty it is set to open in Notepad.
Under Folder Options\File Types SCP I an see that is is assigned to a Text Document and there is an advanced tab which when opened gives me options such as open, print, printto.
When I change it to open with msched the advanced option that would have open, edit, print etc is gone. There is no option to open it with the editor.
So I compiled a a Run Program>C:\Program Files\Macro Scheduler\msched.exe -EDITOR into C:\Program Files\Macro Scheduler\msched2.exe and tried that and it opens the editor but not with the script opened.
Any other ideas?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
REINSTALL
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
I think you need to add %1 to the command line.So I compiled a a Run Program>C:\Program Files\Macro Scheduler\msched.exe -EDITOR into C:\Program Files\Macro Scheduler\msched2.exe and tried that and it opens the editor but not with the script opened.
C:\Program Files\Macro Scheduler\msched.exe -EDITOR %1 Are you then associating this compiled script with Open?
What OS are you using? Curious that Run/Edit are not present.
I think that REINSTALL will only end up with the normal functions. He wants to double click the scp file in Explorer and have it open in the editor. Doing REINSTALL won't do that, but should return the menu options to their normal condition where he might be able to edit them as I noted above.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
So, swap the default:
1) REINSTALL
2) Run Regedit.exe
3) Locate this key: HKEY_CLASSES_ROOT\msched\shell
4) Double click on (Default) in the right hand pane. It currently says "open".
5) Change it to "Edit" without the quotes
Now the default context option is "Edit" So double clicking on a .scp will edit it. Right click and you will now see Edit in bold, and Run beneath. You've swapped the options. Right click and select Run to .. run.
But before you do anything REINSTALL as I'm assuming default settings to begin with.
1) REINSTALL
2) Run Regedit.exe
3) Locate this key: HKEY_CLASSES_ROOT\msched\shell
4) Double click on (Default) in the right hand pane. It currently says "open".
5) Change it to "Edit" without the quotes
Now the default context option is "Edit" So double clicking on a .scp will edit it. Right click and you will now see Edit in bold, and Run beneath. You've swapped the options. Right click and select Run to .. run.
But before you do anything REINSTALL as I'm assuming default settings to begin with.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Well done Marcus.
I had just checked the registry myself to suggest this, but thought it might be different on his OS, does not sound like an XP. Was waiting to find out what the registry settings might be for msched/shell on his OS
I had just checked the registry myself to suggest this, but thought it might be different on his OS, does not sound like an XP. Was waiting to find out what the registry settings might be for msched/shell on his OS
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Same on all Windows versions.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Probably added by other software. E.g. I also have "Add a new abbreviation to Direct Access" and "Scan with AVG" added by Direct Access and AVG respectively.Bob Hansen wrote:Then why is he seeing Open/Print/Print To vs Open/Edit?
You will also have an Open With... option which lets you define your own set of programs to open that filetype.
None of these have anything to do with the Run and Edit options added by the Macro Scheduler installer. I don't know why he's not seeing Run and Edit unless he unchecked the file association option during install which is why I am doing my impression of a parrot saying "reinstall!"

Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Open with Editor
Okay, got it and thanks.
Yes when I installed it, I did not check associate .scp with MS, as there are other programs I use that use that have the same extension.
In order to fix it, I uninstalled MS, ran a registry cleaner (I always do after removing a program) reinstalled and followed the instructions above so that now it opens in the editor by default when double clicking on it.
One thing that suprised be though, (perhaps I did something wrong) when I reinstalled, although my macros are all still there under My Documents\Macro Script Files the groups.dat file that have the location of the script and the folder in the editor were gone.
It is no big deal, as I plan on using explorer to organize the files as it allows me to use the comments tag.
Again thanks for all of your help.
Yes when I installed it, I did not check associate .scp with MS, as there are other programs I use that use that have the same extension.
In order to fix it, I uninstalled MS, ran a registry cleaner (I always do after removing a program) reinstalled and followed the instructions above so that now it opens in the editor by default when double clicking on it.
One thing that suprised be though, (perhaps I did something wrong) when I reinstalled, although my macros are all still there under My Documents\Macro Script Files the groups.dat file that have the location of the script and the folder in the editor were gone.
It is no big deal, as I plan on using explorer to organize the files as it allows me to use the comments tag.
Again thanks for all of your help.