Patrick_35 Posted July 23, 2009 Posted July 23, 2009 In the simplest (defun c:playAvi (/ video wsh mp run sh dir name time) (setq video (findfile "c:/test/volet.avi")) (setq wsh (vlax-create-object "WScript.Shell")) (setq mp (findfile "C:/program files/windows media player/wmplayer.exe")) (setq run (vlax-invoke-method wsh 'exec (strcat mp " " video))) (command "_.delay" 6000) (vlax-invoke run 'terminate) (vlax-release-object wsh) (princ) ) @+ Quote
lee50310 Posted May 22, 2021 Posted May 22, 2021 this test ok (defun C:AVI2 () (setq MEDIA "CLOCK.AVI") (setq AVI_LST (list "CLOCK.AVI" "WAITING.AVI")) (setq dcl_id (load_dialog "AVI.dcl")) (if (not (new_dialog "AVI" dcl_id) ) (exit) ) (start_list "SEL") (mapcar 'add_list AVI_LST) (end_list) (action_tile "cancel" "(done_dialog)(setq button nil)") (action_tile "accept" (strcat "(progn (setq MEDIA (atoi (get_tile \"SEL\")))" "(done_dialog)(setq button T))")) (start_dialog) (unload_dialog dcl_id) (if button (progn (setq MEDIA (fix MEDIA)) (setq MEDIA (nth MEDIA AVI_LST)) (cond ((= MEDIA "CLOCK.AVI")) ((= MEDIA "WAITING.AVI")) ) (AVI_SAVI) ) ) (princ) ) ;;;///////////////////////////////////////////////////////////////// (defun AVI_SAVI (/ MED) (if (not (setq MED (findfile MEDIA)) ) (alert (strcat "\nSorry - "MEDIA" Missing")) (startapp "C:/program files/windows media player/wmplayer.exe" MED) ) (princ) ) ;;;///////////////////////////////////////////////////////////////// AVI2.rar Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.