Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 27 SEP 2021 02:34:20AM Joshua Goddard wrote:

Hi,

How do you get the text that is selected in shell.explorer.2. For context, this shell.explorer.2 instance is embedded in an OI form, and I am trying to get the selected text on the ctrl-c event.

I tried this, but all it returns is an empty string:

text = get_property(@window:".OLE_IE", "document.selection.createRange().text")

Interestingly, if I change the above code to this, it returns a string that appears to be a number in hexadecimal format.

text = get_property(@window:".OLE_IE", "document.selection.createRange()")


At 27 SEP 2021 03:00AM Barry Stevens wrote:

Hi,

How do you get the text that is selected in shell.explorer.2. For context, this shell.explorer.2 instance is embedded in an OI form, and I am trying to get the selected text on the ctrl-c event.

I tried this, but all it returns is an empty string:

text = get_property(@window:".OLE_IE", "document.selection.createRange().text")

Interestingly, if I change the above code to this, it returns a string that appears to be a number in hexadecimal format.

text = get_property(@window:".OLE_IE", "document.selection.createRange()")

Would not it be accessed from the CLIPBOARD object or even the new exec_method CLIPBOARD's fancy functions


At 27 SEP 2021 03:10AM Joshua Goddard wrote:

For some reason, the selected text is not in the clipboard, hence I am trying to put it there myself by selecting it from OI.

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/b46c78bafd258e4b900fc24c909b3d01.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1