je16noutch
April 29th, 2004, 04:18 AM
Hello everyone,
I have a little problem with VBScript.
I've written a script that copy the selected text of the current Internet Explorer Window when the user click on the button and it works well.
But in some computers with different security rights, it doesn't.
Here is my code :
' Create the Shell object
Set Wsh = WScript.CreateObject("WScript.Shell")
Wsh.SendKeys "^{c}" ' send Ctrl+C, copy to clipboard
Set IE = WScript.CreateObject("InternetExplorer.Application")
Dim Num
with IE
.navigate "about:blank"
Num = .document.parentwindow.clipboardData.getData ("text")
.quit
end with
I guess that a user needs to have special rights to create a shell in a script and execute a command...
so How can I get the selected without using a shell ?
Thanks,
Jerome
I have a little problem with VBScript.
I've written a script that copy the selected text of the current Internet Explorer Window when the user click on the button and it works well.
But in some computers with different security rights, it doesn't.
Here is my code :
' Create the Shell object
Set Wsh = WScript.CreateObject("WScript.Shell")
Wsh.SendKeys "^{c}" ' send Ctrl+C, copy to clipboard
Set IE = WScript.CreateObject("InternetExplorer.Application")
Dim Num
with IE
.navigate "about:blank"
Num = .document.parentwindow.clipboardData.getData ("text")
.quit
end with
I guess that a user needs to have special rights to create a shell in a script and execute a command...
so How can I get the selected without using a shell ?
Thanks,
Jerome