Jump to content

Open URL-page in AutoLISP


SergeyBaranov

Recommended Posts

On 26/01/2020 at 03:45, SergeyBaranov said:

Hi all !

Sorry for my English...


How to open a page in AutoLISP ?
You need to get the text content of the URL-page in the list

 

You mean something like this?

(defun c:test (/ tst)
	;(setq tst (findfile "C:\\data\\test.jpeg")) 	;;; --> You can use this for opening a file you already have on your computer
	(setq tst (strcat "www.youtube.com")) 		    ;;; --> Or to open a website
(startapp
"C:\\Program files\\Internet Explorer\\iexplore.exe"
tst)
) ;end defun

But I personally like Tharwat's method - short and sweat

  • Thanks 1
Link to comment
Share on other sites

(command-s "_browser" "https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2020/ENU/AutoCAD-Core/files/GUID-261973D6-B582-4584-9175-37500A336A20-htm.html")

Opens with the default web browser defined in your system's registry.

Macro would be _browser https://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2020/ENU/AutoCAD-Core/files/GUID-261973D6-B582-4584-9175-37500A336A20-htm.html

Link to comment
Share on other sites

  • 4 weeks later...
2 hours ago, SergeyBaranov said:

 

Maybe you do not understand me ... I want to open a URL-page  and get the text content of the URL-page  as a list

 

maybe while searching on a content, you should take a course in mannerism. Typing with larger font and making it bold does not win you any fans! 

Link to comment
Share on other sites

I don't know if any of this would work. A web page is basically a text file and AutoCAD can open and read a text file, this would give you too muchinformation I guess. I guess it would aso read all the web pge coding too. A bit more involved, I know excel can copy a web page text into it (ignoring all the code), I guess word can too? This is the part I am not sure if it is possible, open excel you can do and then - whay I don't know - get it to read the web page. I think I saw somewhere that you can copy from excel to a drawing? Might need to save the excel file. Can you do the excel part with a script?

 

However what I was gong to ask, is your url-page a standard page with standard text that yuo just reference, if so why not just manualy copy it once to a text file and use a LISP to open and read it? If it is a page you have no control over won't that require more checking to ensure it's copied everything as it should... might be quicker just to open the age and copu and paste manualy and exactly wht yuo want?

Link to comment
Share on other sites

 

I plan for my program to access some URL resources, copy their contents, and then process it. Such a mini-parcer

Edited by SergeyBaranov
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...