Travaci Posted October 9 Share Posted October 9 Hi, i want to open google website & search something with autolisp. İs this possible ? (startapp "explorer" "www.google.com") & next? Quote Link to comment Share on other sites More sharing options...
Saxlle Posted October 9 Share Posted October 9 (edited) Hi @Travaci You can do it like this: (defun wsite (/ thisdrawing) (setq thisdrawing (vla-get-activedocument (vlax-get-acad-object))) (vla-SendCommand thisdrawing (strcat "_browser" " " "https://www.cadtutor.net/forum/forum/15-autolisp-visual-lisp-amp-dcl/" " ")) --> this is example for link after "https://...." (princ) ) Another way (picture 1): - Type in AutoCAD: ALIASEDIT - Go to "Shell Commands" - Click Add Button - Enter the Alias (if you use for e.g. CHROME): GOOGLE - Command: START CHROME - Click OK, Apply, ... - After everything are saved, type GOOGLE to run CHROME. Best regards. Edited October 9 by Saxlle Quote Link to comment Share on other sites More sharing options...
fuccaro Posted October 9 Share Posted October 9 This one works on my system: (command "shell" "chrome https://www.nhm.ac.uk/discover/dino-directory/name/name-az-all.html") The "explorer" opens the windows explorer. 2 Quote Link to comment Share on other sites More sharing options...
Travaci Posted October 9 Author Share Posted October 9 i want to search in google Quote Link to comment Share on other sites More sharing options...
fuccaro Posted October 9 Share Posted October 9 Try this: (command "shell" "start microsoft-edge:http://google.com") Quote Link to comment Share on other sites More sharing options...
Travaci Posted October 9 Author Share Posted October 9 Why does everyone give the same answer. i say, i want to search something in google. Quote Link to comment Share on other sites More sharing options...
Saxlle Posted October 9 Share Posted October 9 1 hour ago, Travaci said: i want to search in google As i described to you on the picture 1, if you are using other Browser for search (Chrome, Edge, Firefox, Opera,....) change this two steps: 1. Enter the Alias (if you use for e.g. Firefox, Opera, Edge,....): "Put any name which you want" (it will be like command, for e.g. you use PLINE for polyline) 2. Command: START "Put the name of BROWSER" (Opera, Firefox,....). - Click OK, Apply, ... - After everything are saved, type "Name which you put for Alias" to start desired Browser inside AutoCAD. Quote Link to comment Share on other sites More sharing options...
Travaci Posted October 9 Author Share Posted October 9 Already i can open chrome with (startapp "explorer" "www.google.com"). İts default browser. Than i want to search something in google. Quote Link to comment Share on other sites More sharing options...
Saxlle Posted October 9 Share Posted October 9 5 minutes ago, Travaci said: Why does everyone give the same answer. i say, i want to search something in google. If you want to use "some lisp" while "command is active after running a lisp and you want to search something in browser", i think it is hard to be done or even impossible to do. Quote Link to comment Share on other sites More sharing options...
Travaci Posted October 9 Author Share Posted October 9 i saw many impossible things. This must be easy. Quote Link to comment Share on other sites More sharing options...
Steven P Posted October 9 Share Posted October 9 So for the actual searching.. You need to open the browser - I don't think AutoCAD integrates with Google (other search engines are available), and from there do the search Fuccaros method works to open the browser: (command "shell" "start microsoft-edge:http://google.com") Change microsoft-edge to your browser. For a search and you can check this open your browser and search for something, or nothing, and look at the page tag at the top and this is the text to put in instead of http://google.com For example, try this: (command "shell" "start microsoft-edge:http://google.com/search?q=Something+or+nothing") I don't know your LISP abilities so ask if you need help. I'd get your search terms (above, 'something or nothing') and strcat them together with a '+' in between to make the search string, append that to (command "shell" "start microsoft-edge:http://google.com/search?q= , finish with a closing bracket ) and you should have something that works. You can off course change google to any website: (command "shell" "start microsoft-edge:https://www.cadtutor.net/forum/topic/92132-open-browser") Quote Link to comment Share on other sites More sharing options...
Travaci Posted October 9 Author Share Posted October 9 Thanx Steven. Quote Link to comment Share on other sites More sharing options...
Steven P Posted October 9 Share Posted October 9 and this is a quick LISP... no checking and can be neater, (defun c:openpage ( / SearchTerm PageBase) (setq SreachTerm (getstring "Enter Serch Term: [use '+' between terms] ")) ;; get search term, '+' between words (setq PageBase "(command \"shell\" \"start microsoft-edge:http://google.com/search?q=") ;; google address (setq Page (strcat PageBase SearchTerm "\")" )) ;; google + search term address (eval (read Page)) ;; open 'Page' ) Quote Link to comment Share on other sites More sharing options...
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.