Difference between revisions of "Shutter:Events"

From den4b Wiki
Jump to navigation Jump to search
("File Size" event description updated)
(Restructure the article, no more massive table.)
 
Line 1: Line 1:
{{Up|Shutter}}  
+
{{Up|Shutter}}
  
 
Below is a list of all available events.  
 
Below is a list of all available events.  
Line 5: Line 5:
 
Remember that Shutter is often used with a ''set'' of multiple events (rather than a single event); and these events have a [[Shutter:Logic|pre-defined relationship]] between them.  
 
Remember that Shutter is often used with a ''set'' of multiple events (rather than a single event); and these events have a [[Shutter:Logic|pre-defined relationship]] between them.  
  
{| class="wikitable"
+
== Countdown ==
|-
+
 
! Event
+
Count down a specified amount of time. This Event is considered "triggered" when the timer reaches zero.  
! Description
+
 
! Example uses
+
'''Example uses:'''
|-
+
 
| Countdown
 
| Count down a specified amount of time. This Event is considered "triggered" when the timer reaches zero.  
 
|
 
 
#If you suffer from [http://en.wikipedia.org/wiki/Repetitive_strain_injury RSI], set timer to take a break every few minutes and exercise your hands, shoulder and neck.
 
#If you suffer from [http://en.wikipedia.org/wiki/Repetitive_strain_injury RSI], set timer to take a break every few minutes and exercise your hands, shoulder and neck.
 
#Use Shutter as a count-down timer clock (to give alarm at the end of specified time).  
 
#Use Shutter as a count-down timer clock (to give alarm at the end of specified time).  
 
#Play a pre-recorded sound every few minutes (to calm down a baby or a pet).
 
#Play a pre-recorded sound every few minutes (to calm down a baby or a pet).
  
|-
+
== On Time ==
| On Time  
+
 
| Event is triggered when the current time (as displayed in the system tray) reaches the specified time.  
+
Event is triggered when the current time (as displayed in the system tray) reaches the specified time.  
|
+
 
 +
'''Example uses:'''
 +
 
 
#Launch an application (e.g. a downloader) at certain time.  
 
#Launch an application (e.g. a downloader) at certain time.  
 
#Share your PC on LAN till a particular time, and then turn it off at certain time.
 
#Share your PC on LAN till a particular time, and then turn it off at certain time.
  
|-
+
== Winamp Stops ==
| Winamp Stops  
+
 
| Event periodically checks the playback state of [http://www.winamp.com/ Winamp]. The event is triggered once it is detected that application is no longer playing the media.  
+
Event periodically checks the playback state of [http://www.winamp.com/ Winamp]. The event is triggered once it is detected that application is no longer playing the media.  
 +
 
 
'''Note:''' [http://forums.winamp.com/showthread.php?threadid=180297 Winamp Messaging API] is used to achieve this.  
 
'''Note:''' [http://forums.winamp.com/showthread.php?threadid=180297 Winamp Messaging API] is used to achieve this.  
  
|
+
'''Example uses:'''
 +
 
 
#When the WinAmp playlist is over, pause for a specified time period and then play another playlist, or hibernate the PC.
 
#When the WinAmp playlist is over, pause for a specified time period and then play another playlist, or hibernate the PC.
  
|-
+
== CPU Usage ==
| CPU Usage  
+
 
| Periodically check the processor usage and trigger event when the usage stays above (or below) the specified mark for the specified amount of time.  
+
Periodically check the processor usage and trigger event when the usage stays above (or below) the specified mark for the specified amount of time.
|
+
 +
'''Example uses:'''
 +
 
 
#Launch a CPU-intensive application (e.g. Blender rendering) to get the benefit of full CPU power.
 
#Launch a CPU-intensive application (e.g. Blender rendering) to get the benefit of full CPU power.
 
#When CPU usage goes above certain threshold, pause the resource-intensive applications.
 
#When CPU usage goes above certain threshold, pause the resource-intensive applications.
  
|-
+
== Network usage ==
| Network usage
+
 
| Check the network's load (select from ''total'', ''upload only'', or ''download only''); and if it falls below specified limit for the specified duration, then the event is triggered.  
+
Check the network's load (select from ''total'', ''upload only'', or ''download only''); and if it falls below specified limit for the specified duration, then the event is triggered.  
|
+
 
 +
'''Example uses:'''
 +
 
 
#Start a downloader when the download is below a limit.
 
#Start a downloader when the download is below a limit.
 
#Upload a large folder when the upload falls below certain point
 
#Upload a large folder when the upload falls below certain point
 
#Pause file-transfers till the total traffic in the network falls below a certain limit.
 
#Pause file-transfers till the total traffic in the network falls below a certain limit.
  
|-
+
== User Inactive ==
| User Inactive  
+
 
|
 
 
Track the time of user's last mouse and keyboard activity. Trigger the event when the user has been inactive for the specified period of time.  
 
Track the time of user's last mouse and keyboard activity. Trigger the event when the user has been inactive for the specified period of time.  
  
 
Methods for monitoring user inactivity:
 
Methods for monitoring user inactivity:
 +
 
# '''Last Input Event''' - Uses <tt>GetLastInputInfo</tt> API. Captures activity only of the initiating user session. The most stable and the least intrusive approach.
 
# '''Last Input Event''' - Uses <tt>GetLastInputInfo</tt> API. Captures activity only of the initiating user session. The most stable and the least intrusive approach.
 
# '''Low Level Hook''' - Uses <tt>SetWindowsHookEx(WH_KEYBOARD_LL)</tt> and <tt>SetWindowsHookEx(WH_MOUSE_LL)</tt> API. Captures activity from all user sessions. Applied without injection into foreign processes to achieve a less intrusive effect, contrary to the official documentation, so it may stop working in future versions of Windows.
 
# '''Low Level Hook''' - Uses <tt>SetWindowsHookEx(WH_KEYBOARD_LL)</tt> and <tt>SetWindowsHookEx(WH_MOUSE_LL)</tt> API. Captures activity from all user sessions. Applied without injection into foreign processes to achieve a less intrusive effect, contrary to the official documentation, so it may stop working in future versions of Windows.
 
# '''Injection Hook''' - Uses <tt>SetWindowsHookEx(WH_KEYBOARD)</tt> and <tt>SetWindowsHookEx(WH_MOUSE)</tt> API. Captures activity from all user sessions. A tiny dedicated library file is injected into all foreign processes to capture user activity across all applications. This is a well established approach which may yield better results in some cases, but it is the most intrusive approach.  
 
# '''Injection Hook''' - Uses <tt>SetWindowsHookEx(WH_KEYBOARD)</tt> and <tt>SetWindowsHookEx(WH_MOUSE)</tt> API. Captures activity from all user sessions. A tiny dedicated library file is injected into all foreign processes to capture user activity across all applications. This is a well established approach which may yield better results in some cases, but it is the most intrusive approach.  
  
|
+
'''Example uses:'''
 +
 
 
#Play WinAmp when no one is using the PC (turn the PC into entertainment center).  
 
#Play WinAmp when no one is using the PC (turn the PC into entertainment center).  
 
#Launch a task that can otherwise slow down the PC.
 
#Launch a task that can otherwise slow down the PC.
  
|-
+
== Battery Low ==
| Battery Low  
+
 
| Monitor power battery level and trigger event when level drops below specified level.  
+
Monitor power battery level and trigger event when level drops below specified level.  
|
+
 
 +
'''Example uses:'''
 +
 
 
#Take backup of critical data.  
 
#Take backup of critical data.  
 
#Close specified applications gracefully.  
 
#Close specified applications gracefully.  
 
#Remind the user to plug in the laptop charger.
 
#Remind the user to plug in the laptop charger.
  
|-
+
== Window Closes ==
| Window Closes  
+
 
|
 
 
Monitor opened windows for the specified title match. Event is triggered when specified title does not match any of the opened windows.  
 
Monitor opened windows for the specified title match. Event is triggered when specified title does not match any of the opened windows.  
  
Line 80: Line 87:
 
'''Note:''' Be careful when specifying the window name: The text should match with what you see in the '''Title Bar '''of the application (the top bar of the application's window). Sometimes the '''Title Bar''' shows the file that is opened in the application, instead of the application's name.
 
'''Note:''' Be careful when specifying the window name: The text should match with what you see in the '''Title Bar '''of the application (the top bar of the application's window). Sometimes the '''Title Bar''' shows the file that is opened in the application, instead of the application's name.
  
|
+
'''Example uses:'''
 +
 
 
#Warn the user that the desired application has stopped running.
 
#Warn the user that the desired application has stopped running.
 
#Launch the process ''only if'' the application is not running already (to avoid multiple instances running simultaneously)
 
#Launch the process ''only if'' the application is not running already (to avoid multiple instances running simultaneously)
  
|-
+
== Process Stops ==
| Process Stops  
+
 
| Monitor all processes that match the specified filename. Event is triggered when the specified filename is not found in the list of executing processes.  
+
Monitor all processes that match the specified filename. Event is triggered when the specified filename is not found in the list of executing processes.  
|
+
 
 +
'''Example uses:'''
 +
 
 
#Warn the user that the process has stopped.  
 
#Warn the user that the process has stopped.  
 
#Launch the next process in sequence.
 
#Launch the next process in sequence.
  
|-
+
== Ping Stops ==
| Ping Stops  
+
 
| [http://en.wikipedia.org/wiki/Ping Ping] the specified host and trigger when host is not responding for the specified period of time. Useful for monitoring availability of network services.  
+
[http://en.wikipedia.org/wiki/Ping Ping] the specified host and trigger when host is not responding for the specified period of time. Useful for monitoring availability of network services.  
|
+
 
 +
'''Example uses:'''
 +
 
 
#Warn the user that the remote PC is not communicating any more (either bad link or crash).
 
#Warn the user that the remote PC is not communicating any more (either bad link or crash).
|-
+
 
| File Size
+
== File Size ==
| Periodically check the size of the specified file and trigger the event when the selected condition is met.
+
 
 +
Periodically check the size of the specified file and trigger the event when the selected condition is met.
  
 
The list of available conditions:
 
The list of available conditions:
Line 107: Line 120:
  
 
Internally, when the file or directory does not exist, it has an effective size of "-1".
 
Internally, when the file or directory does not exist, it has an effective size of "-1".
|
+
 
 +
'''Example uses:'''
 +
 
 
#Take a backup of the file.
 
#Take a backup of the file.
 
#Warn the user that the file size has reached the limit.
 
#Warn the user that the file size has reached the limit.
 
|}
 
  
 
[[Category:Shutter]]
 
[[Category:Shutter]]

Latest revision as of 14:48, 15 April 2022

Arrow Return.png Shutter  

Below is a list of all available events.

Remember that Shutter is often used with a set of multiple events (rather than a single event); and these events have a pre-defined relationship between them.

Countdown

Count down a specified amount of time. This Event is considered "triggered" when the timer reaches zero.

Example uses:

  1. If you suffer from RSI, set timer to take a break every few minutes and exercise your hands, shoulder and neck.
  2. Use Shutter as a count-down timer clock (to give alarm at the end of specified time).
  3. Play a pre-recorded sound every few minutes (to calm down a baby or a pet).

On Time

Event is triggered when the current time (as displayed in the system tray) reaches the specified time.

Example uses:

  1. Launch an application (e.g. a downloader) at certain time.
  2. Share your PC on LAN till a particular time, and then turn it off at certain time.

Winamp Stops

Event periodically checks the playback state of Winamp. The event is triggered once it is detected that application is no longer playing the media.

Note: Winamp Messaging API is used to achieve this.

Example uses:

  1. When the WinAmp playlist is over, pause for a specified time period and then play another playlist, or hibernate the PC.

CPU Usage

Periodically check the processor usage and trigger event when the usage stays above (or below) the specified mark for the specified amount of time.

Example uses:

  1. Launch a CPU-intensive application (e.g. Blender rendering) to get the benefit of full CPU power.
  2. When CPU usage goes above certain threshold, pause the resource-intensive applications.

Network usage

Check the network's load (select from total, upload only, or download only); and if it falls below specified limit for the specified duration, then the event is triggered.

Example uses:

  1. Start a downloader when the download is below a limit.
  2. Upload a large folder when the upload falls below certain point
  3. Pause file-transfers till the total traffic in the network falls below a certain limit.

User Inactive

Track the time of user's last mouse and keyboard activity. Trigger the event when the user has been inactive for the specified period of time.

Methods for monitoring user inactivity:

  1. Last Input Event - Uses GetLastInputInfo API. Captures activity only of the initiating user session. The most stable and the least intrusive approach.
  2. Low Level Hook - Uses SetWindowsHookEx(WH_KEYBOARD_LL) and SetWindowsHookEx(WH_MOUSE_LL) API. Captures activity from all user sessions. Applied without injection into foreign processes to achieve a less intrusive effect, contrary to the official documentation, so it may stop working in future versions of Windows.
  3. Injection Hook - Uses SetWindowsHookEx(WH_KEYBOARD) and SetWindowsHookEx(WH_MOUSE) API. Captures activity from all user sessions. A tiny dedicated library file is injected into all foreign processes to capture user activity across all applications. This is a well established approach which may yield better results in some cases, but it is the most intrusive approach.

Example uses:

  1. Play WinAmp when no one is using the PC (turn the PC into entertainment center).
  2. Launch a task that can otherwise slow down the PC.

Battery Low

Monitor power battery level and trigger event when level drops below specified level.

Example uses:

  1. Take backup of critical data.
  2. Close specified applications gracefully.
  3. Remind the user to plug in the laptop charger.

Window Closes

Monitor opened windows for the specified title match. Event is triggered when specified title does not match any of the opened windows.

  • The name is NOT case-sensitive.
  • You can specify wildcards to find a partial match. For example, *Firefox*.
    If you do not use wildcards, Shutter will look for an exact match (if the actual Window name has more characters compared to the specified string, Shutter will treat it as "not matching").

Note: Be careful when specifying the window name: The text should match with what you see in the Title Bar of the application (the top bar of the application's window). Sometimes the Title Bar shows the file that is opened in the application, instead of the application's name.

Example uses:

  1. Warn the user that the desired application has stopped running.
  2. Launch the process only if the application is not running already (to avoid multiple instances running simultaneously)

Process Stops

Monitor all processes that match the specified filename. Event is triggered when the specified filename is not found in the list of executing processes.

Example uses:

  1. Warn the user that the process has stopped.
  2. Launch the next process in sequence.

Ping Stops

Ping the specified host and trigger when host is not responding for the specified period of time. Useful for monitoring availability of network services.

Example uses:

  1. Warn the user that the remote PC is not communicating any more (either bad link or crash).

File Size

Periodically check the size of the specified file and trigger the event when the selected condition is met.

The list of available conditions:

  1. file reaches a certain size;
  2. file is created;
  3. file no longer exists.

Internally, when the file or directory does not exist, it has an effective size of "-1".

Example uses:

  1. Take a backup of the file.
  2. Warn the user that the file size has reached the limit.