Jump to content

Recommended Posts

Posted

  Secure_ICT said:

No problem.

I did try doing this once. I had it working so you could have hot keys which would lock or unlock the CD Tray, sometimes it would work but then you keep pressing and it doesn't..

yea I had it lock but I notice if I pushed it in it does the same thing. Ill keep playing with it

Posted

Here is what I had:

HotKeySet("!^u", "_Unlock")
HotKeySet("!^l", "_Lock")
HotKeySet("1", "_Msg")
HotKeySet("{esc}", "_Esc")
#NoTrayIcon

$Lock = True

While $Lock = True
    CDTray("D:", "closed")
    $Lock = True
WEnd

While $Lock = False
    $Lock = False
WEnd

Func _Unlock()
    $Lock = False
EndFunc   ;==>_Unlock

Func _Lock()
    $Lock = True
    CDTray("D", "closed")
EndFunc   ;==>_Lock

Func _Esc()
    Exit
EndFunc   ;==>_Esc

Func _Msg()
    MsgBox(0, "CD Drive", $Lock)
EndFunc   ;==>_Msg

It's messy, but it could work if someone can be bothered.

Posted

  Secure_ICT said:

Here is what I had:

HotKeySet("!^u", "_Unlock")
HotKeySet("!^l", "_Lock")
HotKeySet("1", "_Msg")
HotKeySet("{esc}", "_Esc")
#NoTrayIcon

$Lock = True

While $Lock = True
    CDTray("D:", "closed")
    $Lock = True
WEnd

While $Lock = False
    $Lock = False
WEnd

Func _Unlock()
    $Lock = False
EndFunc   ;==>_Unlock

Func _Lock()
    $Lock = True
    CDTray("D", "closed")
EndFunc   ;==>_Lock

Func _Esc()
    Exit
EndFunc   ;==>_Esc

Func _Msg()
    MsgBox(0, "CD Drive", $Lock)
EndFunc   ;==>_Msg

It's messy, but it could work if someone can be bothered.

thanks nice picture :whistle:
Posted (edited)

WTF - Damn ugly code there would eat all your CPU and you can only lock / unlock one time

While $Lock = True
    CDTray("D:", "closed")
    $Lock = True
WEnd

While $Lock = False
    $Lock = False
WEnd
Edited by Shevilie

Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Posted

  Secure_ICT said:

No problem.

Its my real identity! I'm that person, well dog behind my screen. Woof!

hehe looks like a counter strike dog with his little microphone.

:) I have to get ready for school peace out guys :whistle:

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...