HTML Clipboard
Moderators: JRL, Dorian (MJT support)
HTML Clipboard
I copied a table from a website into the clipboard. When I get the clipboard with
GetClipboard>txtClipboard
all HTML-code is removed. How can I get the Clipboard including the HTML code?
GetClipboard>txtClipboard
all HTML-code is removed. How can I get the Clipboard including the HTML code?
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Are you doing the copy manually or with a script?
In both cases, somehow you are looking for a visual point to locate the beginning of the table. You should be able to translate that reference point into something that can be located in the source file or the HTTPRequest result. You could use Position and/or RegEx commands to locate the beginning of the table and extract it.
Can you provide some links as samples that we can look at to help you?
In both cases, somehow you are looking for a visual point to locate the beginning of the table. You should be able to translate that reference point into something that can be located in the source file or the HTTPRequest result. You could use Position and/or RegEx commands to locate the beginning of the table and extract it.
Can you provide some links as samples that we can look at to help you?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
-
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
Joe User normally wants to copy just what you are getting, the content of the table, not the webpage code that generated it. As Bob suggests, HTTPRequest is the bulletproof way to do this.Tester wrote:The user should be able to select any table on a webpage by marking it with the mouse. Then the table is copied to the clipboard by pressing CTRL+C.
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
I am confused about what you need for help at this time. It is possible to get a table from a web page using HTTPRequest and then parsing out the table with its source code. But you indicated that more than one table was present, so we need to know how to identify which table should be copied. The web page layout itself may be build with tables, so it is critical to id which "table" you want.
There is no way we can say fo to any web page and copy the source code of any table without being more specific about exactly what you want. For instance, on this page that you are reading, there are at least 26 areas that are identified as tables, but you probably would not want to copy any of them.
If you can provice links/images to specific pages and point out the "tables" tha you want to copy, then we can probably be of more assistance. The definition of a "table" is not clear at this point.
There is no way we can say fo to any web page and copy the source code of any table without being more specific about exactly what you want. For instance, on this page that you are reading, there are at least 26 areas that are identified as tables, but you probably would not want to copy any of them.
If you can provice links/images to specific pages and point out the "tables" tha you want to copy, then we can probably be of more assistance. The definition of a "table" is not clear at this point.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
The HTML code was not removed. It was never there.Tester wrote:I copied a table from a website into the clipboard. When I get the clipboard with
GetClipboard>txtClipboard
all HTML-code is removed. How can I get the Clipboard including the HTML code?
What you are seeing on screen with your browser is not HTML. HTML is interpreted by the browser which then displays text and graphics on the screen. If you copy text from the screen you will only ever get the text as it is displayed. You will never acquire the underlying HTML.Tester wrote:You can take any table on any webpage to try it. Simply mark the whole table with the mouse and try to get the webpage source making the table into Micro Scheduler.
If some software you use is capable of performing a "Paste Special" that pastes the HTML code, then I suspect that software is doing what these kind forum posters are suggesting that you do. It is taking the copied screen output and comparing it to the web page source code and then substituting the appropriate source code for the screen text in the clipboard. When you paste, it appears that you copied the source HTML.
Macro Scheduler does not have a built in function for performing this kind of information substitution. A Macro Scheduler script could be written that could perform this kind of task. Several ideas have been presented for methods that could be used for such a script.
Another possibility would be to automate the software that already has this capability.
Hope this is helpful,
Dick
As far as I know, the clipboard stores the information in several different formats: HTML source and plain text, in my case.
For example, you can copy some text from Microsoft Word into the clipboard. If you use another Word instance to retrieve the clipboard content, the text from the clipboard is copied in Word format. If you use another Editor that is not capable of understanding the Word format, it is copied in plain text. So the clipboard stores the same information in plain text and in Word format. It depends on the application what is retrieved from the clipboard.
I think that Macro Scheduler is only able to get the plain text from the clipboard and can not access the formatted text (HTML in my case).
For example, you can copy some text from Microsoft Word into the clipboard. If you use another Word instance to retrieve the clipboard content, the text from the clipboard is copied in Word format. If you use another Editor that is not capable of understanding the Word format, it is copied in plain text. So the clipboard stores the same information in plain text and in Word format. It depends on the application what is retrieved from the clipboard.
I think that Macro Scheduler is only able to get the plain text from the clipboard and can not access the formatted text (HTML in my case).
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
You are correct. GetClipBoard retrieves only the text format (cf_text).
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?