Permalink
Browse files

Missing captures issue dev :

+ removed the tryFocus check as a condition before taking a screenshot
+ if evenDelay==0 in the conf. file there will be not time check to take a screenshot
  • Loading branch information...
1 parent c898fab commit a0d2d627fbbc5b5e5c60266ac9e1bf3b7ba3ad91 @metadirective metadirective committed May 13, 2014
Showing with 16 additions and 5 deletions.
  1. +3 −3 MediaCours.conf
  2. +13 −2 MediaCours.py
View
@@ -41,6 +41,9 @@ live=False
# a sound happens anyway when the whole recoding starts: one bip, stops: 2 bips or if some problems are detected: 3 bips
audiocue=True
+# Set the delay before a new screenshot can be taken in seconds (useful on an slow computer or to avoid double cliks)
+eventDelay=0.5
+
# Allow the client to act as a serveur for remote maintenance purposes
remoteControl=False
remotePort=80
@@ -74,9 +77,6 @@ bitrate=64000
# Set the keyStop to start/stop recording
stopKey= F8
-# Set the delay before a new screenshot can be taken in seconds (useful on an slow computer or to avoid double cliks)
-eventDelay=0.5
-
# Maximum Recording Length (in seconds). The recording stops above this duration and the soft come back in the initial state
# (1h=3600s ... 5h=18000s)
maxRecordingLength= 18000
View
@@ -379,13 +379,24 @@ def OnMouseEvent(event):
"""
Catching mouse events from the hook and deciding what to do
"""
- global recording,lastEvent,lastGlobalEvent
+ global recording,lastEvent,lastGlobalEvent,eventDelay
lastGlobalEvent=time.time()# For shutdownPC_if_noactivity
- if (recording == True) and (tryFocus == False) and( (time.time()-lastEvent)>eventDelay):
+
+ if (recording == True) and eventDelay==0:
+ #print "eventDelay is = 0"
if (event.MessageName == "mouse left down") or (event.Wheel==1) or (event.Wheel==-1):
if 0: winsound.MessageBeep(winsound.MB_ICONEXCLAMATION)
start_new_thread(screenshot,())
lastEvent=time.time()
+ else:
+ #print "evenDelay is != 0"
+ if (recording == True) and ( (time.time()-lastEvent)>eventDelay ):
+ #if (recording == True) and (tryFocus == False) and( (time.time()-lastEvent)>eventDelay):
+ if (event.MessageName == "mouse left down") or (event.Wheel==1) or (event.Wheel==-1):
+ if 0: winsound.MessageBeep(winsound.MB_ICONEXCLAMATION)
+ start_new_thread(screenshot,())
+ lastEvent=time.time()
+
if 0: # For debug purpose put 0 for example
print 'MessageName:',event.MessageName
print 'Message:',event.Message

0 comments on commit a0d2d62

Please sign in to comment.