Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
;############################################################ ;# File Name | cd open close draws with choice.wbt ;############################################################ ;#Start Date | 2004:05:14:09:01:23 ;############################################################ ;#Last Modified| 2004:05:14:09:01:23 ;############################################################ ;#Version No | 1.00 ;############################################################ ;# Author | Simon Thomson ;############################################################ ;# Comment | Find CD Drives the ask to open each one in turn ;############################################################ ;DiskScan options ;Req# Return value ; 0 List of unused disk IDs ; 1 List of removable drives (floppies, zip, Jaz drives etc.) ; 2 List of local fixed (hard) drives ; 4 List of remote (network) drives ; 8 CD-ROM (32 bit versions of WIL only) ;16 RamDisk (32 bit version of WIL only) cddrives=DiskScan(8) ;count the number of CD Drives found cdCount=ItemCount(cddrives,@TAB) ;Loop to ask if to open the CD Draw of each drive in turn For xx=1 To cdcount ;Get CD Drive number xx thiscd=StrCat(ItemExtract(xx,cddrives,@TAB),"\") cCDDrive=thiscd ;Ask if user wants to open the CD Draw ans=AskYesNo("Open CD Drive","Do you want to open CD Drive%@crlf%%cCDDrive% ?") If ans==@YES Then GoSub opendraw ;Back to start of loop Next ;All over :cancel ;Drop variables Drop(ans,param0,thiscd,xx,ccddrive) DropWild("cd*") Exit :opendraw ;If yes define and open the selected drive PlayMedia ("Open %cCDDrive%xx%% type CDAudio alias CDDrawer%xx%") PlayMedia ("Set CDDrawer%xx% Door Open Wait") ;Prompt to insert CD into open draw Message ("INSERT CD IN DRIVE %thiscd%","Insert the CD and click OK.") ;Close CD draw PlayMedia ("Set CDDrawer%xx% Door Closed Wait") ;Return to loop Return
Article ID: W16691
File Created: 2005:02:18:12:21:52
Last Updated: 2005:02:18:12:21:52