Possible to start an App "hidden" in Classic Mode?

nnCron and nnCron LITE discussion

Possible to start an App "hidden" in Classic Mode?

Postby LuckMan212 » Sun, 10 Jul 2005, 11:35

Hello,

I would like to know if it is possible to start an App in Classic Mode syntax with the window "hidden" as in when you use
Code: Select all
SWHide   NormalPriority


but it would be something like
Code: Select all
\ start every 15 minutes, hidden
*/15 * * * * * SWHide:"C:\someapp.exe"

even though I know that doesnt work, is there any way to do it?
thanks :D
LuckMan212
 
Posts: 133
Joined: Mon, 04 Jul 2005, 11:19

Postby VK » Mon, 11 Jul 2005, 11:44

Why do you need this if you can use the Extended syntax?
CU
VK
User avatar
VK
 
Posts: 680
Joined: Wed, 14 Jul 2004, 19:17

Postby LuckMan212 » Mon, 11 Jul 2005, 14:03

ok I will try to keep this short, but basically, I use a batch file that is triggered (by nnCron) each morning at 3am. This batch file runs a DOS command that calculates sunrise and sunset times for that day, factoring in Daylight savings, etc etc. I use the output of this program to generate a "dynamic" crontab file that is used to control my pet lizard's habitat lighting and fans, etc.

It all works great, but to keep it simple I am using the "Classic" mode for that crontab file so it is easier to generate. The only thing that would make it perfect is if I could add some sort of switches or something to those classic mode tasks so they run "hidden".

here is an example of the crontab that gets generated:
Code: Select all
# CP815.tab, generated on 2005-07-11
12 05 * * * * "C:\CP815\cp815ctrl.vbs" 8OFF
36 05 * * * * "C:\CP815\cp815ctrl.vbs" 5ON
06 06 * * * * "C:\CP815\cp815ctrl.vbs" 1ON
21 06 * * * * "C:\CP815\cp815ctrl.vbs" 3ON
41 19 * * * * "C:\CP815\cp815ctrl.vbs" 3OFF
11 20 * * * * "C:\CP815\cp815ctrl.vbs" 1OFF
35 20 * * * * "C:\CP815\cp815ctrl.vbs" 5OFF
08 21 * * * * "C:\CP815\cp815ctrl.vbs" 8ON


i hope that explains why I would want this feature... :wink:
if you want any more details of the batch file or the VBscripts, etc let me know
LuckMan212
 
Posts: 133
Joined: Mon, 04 Jul 2005, 11:19

Postby VK » Mon, 11 Jul 2005, 15:26

You can not use the Forth words in nnCron classic syntax. So there are two possibilities:

1) Use nnCron LITE, which can use Forth words: http://www.nncron.ru/nncronlt/help/EN/working/forth.htm

2) Create a simple script which wil start the app in hidden mode and run this script. For example, create a following text file (swhide.spf):
Code: Select all
CREATE str1 256 ALLOT
: main
    get-string str1 PLACE
    SWHide
    START-APP: C:\CP815\cp815ctrl.vbs %str1 COUNT%
;


Now you can start this script like this:
Code: Select all
# CP815.tab, generated on 2005-07-11
12 05 * * * * F:\TOOLS\NNCRON\nncron.exe -wp -runfile F:\TOOLS\NNCRON\SCRIPTS\swhide.spf 8OFF
36 05 * * * * F:\TOOLS\NNCRON\nncron.exe -wp -runfile F:\TOOLS\NNCRON\SCRIPTS\swhide.spf 5ON
06 06 * * * * F:\TOOLS\NNCRON\nncron.exe -wp -runfile F:\TOOLS\NNCRON\SCRIPTS\swhide.spf 1ON
etc...

You can find more detailed info about the scripts in nnCron docs: http://www.nncron.ru/help/EN/working/ta ... tm#runfile

HTH!
CU
VK
User avatar
VK
 
Posts: 680
Joined: Wed, 14 Jul 2004, 19:17

Postby LuckMan212 » Mon, 11 Jul 2005, 15:45

thank you Valery, I will certainly try this, it looks like a good solution!! :D
LuckMan212
 
Posts: 133
Joined: Mon, 04 Jul 2005, 11:19

Postby LuckMan212 » Mon, 11 Jul 2005, 16:02

works perfectly!! :lol:
LuckMan212
 
Posts: 133
Joined: Mon, 04 Jul 2005, 11:19


Return to nnCron forum (English)

Who is online

Users browsing this forum: No registered users and 1 guest