Yawcam and task scheduler

Questions? Suggestions? Need help? Talk about anything related to Yawcam...
Post Reply
jose francisco
Posts: 3
Joined: Wed Mar 30, 2011 1:51 pm

Yawcam and task scheduler

Post by jose francisco »

Hello.

Yawcam is a great program but I have some problems with task scheduler in wXP.

I'm trying to launch Yawcam when the computer has no activity and close it again when activity is detected.

The problem is:
The program opens but no closes. I have activated an option to close the program after n minutes, but it doesn't work too.

Is there other option to save pics in no-activity time?

Thanks a lot.
z3r0c00l12
Moderator
Posts: 1210
Joined: Wed Jan 14, 2009 3:50 am

Post by z3r0c00l12 »

I am not aware of any options that would allow to do this natively, but there are definitely better ways to do it than using scheduled tasks, I would use AutoIT with the _Timer_GetIdleTime function, and just set it that if the idle time is more than a certain amount, start yawcam and when the idle time drops back down, stop yawcam.
AIactive
Posts: 13
Joined: Wed Mar 30, 2011 8:03 pm

Post by AIactive »

I use AutoIt too and it works good so try that!
jose francisco
Posts: 3
Joined: Wed Mar 30, 2011 1:51 pm

Thanks

Post by jose francisco »

I'm learning and working with this new (for me) and wonderful tool and I can only say... thanks!

mouse? touch screen? ..? give me a scripting tool!
z3r0c00l12
Moderator
Posts: 1210
Joined: Wed Jan 14, 2009 3:50 am

Post by z3r0c00l12 »

for you, I'd start with something like this:

Code: Select all

While 1 = 1
  If _Timer_GetIdleTime() >= RegRead("HKCU\Control Panel\Desktop","ScreenSaveTimeout") Then
    Run("net start yawcam","",@SW_HIDE)
    While _Timer_GetIdleTime() >= RegRead("HKCU\Control Panel\Desktop","ScreenSaveTimeout")
      Sleep(1000)
    WEnd
    Run("net stop yawcam","",@SW_HIDE)
  EndIf
WEnd
Go on with this...
jose francisco
Posts: 3
Joined: Wed Mar 30, 2011 1:51 pm

Thanks

Post by jose francisco »

very nice code.
Thanks a lot.
Post Reply