How to avoid script running second instance of application

Forum over Homeseer scripts (DUTCH forum)

Moderators: TANE, Ruud

Post Reply
Darwusch
Member
Member
Posts: 164
Joined: Sun Dec 21, 2008 10:25 pm
Location: Netherlands

How to avoid script running second instance of application

Post by Darwusch »

For my webcam I use Active Webcam to host the webcam server.
It allows parameters to turn motion detection on or of, like from the command line:

Code: Select all

C:\Progra~2\Active~1\WebCam.exe /CAM_NO 2 /M_ON
This turns motion detection on for camera number 2.

Now I tried this with HS in three ways:
1) Event launching an application, with the above parameters.
2) Event launching a *.bat script with the command above
3) Event launching a *.vb script with the command above
They all start a second instance of the WebCam.exe, which is not what I want.
However, when I open a command prompt and run the code above, it does work.
Also when I stop homeseer as a service, and I start it as a program (not restarting the service), it also works correctly.
The HS service is run as the same user, so I don't understand this.
Can you help me out here?
LostDreamer
Member
Member
Posts: 73
Joined: Fri Apr 10, 2009 1:43 pm
Location: Netherlands
Contact:

Re: How to avoid script running second instance of application

Post by LostDreamer »

Have you set the service to "Interact With Desktop" ?
This might be needed
[url=https://www.viagrasansordonnancefr.com/commander-sildenafil-100-q-sirve/]commander sildenafil 100 q sirve www.viagrasansordonnancefr.com[/url]
Darwusch
Member
Member
Posts: 164
Joined: Sun Dec 21, 2008 10:25 pm
Location: Netherlands

Re: How to avoid script running second instance of application

Post by Darwusch »

I noticed that I didn't run HS as a service, but I set it as a sceduled task running as the admin user at system startup.
So I can not use the service settings. Running HS as a service is not recommended.
Problem stays the same.
r_255
Advanced Member
Advanced Member
Posts: 621
Joined: Wed Jun 11, 2008 9:39 pm
Location: Netherlands

Re: How to avoid script running second instance of application

Post by r_255 »

if i am correct there is a option some where in events that allows a event not to retrigger..
Darwusch
Member
Member
Posts: 164
Joined: Sun Dec 21, 2008 10:25 pm
Location: Netherlands

Re: How to avoid script running second instance of application

Post by Darwusch »

There is, but it only has influence on the moment the task is run, which is at system startup. Ans then it simply ignors a second instance of that task.
It has no meaning for a later moment when I run the command.
Post Reply

Return to “Homeseer Scripts Forum”