CodeScript Moderator Team
Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Mon Jul 21, 2003 1:32 pm Post subject: Eject/Insert any Removable Drive !! |
|
|
Eject/Insert any Removable Drive
This script using a non VDS freeware DLL and Ejects/inserts(if possible) any removable drive including CDROM, Virtual CD/DVD drive etc.
If you want to operate only CDROM's (even multiple) then:
http://forum.vdsworld.com/viewtopic.php?t=1722
The script in this post has a much better User interface with tray icon,hotkeys etc and does not use any external dll.
You can add those to the below script also if U want.
The current script uses a non VDS freeware dll.
So use it at your own risk.
You can download the required dll and complete package at:
http://www.vdsworld.com/index.php?page=download&fileid=299
Enjoy !!
Code: |
#|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||#
#||||| ||||#
#|||| |||||| || ||||| || | ||||#
#|||| ||| || ||| || || |||| || || ||| |||| || ||| ||| ||||#
#|||| || ||| ||| || ||| || || ||||| ||| ||| || || ||| ||| || ||||#
#|||| || || || || | || |||||| ||| || || || || || || ||||#
#|||| ||||||| ||| ||| || ||| || ||||||| ||| ||| || || ||| ||| || ||||#
#|||| |||| ||| ||||| ||||| |||| |||| || || || ||| || ||||#
#||||| || ||||#
#|||||| ||||#
#|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||#
#-----------------------------------------------------------------------------#
# Info: Eject/Insert any Removable Drive #
# #
# Author: CodeScript. #
# #
# Copyright: (c) 2003 by CodeScript #
# Portions Copyright (c) 2002 by Delphin software #
#-----------------------------------------------------------------------------#
#WARNING:USES A NON VDS DLL
#USE AT YOUR OWN RISK !!
DIALOG CREATE,Eject/Insert any Removable Drive,-1,0,323,160
DIALOG ADD,STYLE,STYLE1,Verdana,14
DIALOG ADD,COMBO,COMBO1,66,78,60,21,,,STYLE1,LIST
DIALOG ADD,BUTTON,BUTTON1,30,188,70,40,Insert
DIALOG ADD,BUTTON,BUTTON2,82,188,70,40,Eject
DIALOG SHOW
LOADLIB dsdrive.dll
DIALOG SET,COMBO1,A@cr()B@cr()C@cr()D@cr()E@cr()F@cr()G@cr()H@cr()I@cr()J@cr()K@cr()L@cr()M@cr()N@cr()O@cr()P@cr()Q@cr()R@cr()S@cr()T@cr()U@cr()V@cr()W@cr()X@cr()Y@cr()Z
:EVLOOP
WAIT EVENT
GOTO @EVENT()
%E = @volinfo(H,T)
INFO %E !
exit
:BUTTON1BUTTON
%I = @lib(dsdrive.dll,Insert,INT:,@dlgtext(COMBO1))
goto EVLOOP
:BUTTON2BUTTON
%E = @lib(dsdrive,Eject,INT:,@dlgtext(COMBO1))
goto EVLOOP
:CLOSE
FREELIB dsdrive.dll
EXIT
|
_________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|