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.

Start appl/batch file on specific USB device connect

If you have a question or need help, this is the place to be.
Post Reply
amardeep
Posts: 2
Joined: Sun Oct 12, 2014 8:56 am

Start appl/batch file on specific USB device connect

Post by amardeep »

I want to run an application or a batch file when my USB dongle is connected. This is what I have been able to come up with till now:

Code: Select all

<Event Name="System.DeviceAttached" />
    <Action>
        EventGhost.PythonCommand(u'if eg.event.payload[0][8:25]=="VID_12D1&PID_14DC": print "Works!"')
    </Action>
In place of print "Works!", I need to add Wait=3sec; Start app="path\to\app.bat". How to do it?
Thanks.
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Start appl/batch file on specific USB device connect

Post by Pako »

DEMOamardeep.png
DEMOamardeep.png (11.02 KiB) Viewed 1587 times
Pako
amardeep
Posts: 2
Joined: Sun Oct 12, 2014 8:56 am

Re: Start appl/batch file on specific USB device connect

Post by amardeep »

Thanks! :D
Post Reply