Jump to content

avi from dcl function?


Small Fish

Recommended Posts

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

@+

Link to comment
Share on other sites

  • 11 years later...
  • Replies 41
  • Created
  • Last Reply

Top Posters In This Topic

  • Patrick_35

    12

  • Lee Mac

    11

  • The Buzzard

    11

  • Small Fish

    7

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

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...