Jump to content

[Python] Abrir driver de CD (lib Ctype)


Recommended Posts


Pequeno script que faz uso da lib Ctype, abre a gaveta do Driver de CD.

Esta poderosa lib, ente outas coisas, permite acessar funções em DLL's.

# Exemplo pra abrir e fechar porta do driver de CD:

from ctypes import *
import time

print "abrindo...."
windll.winmm.mciSendStringA("set cdaudio door open", None, 0, 0)


print "fechando..."
windll.winmm.mciSendStringA("set cdaudio door closed", None, 0, 0)


"Vejo sempre além, pois me apóio em ombro de Gigantes"

Link to comment
Share on other sites

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

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.