Jawdoc
Sat Nov 05 15:05:21 CST 2005
McKirahan wrote:
> "Jawdoc" <drbrooks@msoms.com> wrote in message
> news:Nx7bf.420$kd.25@bignews4.bellsouth.net...
>
>>Hello
>>Two questions:
>>1. I need a simple script to copy a defined text that is set within the
>>script to the clipboard.
>
>
> How is the text "defined".
>
> Below is a VBScript that sets and gets clipboard data.
>
>
>>2. What is the best book or source to begin learning vbs. Is there a
>>perferred book? Needs to start at the beginning and be a simple as
>>possible for starters.
>
>
>
http://www.w3schools.com/vbscript/
>
>
>>Thanks in advance.
>
>
>
> Option Explicit
> '*
> Const cTXT = "Some text."
> '*
> '* Set Clipboard Data
> '*
> Dim objIEA
> Set objIEA = CreateObject("InternetExplorer.Application")
> objIEA.Navigate "about:blank"
> Do Until objIEA.ReadyState=4: WScript.Sleep 1: Loop
> objIEA.Document.ParentWindow.ClipboardData.SetData "Text", cTXT
> objIEA.Quit
> Set objIEA = Nothing
> '*
> '* Get Clipboard Data
> '*
> Dim objHTM
> Set objHTM = CreateObject("htmlfile")
> WScript.Echo objHTM.ParentWindow.ClipboardData.GetData("text")
> Set objHTM = Nothing
>
>
That did it. Thanks
How can I change the Name in the Title Bar (Now "Windows Script Hosts")
And can I change the text that is displayed on the pop up not to
necessarily reflect the clipboard contents.
Thanks again!
Sorry to be picky on this.