Discussion:
how to put a variable value in clipboard with VBScript
(too old to reply)
Nemroth
2007-05-20 20:17:55 UTC
Permalink
Hi,

Any One can say to me how to put a variable value in clipboard with
VBScript (used in a vbs file, not in a browser script) ?

If any, how to do it, please ?

Thanks by advance for your answer.
OfficeGuyGoesWild
2007-05-20 23:41:27 UTC
Permalink
Post by Nemroth
Hi,
Any One can say to me how to put a variable value in clipboard with
VBScript (used in a vbs file, not in a browser script) ?
If any, how to do it, please ?
Thanks by advance for your answer.
You'll have to use IE:


http://www.microsoft.com/technet/scriptcenter/resources/qanda/dec04/hey1215.mspx

Regards.
Marty
http://www.TheScriptLibrary.com
IIJIMA Hiromitsu
2007-05-21 01:32:21 UTC
Permalink
Hi Nemroth,
Post by Nemroth
Any One can say to me how to put a variable value in clipboard with
VBScript (used in a vbs file, not in a browser script) ?
You can exploit "InternetExplorer.Application" object.
See the complete sample code (though written in JScript) here:
http://frog.raindrop.jp/knowledge/archives/000824.html
unknown
2007-05-21 02:19:04 UTC
Permalink
Post by Nemroth
Hi,
Any One can say to me how to put a variable value in clipboard with
VBScript (used in a vbs file, not in a browser script) ?
If any, how to do it, please ?
You have to use a browser script to do this. Example:

Sub CopyText(text)
Set ie=CreateObject("InternetExplorer.Application")
ie.navigate "about:blank"
Do Until ie.ReadyState=4:Wscript.Sleep 100:Loop
ie.document.parentWindow.clipboardData.setData("Text",text)
ie.quit
Set ie=Nothing
End Sub

End Sub

Good Luck, Ayush.
--
Scripting Home : http://snipurl.com/Scripting_Home
Nemroth
2007-05-21 04:59:11 UTC
Permalink
Thanks to all of you.
That what I needed.
Post by unknown
Post by Nemroth
Hi,
Any One can say to me how to put a variable value in clipboard with
VBScript (used in a vbs file, not in a browser script) ?
If any, how to do it, please ?
Sub CopyText(text)
Set ie=CreateObject("InternetExplorer.Application")
ie.navigate "about:blank"
Do Until ie.ReadyState=4:Wscript.Sleep 100:Loop
ie.document.parentWindow.clipboardData.setData("Text",text)
ie.quit
Set ie=Nothing
End Sub
End Sub
Good Luck, Ayush.
Fosco
2007-05-21 05:49:46 UTC
Permalink
Post by Nemroth
Thanks to all of you.
That what I needed.
; or autoit 2 line code

ClipPut("value")
MsgBox(262144, "", ClipGet( ))


; http://www.autoitscript.com/autoit3/files/beta/autoit/
--
Fosco
Nemroth
2007-05-21 19:25:40 UTC
Permalink
Thanks for the info.
Post by Fosco
Post by Nemroth
Thanks to all of you.
That what I needed.
; or autoit 2 line code
ClipPut("value")
MsgBox(262144, "", ClipGet( ))
; http://www.autoitscript.com/autoit3/files/beta/autoit/
\RemS
2007-05-21 10:55:00 UTC
Permalink
Post by Nemroth
Hi,
Any One can say to me how to put a variable value in clipboard with
VBScript (used in a vbs file, not in a browser script) ?
If any, how to do it, please ?
Thanks by advance for your answer.
topic: "VBS to Copy Field Value to Clipboard"
http://www.tek-tips.com/viewthread.cfm?qid=1173511&page=1
Nemroth
2007-05-21 19:25:02 UTC
Permalink
Thanks for the info. Very interessing
Post by \RemS
Post by Nemroth
Hi,
Any One can say to me how to put a variable value in clipboard with
VBScript (used in a vbs file, not in a browser script) ?
If any, how to do it, please ?
Thanks by advance for your answer.
topic: "VBS to Copy Field Value to Clipboard"
http://www.tek-tips.com/viewthread.cfm?qid=1173511&page=1
t***@gmail.com
2019-09-19 17:26:43 UTC
Permalink
Post by Nemroth
Hi,
Any One can say to me how to put a variable value in clipboard with
VBScript (used in a vbs file, not in a browser script) ?
If any, how to do it, please ?
Thanks by advance for your answer.
An easy way to get stuff to the clipboard is to display the variable text as the default text displayed with the inputbox
i.e. myGuid = Mid(TypeLib.Guid, 2, 36)
InputBox "GUID:","GUID Generator",myGuid.

Then use your mouse to swipe the information and copy it to the clipboard.
Evertjan.
2019-09-19 22:11:16 UTC
Permalink
Post by t***@gmail.com
Post by Nemroth
Hi,
Any One can say to me how to put a variable value in clipboard with
VBScript (used in a vbs file, not in a browser script) ?
If any, how to do it, please ?
Thanks by advance for your answer.
An easy way to get stuff to the clipboard is to display the variable
text as the default text displayed with the inputbox i.e. myGuid =
Mid(TypeLib.Guid, 2, 36) InputBox "GUID:","GUID Generator",myGuid.
Then use your mouse to swipe the information and copy it to the clipboard.
The advanced thanks is 12+ years old!
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
JJ
2019-09-20 09:14:20 UTC
Permalink
Post by Evertjan.
The advanced thanks is 12+ years old!
How the heck did he find the old thread?
I can't even find it by searching for the post title or message ID, from GG.
Continue reading on narkive:
Loading...