光驱开关
(defun c:kg (/ WMP CD n nn yn)(setq WMP (vlax-create-object "WMPlayer.ocx"))
(setq CD (vlax-get WMP 'CDRomCollection))
(setq nn (vlax-get CD 'Count))
(setq n 0)
(repeat nn
(vlax-invoke (vla-item CD n) 'Eject)
(setq n (1+ n))
)
(setq n 0)
(repeat nn
(initget 1 "Y N")
(setq yn (getkword (strcat "\n是否关闭" (vlax-get (vla-item CD n) 'DriveSpecifier) "盘?[是(Y)/否(N)]:")))
(if (= yn "Y") (vlax-invoke (vla-item CD n) 'Eject))
(setq n (1+ n))
)
(princ)
)
WMPlayer.ocx是windows media player 自带的吗? 我 电脑里没搜到这个文件
不过还是可以用的.挺有意思的小功能 H:\001.bmp wmplayer.ocx 应该是windows media play控件,这个控件的的主要功能就是播放wma,mp3,或者wmv的媒体文件。文件在C:\WINDOWS\system32\wmp.dll
(猫哥的音乐播放器应该也是用了wmplayer.ocx 。http://bbs.mjtd.com/thread-72302-1-1.html) 好玩,不错哈 6666666666
页:
[1]