Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Triggering Macro if two different events triggered

If you have a question or need help, this is the place to be.
Post Reply
TitaniumDust
Posts: 5
Joined: Fri Oct 01, 2010 7:38 pm

Triggering Macro if two different events triggered

Post by TitaniumDust »

Hi, I've been using EventGhost for a while and really love it, and I just recently discovered it could be used to control my Griffin PowerMate (shuttle jog/button) since the supplied software is extremely buggy. I am running EventGhost 0.3.7.r1462 and Windows 7 Home Premium x64.

I'm sure the solution to this is very easy for the experienced, but I unfortunately have no Python scripting knowledge whatsoever. I've gotten the basic volume controls working great using macros and the generic HID plugin. However, there is one function I can't figure out. The HID device sends one event on the button being pressed down, and another event when the button is released. However, it doesn't give any indication *how long* its been pressed so using the "jump if long press" action is useless. I will call the down press event "PM.1" and the button release event "PM.2".

Here's what I would like to do: I have 2 macros - one if the button press is short (less than x seconds) and another macro if the button press is long (more than x seconds). So, in my short press macro, in order for it to run, it would have to see event PM.1 and then PM.2 within x seconds. In my long press macro, it would have to see event PM.1 and then PM.2 longer than x seconds. Is there a way to do this?

Thank you so much!
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Triggering Macro if two different events triggered

Post by Pako »

The solution is quite simple. Here is the example for the limit = 2 seconds:
Short-Long.jpg
Short-Long.jpg (9.46 KiB) Viewed 4536 times
Pako
TitaniumDust
Posts: 5
Joined: Fri Oct 01, 2010 7:38 pm

Re: Triggering Macro if two different events triggered

Post by TitaniumDust »

Thank you Pako, for replying so quickly. It works perfectly! :D

I'm gonna go donate since I LOVE this program, using my real name of course.
TitaniumDust
Posts: 5
Joined: Fri Oct 01, 2010 7:38 pm

Re: Triggering Macro if two different events triggered

Post by TitaniumDust »

I figured I'd post my config in case there is anyone out there who wishes to use their PowerMate with EventGhost instead of their awful software. My config allows for clockwise and counterclockwise rotation, and a short and long button press. I didn't have any need for rotation+button but you could easily add macros for that. Just remember to autostart the "Generic HID" plugin, choose the Griffin PowerMate when prompted, and choose the raw data option. In my example, 0.45 (seconds) is the amount of time that differentiates a short press and a long press.

Image
Ludo
Posts: 1
Joined: Thu Jan 26, 2017 10:41 pm

Re: Triggering Macro if two different events triggered

Post by Ludo »

Thanks!

I'm new here and was wondering if any problems running Eventghost to run one HID while letting Win10 run the rest. Any comments?

Ludo
Post Reply