BLuFeNiX Posted May 31, 2008 Share Posted May 31, 2008 Desk Drive v1.0Straight from the support forum! if you have a floppy drive you may get VERY VERY annoyed...#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.11.12 (beta) Author: BLuFeNiX (formerly known as HackerZer0) Script Function: Add shortcut to removable media to desktop. #ce ---------------------------------------------------------------------------- Opt("OnExitFunc", "_CLEANUP") While 1 For $i = 65 to 90 If DriveStatus (Chr($i) & ":") = "READY" then If DriveGetType(Chr($i) & ":") = "Fixed" then Continueloop If NOT FileExists(@desktopDir & "\Drive (" & Chr($i) & ").lnk") then FileCreateShortcut(Chr($i) & ":",@DesktopDir & "\Drive (" & Chr($i) & ").lnk") Else FileDelete(@desktopDir & "\Drive (" & Chr($i) & ").lnk") EndIf Next Sleep(1000) WEnd Func _CLEANUP() FileDelete(@desktopDir & "\Drive (*).lnk") EndFunc http://blufenix.net Link to comment Share on other sites More sharing options...
James Posted May 31, 2008 Share Posted May 31, 2008 You could just choose to ignore a:\ Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
ProgAndy Posted May 31, 2008 Share Posted May 31, 2008 You could do it e.g. this way: (If a floppy exists, the Shortcut is always created, even, if no Disk is inserted) #cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.11.12 (beta) Author: BLuFeNiX (formerly known as HackerZer0) Script Function: Add shortcut to removable media to desktop. #ce ---------------------------------------------------------------------------- Opt("OnExitFunc", "_CLEANUP") If DriveStatus ("A:") <> "INVALID" Then FileCreateShortcut("A:",@DesktopDir & "\Drive (A).lnk"); Floppy A If DriveStatus ("B:") <> "INVALID" Then FileCreateShortcut("B:",@DesktopDir & "\Drive (B).lnk"); Floppy B While 1 For $i = 67 to 90 If DriveStatus (Chr($i) & ":") = "READY" then If DriveGetType(Chr($i) & ":") = "Fixed" then Continueloop If NOT FileExists(@desktopDir & "\Drive (" & Chr($i) & ").lnk") then FileCreateShortcut(Chr($i) & ":",@DesktopDir & "\Drive (" & Chr($i) & ").lnk") Else FileDelete(@desktopDir & "\Drive (" & Chr($i) & ").lnk") EndIf Next Sleep(1000) WEnd Func _CLEANUP() FileDelete(@desktopDir & "\Drive (*).lnk") EndFunc *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
HAL9000 Posted May 31, 2008 Share Posted May 31, 2008 opt("TrayMenuMode",1) HotKeySet("{ESCAPE}", "ESCAPE") While 1 For $i = 67 to 90 If DriveStatus (Chr($i) & ":") = "READY" then If DriveGetType(Chr($i) & ":") = "Fixed" then Continueloop If NOT FileExists(@desktopDir & "\Drive (" & Chr($i) & ").lnk") then fileCreateShortcut(Chr($i) & ":",@DesktopDir & "\Drive (" & Chr($i) & ").lnk") if FileExists(@desktopDir & "\Drive*.lnk") then TraySetState (4) Else FileDelete(@desktopDir & "\Drive (" & Chr($i) & ").lnk") if NOT FileExists(@desktopDir & "\Drive*.lnk") then TraySetState (8) EndIf Next Sleep(500) WEnd func escape() FileDelete(@desktopDir & "\Drive (*).lnk") Exit EndFunc Link to comment Share on other sites More sharing options...
BLuFeNiX Posted May 31, 2008 Author Share Posted May 31, 2008 i know i can disclude floppy checking, but that kinda defeats the purpose of the script, partially anyway. http://blufenix.net Link to comment Share on other sites More sharing options...
headroom Posted June 3, 2008 Share Posted June 3, 2008 is possible to use PNG file for icon drive? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now