Little Script

08/25/2013 17:44 kimboy600#1
Hi everyone , i decided to share some little home-made creation.
This is a simple CD tray :cool:
HTML Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("CD", 118, 61, -1, -1, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_TRANSPARENT,$WS_EX_WINDOWEDGE))
$Button1 = GUICtrlCreateButton("Open", 0, 0, 117, 60)
GUISetState(@SW_SHOW)
$E = DriveGetDrive("CDROM")
$OC = 0

While 1
 $Msg = GUIGetMsg()
 Switch $Msg
  Case $GUI_EVENT_CLOSE
   Exit
Case $Button1
   If $OC = 1  Then
      CDTray($E[1] & "\", "Close")
	  GUICtrlSetData ($Button1,"Open")
      $OC = 0
   Elseif $OC = 0 Then
      CDTray($E[1] & "\", "open")
	  GUICtrlSetData ($Button1,"Close")
      $OC = 1
   EndIf   
 EndSwitch
WEnd
08/25/2013 18:03 alpines#2
Nice idea but it has no functional use for me. Adding some stuff like custom hotkeys and tooltips would make this script a lot more usable!
08/26/2013 00:29 kimboy600#3
Quote:
Originally Posted by alpines View Post
Nice idea but it has no functional use for me. Adding some stuff like custom hotkeys and tooltips would make this script a lot more usable!
I did this script for my dad , his tray is broken so he couldn't open the cd. Anyway i'll post more script 2morrow