dustinrue / ControlPlane

ControlPlane - context-sensitive computing for OS X
http://www.controlplaneapp.com
BSD 3-Clause "New" or "Revised" License
1.76k stars 180 forks source link

Sometimes there is a delay and sometimes it's not there... #411

Closed Panja0 closed 9 years ago

Panja0 commented 9 years ago

I'm using ControlPlane v1.5.7 with a Macbook Pro Retina Early 2015, fresh install of Yosemite 10.10.3. All is working and I have created a few contexts. For instance when opening a specific application (which is hosted on a external server) it will open my VPN connection first (through an AppleScript). Another context I made is for an other application. Opening the app will trigger an AppleScript which will do a key combo (CMD+OPTION+S). As I said all is working but sometimes ControlPlane triggers the command immediately and sometimes it has a delay, it than takes a few seconds before the action begins. So to be clear. When I open up the first app it sometimes connects to VPN immediately and sometimes it takes a few seconds before it starts connecting. With the second application it sometimes runs the key combo immediately and sometimes it takes a few seconds.

Of course I did NOT set a delay in ControlPlane.

Is this a known "bug"?

dustinrue commented 9 years ago

It has to do with how ControlPlane works. It looks at the state of the computer every few seconds so there are times when the new application will be apparent to it immediately or you’ll wait for the next “scan” to take place. Although ControlPlane can and does make use of events/notifications in the OS there are times where they won’t fire for various reasons and it falls back to the scanning approach.

Panja0 commented 9 years ago

Thanks for the fast response! Ok, understood.

I did change the "time interval between re-eveluating rules" (advanced settings) from 5 seconds to 2 seconds. I noticed its more immediately now than before. Is that because I changed this value or is it just luck? ;)

dustinrue commented 9 years ago

Direct result of changing that value. :)

Panja0 commented 9 years ago

Wicked! :dancers:

Thanks