Sign in to follow this  
Followers 0
mark2004

Auto-launch of a script

3 posts in this topic

Hi all.

I would like to have a program launch automatically when my camera is connected to the computer via usb.

The camera shows up as the F Drive. Is there a way to make a program launch automatically when the camera

drive is detected??

I don't know where to start on this one.

Thanks.

Share this post


Link to post
Share on other sites



O.K. I guess you have to create a program that is running constantly to accomplish this. That

seems obvious now that I think about it. Thanks for pointing me in the right direction.

This is a start:

While 1
    If FileExists('F:\*') Then _LaunchProgram()
    Sleep(100)
WEnd

Func _LaunchProgram()
    Run('Program.exe')
    ProcessWaitClose('Program.exe')
    While FileExists('F:\*')
        Sleep(100)
    Wend
EndFunc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0