#1 2013-09-15 19:56

boogerlad
Member
Registered: 2013-09-15
Posts: 3

Advanced logic for events

if(userIdle > 5)
{
    if(networkIdle && cpuIdle)
    {
        sleep();
    }
    else
    {
        monitor(off);
    }
}

As far as I know, this kind of logic is not available in current versions of shutter, and may require a huge overhaul in the current codebase, but is such a thing planned?

Offline

#2 2013-09-15 22:58

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

Re: Advanced logic for events

I have been thinking about this for a while, specifically replacing "If Events Then Actions" logic with a workflow where both events and actions are the building blocks of the logical sequence. The problem is how to allow users easily define such a scenario, including the one from your example.

Asking users to actually write down code for the logic is out of the question. It needs to be simple and transparent.

I am currently imagining a list similar to either of events or actions, where each line will be a logic step. User can add either an event or an action and specify the logic of the step (IF, THEN, WHILE, AND, OR, etc). The whole workflow will be build for user.

For example:

IF User Idle
IF Network Idle
AND CPU Idle
THEN Turn Off Monitor 

Offline

#3 2017-01-18 10:54

Grendizerus
Member
Registered: 2017-01-18
Posts: 16

Re: Advanced logic for events

There is a graphical way for if then else statements : tree like interfaces. It exists in 3d and video apps:
http://xsisupport.files.wordpress.com/2 … =584&h=330

But of course the whole app would need to be rewritten that way and it would be a huge task smile

Offline

#4 2018-04-16 11:54

Vandabee
Member
Registered: 2018-04-16
Posts: 5

Re: Advanced logic for events

Hi,

This could be made quite logical.

Replace the existing logics by these two logics:
"1BY1 with resume"  [Event is monitored after it is passed. If the threshold of a passed event is exceeded, the logic resumes to that event. If it is easier to reset the entire logic that would also work for most scenarios.]
"1BY1" [Current version]

The user would choose a logic.

The user could group events on the list using: AND, OR

The idea is that a user could select two or more events, groups of events, or even groups of events and groups, and link them with AND or OR (button press or context menu)

It would also make sense to have a NOT which could be wrapped around single events and groups of events.

Example, bad but shows the logic
AND(
OR(
CPU Idle
Network Idle)
User Idle)
Countdown: Wait 0:10:00



Cheers!

Last edited by Vandabee (2018-05-15 07:39)

Offline

Board footer

Powered by FluxBB