Disable "Running" Notification

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
dtaylor
Junior Coder
Posts: 46
Joined: Mon Aug 08, 2016 2:42 am

Disable "Running" Notification

Post by dtaylor » Fri Sep 16, 2016 8:05 pm

Is there a way to disable the "Running" notification for a script when run from the command line?

I know about the Option to disable "Show running indicator when Hidden", but it doesn't work on scripts that are called from the command line. I'm hoping for a way to directly enable/disable the notification in the calling command line syntax.

User avatar
PepsiHog
Automation Wizard
Posts: 511
Joined: Wed Apr 08, 2009 4:19 pm
Location: Florida

Re: Disable "Running" Notification

Post by PepsiHog » Mon Sep 19, 2016 2:59 am

Disabling System Tray Support

To switch off system tray support, so that the Macro Scheduler icon does not show in the System Tray add the parameter -NOSYSTRAY or /NOSYSTRAY at the end of the command line :

msched -NOSYSTRAY

Hiding Macro Scheduler

You can hide the Macro Scheduler window with the -HIDE parameter:

msched -HIDE

To hide Macro Scheduler completely use this in conjunction with the -NOSYSTRAY parameter:

msched -HIDE -NOSYSTRAY

-HIDE and -NOSYSTRAY can also be used with compiled macros.


For more documentation type "Command Line Options" in the search bar above.

PepsiHog
Windows 7

PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2021) AND enjoy programming. (That's my little piece of heaven!)

The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!

dtaylor
Junior Coder
Posts: 46
Joined: Mon Aug 08, 2016 2:42 am

Re: Disable "Running" Notification

Post by dtaylor » Mon Sep 19, 2016 4:39 am

PepsiHog,

Thanks for the info, but I don't believe that is what I am looking for. I want to suppress the "Running" message that displays for uncompiled scripts run from the command line.
Running.png
When I try to run to an uncompiled script using:
msched -NOSYSTRAY MyScript
-OR-
msched MyScript -NOSYSTRAY

I get this error.
Error.png
The same commands works if I remove the "-NOSYSTRAY" parameter.

Am I doing this wrong or does this not apply to running uncompiled scripts from the command line?

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Disable "Running" Notification

Post by Marcus Tettmar » Mon Sep 19, 2016 8:07 am

Tools / Options / Show Running Indicator when Hidden (Uncheck)
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

dtaylor
Junior Coder
Posts: 46
Joined: Mon Aug 08, 2016 2:42 am

Re: Disable "Running" Notification

Post by dtaylor » Mon Sep 19, 2016 2:52 pm

Marcus,

This setting seems to only work for scripts launched through the GUI/Editor. The "Running" notification still displays when I run a script from the command line as:
msched MySript

User avatar
PepsiHog
Automation Wizard
Posts: 511
Joined: Wed Apr 08, 2009 4:19 pm
Location: Florida

Re: Disable "Running" Notification

Post by PepsiHog » Mon Sep 19, 2016 3:26 pm

I have Win7, so not sure what you are getting. However, the command line options are to suppress the icon in the tray. Maybe if you contain it in quotes.

mshed.exe "MyScript.scp -nosystray"

And you may want to specify the full path for your script. Long time ago, I used it. It does work, but I don't remember details. Right now I don't have time, but later I will play with it and if I figure it out I will post for you.

PepsiHog
Windows 7

PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2021) AND enjoy programming. (That's my little piece of heaven!)

The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!

dtaylor
Junior Coder
Posts: 46
Joined: Mon Aug 08, 2016 2:42 am

Re: Disable "Running" Notification

Post by dtaylor » Wed Sep 28, 2016 10:53 pm

I've tried every variation I can:

msched.exe "MyScript.scp -nosystray"
msched.exe "MyScript.scp" -nosystray
msched.exe "MyScript.scp" "-nosystray"
msched.exe "-nosystray MyScript.scp"
msched.exe -nosystray "MyScript.scp"
msched.exe "-nosystray" "MyScript.scp"

I've even tried including the full path to msched.exe in each of them.

But, no matter which syntax I use, each of these generate an error message that says "Macro in Command Line Does Not Exist".

Simply removing the "-nosystray" reference allows the script to run normally, so I don't think -nosystray can be used from the command line to run a .scp script file.

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Disable "Running" Notification

Post by Marcus Tettmar » Thu Sep 29, 2016 7:41 am

You are specifying a .scp file but not offering a path. Either do this:

msched.exe "c:\full\path\scriptname.scp" -NOSYSTRAY

OR, you can specify just the MACRO NAME *IF* it is already defined and sitting inside of Macro Scheduler. E.g. if you can see it in the list of macros in Macro Scheduler then specify just the name:

msched.exe MACRONAME -NOSYSTRAY

E.g. if your script is called RunME then:

msched.exe RunMe -NOSYSTRAY

Or

msched.exe "C:\My Documents\Macro Scheduler 14\RunMe.scp" -NOSYSTRAY

Note the distinction between the two as to when you use the extension. Use the extension when you are telling it to run a script FILE and make sure you give it the the path. If telling it to run a macro that exists within Macro Scheduler then DO NOT use the extension.

Quotes only need to go round parameters containing spaces. That's regular Windows stuff.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

dtaylor
Junior Coder
Posts: 46
Joined: Mon Aug 08, 2016 2:42 am

Re: Disable "Running" Notification

Post by dtaylor » Thu Sep 29, 2016 8:50 pm

Marcus,

Please view this video to see what is happening when I attempt to run my Test.scp from the command line.

As you can see, the script runs fine from the command line until I add "-NOSYSTRAY" to it.

I am running this on a Windows 10 (64-bit) machine.

User avatar
Grovkillen
Automation Wizard
Posts: 1009
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: Disable "Running" Notification

Post by Grovkillen » Fri Sep 30, 2016 4:00 am

Try full file path.
Let>ME=%Script%

Running: 15.0.24
version history

dtaylor
Junior Coder
Posts: 46
Joined: Mon Aug 08, 2016 2:42 am

Re: Disable "Running" Notification

Post by dtaylor » Fri Sep 30, 2016 5:18 am

It wasn't included in the video, but I tried the full file path as well and it gives the same error.

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Disable "Running" Notification

Post by Marcus Tettmar » Fri Sep 30, 2016 11:23 am

Ok, my bad. There's an anomoly when using -NOSYSTRAY with a macro also on the command line. But there's a simple workaround. Do this:

msched.exe MACRONAME /NOSYSTRAY=1

Or:

msched.exe "c:\full\path\scriptname.scp" /NOSYSTRAY=1
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

dtaylor
Junior Coder
Posts: 46
Joined: Mon Aug 08, 2016 2:42 am

Re: Disable "Running" Notification

Post by dtaylor » Fri Sep 30, 2016 6:04 pm

That's works.
Thank you!

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts