manase 发表于 2022-7-5 23:59:10

close browser (internet) with

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

manase 发表于 2022-7-6 00:36:00

Somebody behind a monitor verify all the sites I visited ( i suppose is my sweet boss)... and I need some help to opena 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???

Lee Mac 发表于 2022-7-6 00:52:10

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

manase 发表于 2022-7-6 01:12:04

Thanks Lee! you saved my job!
i will use your lisp only when i will be on vacation...
页: [1]
查看完整版本: close browser (internet) with