Jump to content

Auto-launch of a script


Recommended Posts

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.

Link to comment
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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...