Sign in to follow this  
Followers 0
gertsolo

Script starting based on USB drive detection

3 posts in this topic

Hey all,

is this possible and how to do it.

I have a PC without screen stored somewhere. From time to time I have to sync files to that PC with an USB drive. At the moment I use remote desktop to take over the desktop and do the necessary stuff.

Is it possible to have an autoscript running in background which starts up when detecting the USB drive?

any help is welcome.


The more you learn, the less you know.

Share this post


Link to post
Share on other sites



Hey all,

is this possible and how to do it.

I have a PC without screen stored somewhere. From time to time I have to sync files to that PC with an USB drive. At the moment I use remote desktop to take over the desktop and do the necessary stuff.

Is it possible to have an autoscript running in background which starts up when detecting the USB drive?

any help is welcome.

I think there some scripts around which will do that.

You can use

$d = DriveGetDrive("REMOVABLE");get a list of drives

For one application, where inserting a usb flash drive brings a window which I don't want I do this

Opt("WinTitleMatchMode", 2);match any substring
$USBDrive = "F";the letter of the drive for the usb drive
$USBWinTitle = "(" & $USBDrive & ":)"
While $somecodition
    
    If WinExists($USBWinTitle) Then
        WinClose($USBWinTitle)
    ;do something
    EndIf
    
    Sleep(100)
WEnd

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

I use a flashdrive that has U3 on it. What it does is the drive is split into 2, with one posing as a CDRom drive. When it is plugged in, the CDRom will kick off the autorun.inf, loading the U3 software. You could use one of these drives, but change the autorun to suit your needs.

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