Start Minimized

Please report bugs, suggestions and ask questions about Mars Notebook here.
Leo
Newbie
Newbie
Posts: 16
Joined: Wed Sep 09, 2009 8:39 am

Unread post Thu Sep 15, 2011 2:13 am

Hi,

Is there a way to start the program minimized (to notification area)? Even a command-line switch would be OK. This feature would be extremely useful, but I can't find any option for it.

Thanks,
Leo
User avatar
Marsianin
Administrator
Administrator
Posts: 1655
Joined: Tue Jan 25, 2005 3:02 am
Location: Red Planet
Contact:

Unread post Thu Sep 15, 2011 1:08 pm

1. You can check 'Load on Windows startup' option in preferences.
2. You can run Notebook.exe /startup
3. You can run Notebook.exe /? to get more command line switches.
Is there any life on Mars ?
Leo
Newbie
Newbie
Posts: 16
Joined: Wed Sep 09, 2009 8:39 am

Unread post Thu Sep 15, 2011 4:03 pm

Thanks, I can't use the first option in the preferences because I don't need it run at Windows boot, I need Notebook to run from a batch file (due to nightly backup of the Notebook database, so the program needs to be closed each time and then reopened after the backup)

I was not aware of the command line options, I did try to use the /startup command but couldn't get it to work, it does work OK with Windows XP (although not with the spell checker enabled!) but with Windows 7 there is no icon. Here are the exact results of my testing :

Windows XP :

With /startup from command line : loads normally, not minimized

With /startup from batch file : loads minimized (correct!)

With /startup from batch file with spell checker enabled : loads minimized but with CPU remaining at 100%


Windows 7 :

With /startup from command line : loads normally, not minimized

With /startup from batch file : program is listed as running process but there is NO icon so it's impossible to access the notebook (the icon is also not in the list of 'hidden' taskbar icons)

With /startup from batch file with spell checker enabled : program is listed as running but no icon so not accessible, AND CPU remains at 100%


So again the spell checker is causing CPU problems, and also the /startup option appears to not work with Windows 7. Please check for a future release :)
User avatar
Marsianin
Administrator
Administrator
Posts: 1655
Joined: Tue Jan 25, 2005 3:02 am
Location: Red Planet
Contact:

Unread post Thu Sep 15, 2011 7:00 pm

Actually everything works fine here under Windows 7.
But one thing. When running Notebook.exe /startup be sure you don't have 'Allow only one instance of the application' enabled in preferences and you don't have another copy opened.

If only one copy allowed and you have another running new instance will bring to front the old one omitting /startup switch.

It seems spellchecker still consumes CPU when started minimized. Thanks. I'll fix it.
Is there any life on Mars ?
Leo
Newbie
Newbie
Posts: 16
Joined: Wed Sep 09, 2009 8:39 am

Unread post Fri Sep 16, 2011 3:14 am

Thanks, I finally figured out the problem - you need to put the /startup parameter within quotes to make it work in a batch file, eg.

start "" "C:\Program Files\Mars Notebook\Notebook.exe" "/startup"

It's unusual because I have another batch file which starts Firefox with parameters and Firefox doesn't require quotes around the parameters, but Notebook is requiring quotes around the parameter for some reason.

Also when using the /startup command from a batch file I need to specify the full path to the database, but without the /startup command it automatically loads the previous database. Anyway I've got it all working now so I'm very happy, thanks for your assistance :)

Also, now with the /startup command in quotes in the batch file, the spell checker is no longer causing high CPU usage on startup! But still causing that problem when you create a new section but don't type anything in it, no problem for now as I just start typing immediately to make it happy :lol:
User avatar
Marsianin
Administrator
Administrator
Posts: 1655
Joined: Tue Jan 25, 2005 3:02 am
Location: Red Planet
Contact:

Unread post Sat Sep 17, 2011 2:55 am

I think start routine needs quotes but Notebook.exe does not. Anyway start will not pass these quotes to the program itself just /startup switch.

And I think I fixed high CPU usage when creating new document with spellchecker enabled. Do you still have this problem? Did you download v.2.1 release (Notebook.exe version 2.1.0.12)?
Is there any life on Mars ?
Leo
Newbie
Newbie
Posts: 16
Joined: Wed Sep 09, 2009 8:39 am

Unread post Sat Sep 17, 2011 4:27 am

I am using the latest version I think, from the 2.1 thread at the top of the forum. I would be happy to test a new version with spell checker CPU fixed.

Unfortunately I still have a problem with starting it minimized - it works when I run the batch file manually, but not when the batch file is run by Windows Task Scheduler. So I tried putting Notebook directly into Task Scheduler with no batch file, and it should just start the program minimized - and it does start but there is no icon so I can't access Notebook, I can just see it in the list of running processes...

I don't think I am doing something wrong, it should be simple :

Image

I tried /startup with and without quotes, both don't work. I don't understand why Task Scheduler cannot start Notebook minimized!
User avatar
Marsianin
Administrator
Administrator
Posts: 1655
Joined: Tue Jan 25, 2005 3:02 am
Location: Red Planet
Contact:

Unread post Mon Jan 09, 2012 8:52 pm

Sorry was my fault.
Start and Task Scheduler pass command lines parameters a bit differently.
Will be fixed in upcoming 2.11 update.
Is there any life on Mars ?
User avatar
Marsianin
Administrator
Administrator
Posts: 1655
Joined: Tue Jan 25, 2005 3:02 am
Location: Red Planet
Contact:

Unread post Tue Mar 20, 2012 12:29 am

Fixed in 2.11
Is there any life on Mars ?
Leo
Newbie
Newbie
Posts: 16
Joined: Wed Sep 09, 2009 8:39 am

Unread post Sat Mar 24, 2012 9:08 am

Thanks!

I also figured out that if you combine /startup and /max then it starts minimized but when clicked it's maximized, just how I like it :)
Post Reply