Text in HTML Viewer is not copied.
Moderators: Dorian (MJT support), JRL
Text in HTML Viewer is not copied.
hello
It is possible to drag some of the text in the HTML Viewer, but it does not seem to be copied using Control+C.
I would like to drag the mouse over some text within the viewer and then bring that text to the clipboard.
GetTextInPoint in the macro scheduler works as I intended, but I keep getting memory errors, making it difficult to use.
I would appreciate it if you could suggest an alternative.
It is possible to drag some of the text in the HTML Viewer, but it does not seem to be copied using Control+C.
I would like to drag the mouse over some text within the viewer and then bring that text to the clipboard.
GetTextInPoint in the macro scheduler works as I intended, but I keep getting memory errors, making it difficult to use.
I would appreciate it if you could suggest an alternative.
- Dorian (MJT support)
- Automation Wizard
- Posts: 1386
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: Text in HTML Viewer is not copied.
We were recently asked about the Out of Memory errors for the GetText functions over at Support recently. This was Marcus' reply :
The GetText functions use a third party product which is no longer maintained. In any case they only work against native legacy apps and will not work with most modern apps. This is the main reason we introduced OCR - it is more portable and does not rely on the underlying architecture - does not need to go 'under the hood'. We kept the GetText functions in place for backwards compatibility reasons but their usefulness diminishes by the year. They are now around 10 years out of date and the company that provided them is no longer in business. We are unable to update them and it would not make sense to do so. The error is from the get text functions but shows Macro Scheduler because they are embedded in the macro scheduler process.
The GetText functions use a third party product which is no longer maintained. In any case they only work against native legacy apps and will not work with most modern apps. This is the main reason we introduced OCR - it is more portable and does not rely on the underlying architecture - does not need to go 'under the hood'. We kept the GetText functions in place for backwards compatibility reasons but their usefulness diminishes by the year. They are now around 10 years out of date and the company that provided them is no longer in business. We are unable to update them and it would not make sense to do so. The error is from the get text functions but shows Macro Scheduler because they are embedded in the macro scheduler process.
Yes, we have a Custom Scripting Service. Message me or go here
- Dorian (MJT support)
- Automation Wizard
- Posts: 1386
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: Text in HTML Viewer is not copied.
I'm wondering if a starting point would be to add a dialog handler for the HTMLviewer which then uses GetDialogProperty to retrieve it's contents?
Yes, we have a Custom Scripting Service. Message me or go here
- Grovkillen
- Automation Wizard
- Posts: 1131
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: Text in HTML Viewer is not copied.
Try this technique : viewtopic.php?f=2&t=8197#p48509
- Dorian (MJT support)
- Automation Wizard
- Posts: 1386
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: Text in HTML Viewer is not copied.
Thank you for jumping in. I was still wrestling with this one after discovering GetDialogProperty doesn't actually get the property. (Then I found an old thread where you mentioned it)
Yes, we have a Custom Scripting Service. Message me or go here
- Grovkillen
- Automation Wizard
- Posts: 1131
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: Text in HTML Viewer is not copied.
Yep, I'm always lurking around here
Re: Text in HTML Viewer is not copied.
Oh, Dear Grovkillen.
I've already read your post before writing this question.
I thought it didn't help me because I would return the same Massage for all hotspot points.
But once again, I pasted the code into my IDE and tested it, and there was a text I wanted to find in 'SRT Name_SRC' on the Watch List.
I was extracting the value of a specific page through the HttpRequest set by the cookie header that keeps the session.
And I was using that value by parsing the necessary part of HTML Viewer, but I was having a hard time putting the parsed value elsewhere.
This allowed me to extract the text and complete the program.
My repetitive work has been greatly reduced.
Thank you Dorian and Grovkillen for your help.
I've already read your post before writing this question.
I thought it didn't help me because I would return the same Massage for all hotspot points.
But once again, I pasted the code into my IDE and tested it, and there was a text I wanted to find in 'SRT Name_SRC' on the Watch List.
I was extracting the value of a specific page through the HttpRequest set by the cookie header that keeps the session.
And I was using that value by parsing the necessary part of HTML Viewer, but I was having a hard time putting the parsed value elsewhere.
This allowed me to extract the text and complete the program.
My repetitive work has been greatly reduced.
Thank you Dorian and Grovkillen for your help.
- Dorian (MJT support)
- Automation Wizard
- Posts: 1386
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: Text in HTML Viewer is not copied.
I didn't help much... Grovkillen was the guru here. Thank you though.
Yes, we have a Custom Scripting Service. Message me or go here
Re: Text in HTML Viewer is not copied.
Hey, have you tried using JavaScript to programmatically copy the selected text from the HTML viewer to the clipboard. This can be achieved using the method in combination with the selection object.
Code: Select all
document.execCommand()