#11 2015-11-30 19:50

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Close a program periodically?

Dirk wrote:

Do you think that way could damage Rainlendar / data?

I don't know. You should ask the developer of Rainlendar.

Offline

#12 2015-11-30 21:49

Dirk
Member
Registered: 2013-04-05
Posts: 91

Re: Close a program periodically?

Yes, of course, thank you.

What do you think about this:

Many thanks for the link, it shows that:
iu6x3R1.png

The "Title" field is left unfilled. May be "RainlendarWindow" will work?

Process Explorer shows nothing in the window column:
IkGNUHM.png

Last edited by den4b (2015-12-01 14:27)

Offline

#13 2015-12-01 14:30

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Close a program periodically?

Dirk wrote:

The "Title" field is left unfilled. May be "RainlendarWindow" will work?

"RainlendarWindow" is a window class, it will not work when looking for a match in window title.

Offline

#14 2015-12-01 15:56

Dirk
Member
Registered: 2013-04-05
Posts: 91

Re: Close a program periodically?

That' s a pity. So, obviously this way to close Rainlendar is gone.

Offline

#15 2015-12-01 17:52

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Close a program periodically?

You can also use "Run Program" action to execute some command line tool that might be able to close your process gracefully, like:

nircmd closeprocess rainlendar.exe

More info here: Properly close (not kill) programs from the command line [superuser.com]

Offline

#16 2015-12-01 21:50

Dirk
Member
Registered: 2013-04-05
Posts: 91

Re: Close a program periodically?

Alright, that sound good, thank you very much for the code and link.

I have downloaded it and moved it to that folder: I:\Programs\NirCmd

I do not understand where to enter the code line - "nircmd closeprocess rainlendar.exe":

General Syntax Of NirCmd
nircmd.exe {showerror} [command] [command parameters]
The showerror parameter is optional. If you specify this parameter, an error message will be displayed on the screen if an error is occurred during the execution of the command. Otherwise, any error will be ignored. For example:
nircmd.exe showerror rasdial "dial1"
nircmd.exe rasdial "dial1"
In above 2 examples, NirCmd will try to dial with the "dial1" entry. If the dialing process is failed on the first example, an error message describing the problem will be displayed. If the dialing process is failed on the second example, error message won't be displayed.

May be like that in such a file with the extension "lnk", but that does not work: I:\Programs\NirCmd\nircmd.exe nircmd closeprocess rainlendar.exe

Last edited by Dirk (2015-12-01 22:04)

Offline

#17 2015-12-01 22:29

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Close a program periodically?

Use Shutter's built-in "Run Program" action.

Test that command line first to see if it actually works.

Offline

#18 2015-12-01 22:37

Dirk
Member
Registered: 2013-04-05
Posts: 91

Re: Close a program periodically?

Use Shutter's built-in "Run Program" action.

Yes, I would do it if I could get the code / line / function to work.

Test that command line first to see if it actually works.

Yes, a very good idea, I did, that's why I know it does not work. I do not understand where to enter the code line - "nircmd closeprocess rainlendar.exe". Where should I enter it?

Offline

#19 2015-12-01 22:49

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Close a program periodically?

"nircmd closeprocess rainlendar.exe"

That was just an example. You need to find the exact command to execute.

Substitute "rainlendar.exe" with whatever the actual process name is of your Rainlendar application. Replace "nircmd" with full path to the "nircmd" executable.

You can test this command in the Command Prompt (type "cmd" in Windows Run menu).

Offline

#20 2015-12-01 22:51

Dirk
Member
Registered: 2013-04-05
Posts: 91

Re: Close a program periodically?

OK, thank you very much.

Offline

Board footer

Powered by FluxBB