VBS, how to get the contents of the clipboard

Updated on technology 2024-02-08
9 answers
  1. Anonymous users2024-02-05

    set ie=createobject("")"about:blank"

    str="text")

    msgbox str

    The second is to determine whether the name of the copied file is in txt file format, and whether it is read or not.

    Addendum: First go through "Security" in "Internet Options" in "Tools", click on "Custom Level", and then you have to be careful, find "Allow programmatic access to the clipboard" in the many selection columns that appear, select "Enable", and finally confirm that it's OK.

    Reminder, this setting will reduce the security when browsing the web!

  2. Anonymous users2024-02-04

    The Clipboard class gets the data from the clipboard using the getDataObject() method, which returns an iDataObject

    Use the getDataPresent( format) of the iDataObject object to determine whether the data stored in the iDataObject object can be converted to the specified format, the method receives a parameter, which must be a format type predefined by the system, and the method returns a bool value.

    Use the getdata(format) method of the iDataObject object to get the data content, which returns the type conversion of the object before use.

    1. Get clipboard data.

    Second, put the data on the clipboard.

    The main method we use for pasting is getDataObject() to retrieve data from the clipboard, it returns data in any format, and we use iDataObject (which is an interface to provide a mechanism for sending any data) to receive it. The getDataPresent (Type Format) method of the iDataObject API instance returns a bool value to determine whether the data stored in the instance is associated with the given format or can be converted.

    The other is the dataformats class, which is mainly used to identify formats.

  3. Anonymous users2024-02-03

    As soon as the text appears on the clipboard, it is written to C: New Document. txt (on a new line) and empty the clipboard.

    on error resume next

    set ie=createobject("")"about:blank"

    set fso=createobject("")set f="c: Create a new document. txt",2,true)while true

    str="text")

    if str<>"" then

    vbcrlf&str

    text",""

    end if

    500wend

  4. Anonymous users2024-02-02

    set forms="")

    set textbox="").objectwith textbox

    multiline=true

    text="123"

    selstart=0

    sellength=len(.text).copy

    end with

    500msgbox "The copy has been successful"There are many more ways to see Demon's blog specifically.

  5. Anonymous users2024-02-01

    Open it in Windows XP.

    Start - Run - Clipbrd to open the Clipboard Viewer.

    Right-click on the desktop, select "Shortcut" under the "New" command, and the dialog box will pop up, and enter C: Windows System32 in the location field.

    Click Next until Done. Double-click the shortcut on the desktop to see the contents of the clipboard.

  6. Anonymous users2024-01-31

    'Get the pasteboard content and save it to A.

    set objhtml=createobject("htmlfile")

    a="text")

    If A has content, write to the file"Happy birthday. txt"Medium if a <>"" then

    set fs=createobject("")set file="Happy birthday. txt",true)a

    msgbox a

    end if

  7. Anonymous users2024-01-30

    set forms="")

    set textbox="").objectwith textbox

    multiline=true

    text="123"

    selstart=0

    sellength=len(.text).copy

    end with

    500msgbox "The copy has been successful"There are many more ways to see Demon's blog specifically.

  8. Anonymous users2024-01-29

    sub settext

    dim mydata as dataobjectset mydata = new dataobject"I'm content for VBA setup! "

    end sub

    The method of obtaining the data is:

    msgbox

  9. Anonymous users2024-01-28

    Save as BAT, only the minimum amount of BAT**, VBS needs **too much, and you need to open an IE web page, and the computer must also support the IE core. @echo off

    setlocal enabledelayedexpansionfor /f "skip=1" %%l in ('type ') do (set str=!str! %l)

    mshta "text","%str%")(close)

Related questions
8 answers2024-02-08

The number of gold, silver and bronze medals won in the 2004 Olympic Games, do you ask China? If yes, it is: >>>More

59 answers2024-02-08

It's out, it's called the freezing point reindeer car, it's an upgraded version of last year's reindeer, this car is going to be sold after New Year's Day, and Santa Claus is out, it's expensive, I see a lot of people collecting it, no one uses him to run! Happy gaming!

6 answers2024-02-08

1. Obtaining a copy.

That is, the demon and the plot copy, the demon can get a partner Yuan Shen every time, that is to say, today you can play a special demon removal task, and after you finish fighting, you can get 6 of the same Yuan Shen, and on the 9th day, your favorite partner can be included in the bag! The plot copy is obtained by the indefinite primordial god.,This depends on luck.。 >>>More

15 answers2024-02-08

Nokia. ** And features depending on the phone you buy.

5 answers2024-02-08

Check this out. What to do if Windows XP starts slowly" address.