Jump to content

Recommended Posts

Posted

I know i can open an internet page from lisp (command "_.browser"), but how to close it?

Posted

Somebody behind a monitor verify all the sites I visited ( i suppose is my sweet boss)... and I need some help to open a site (redtube) every 5 minutes (or randomly...), and then to close it. I can open a site using lisp, but i don't know how to close it (cannot open 100 times that page without closing it). Any help for a honest fight???

Posted
(defun ephemeralbrowser ( url sec / iea )
   (if (setq iea (vlax-create-object "internetexplorer.application"))
       (vl-catch-all-apply
          '(lambda nil
               (vlax-invoke-method iea 'navigate url)
               (while (= :vlax-true (vlax-get-property iea 'busy))
                   (vl-cmdf "_.delay" 500)
               )
               (vlax-put-property iea 'fullscreen :vlax-true)
               (vlax-put-property iea 'visible    :vlax-true)
               (vl-cmdf "_.delay" (* sec 1000))
               (vlax-invoke-method iea 'quit)
           )
       )
   )
   (if (= 'vla-object (type iea))
       (vlax-release-object iea)
   )
   (princ)
)
(vl-load-com) (princ)

(ephemeralbrowser "http://www.google.com" 3)

Don't get fired... o:)

Posted (edited)

Thanks Lee! you saved my job!

i will use your lisp only when i will be on vacation... :)

Edited by manase

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