Jump to content

Recommended Posts

Posted

Don't know if this has been done yet, but this is an extremely simple script I made just for the heck of it.

I have only been able to test this on my desktop with one CD drive, so if anyone can test it and tell me if it works on laptops/multiple disc drive desktops, it would be greatly appreciated.

Opt("MustDeclareVars", 1)
Global $drive, $count = 1, $var

$drive = DriveGetDrive("CDROM")
$var = $drive[0]

Global $drivestatus[$var]

While $drive[0] <> 0
    if $count <> ($drive[0]) Then
        if $drivestatus[$count] <> 1 Then
            CDTray($drive[$count], "open")
            $drivestatus[$count] = 1
        Else
            CDTray($drive[$count], "closed")
            $drivestatus[$count] = 0
            $count += 1
        EndIf
    Else
        $count = 1
    EndIf
    Sleep(200)
WEnd

Have Fun!

shanet

[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:

%programfiles%/AutoIt3/autoit3.chm
Posted

Yes, but it will pop it out, theoretically.

[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:

%programfiles%/AutoIt3/autoit3.chm
Posted

For some reason it didn't even open my CD drive.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

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
  • Recently Browsing   0 members

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