0 Members and 2 Guests are viewing this topic.
^C^C(startapp "explorer" "C:/Version_5.2.pdf")
That doesn't work very well. It opens up the My Documents window and just prints a 33 to the command line.
Quote from: Keith Brown on June 13, 2013, 09:14:47 AMThat doesn't work very well. It opens up the My Documents window and just prints a 33 to the command line.If the file can be found, it will open the file using the default program associated with the file extension.
Google chrome will open a PDF too.
(command "start" (strcat yourpathhere "ARCH_FILE.PDF"))
I just thought there was a better way to open a browser url.
(defun _openfileinchrome (file / sa) (and (findfile file) (setq sa (vlax-get-or-create-object "Shell.Application")) (null (vlax-invoke sa 'shellexecute "chrome.exe" file)) (vlax-release-object sa) ))(_openfileinchrome "c:\\test.pdf")
Quote from: Keith Brown on June 13, 2013, 09:35:08 AMI just thought there was a better way to open a browser url.Actually, this might be better:Code - Auto/Visual Lisp: [Select](defun browser ( url ) (setq url (strcat "\"" (vl-string-translate "/" "\\" url) "\"")) (vl-some '(lambda ( exe ) (and (findfile exe) (startapp exe url))) (list (strcat (getenv "programfiles") "\\Mozilla Firefox\\firefox.exe") (strcat (getenv "localappdata") "\\Google\\Chrome\\Application\\chrome.exe") (strcat (getenv "programfiles") "\\Internet Explorer\\iexplore.exe") ) ))Code - Auto/Visual Lisp: [Select](browser "C:/Version_5.2.pdf#View=FitV&nameddest=Chapter3")