Page 1 of 1 1
Topic Options
#179831 - 2007-08-28 12:28 PM Read data from clipboard?
Finbom Offline
Fresh Scripter

Registered: 2003-06-27
Posts: 21
Hi Scripters!
I have an situation where I want a kix-script to read some text that has been copied to the clipboard.
It is clean text and I can paste it to a textfile with no problem.
But I want the text inserted into an variabel and I want the script to read the data itself.

Does anyone know if (and how)this can be done?

Kind regards, Magnus Finbom

Top
#179832 - 2007-08-28 12:31 PM Re: Read data from clipboard? [Re: Finbom]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
How about this UDF?

UDF Library » PasteFromClipboard() Paste string from Clipboard
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#179834 - 2007-08-28 12:49 PM Re: Read data from clipboard? [Re: Mart]
Finbom Offline
Fresh Scripter

Registered: 2003-06-27
Posts: 21
Wow! That was a fast answer.. Great! Just what I wanted.
Must now learn to checkout the UDF-library more often.

Thanks!

Regards, Magnus Finbom

Top
#179836 - 2007-08-28 12:58 PM Re: Read data from clipboard? [Re: Mart]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Mart,
I presume that since Internet Explorer 7 this function is not working anymore as before...

Top
#179845 - 2007-08-28 01:50 PM Re: Read data from clipboard? [Re: Witto]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Dunno. Did not test it. Why should it stop working with IE7?
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#179846 - 2007-08-28 01:58 PM Re: Read data from clipboard? [Re: Mart]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Just gave it a quick try. Saw some pop-ups asking for user confirmation. The example I put in the UDF does not paste anything to notepad.
Top
#179850 - 2007-08-28 02:12 PM Re: Read data from clipboard? [Re: Witto]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
hmmmmm..... that s#cks \:\(
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#179883 - 2007-08-28 06:46 PM Re: Read data from clipboard? [Re: Mart]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
Under your Internet Options, select the Security tab. Select a web content zone and click Custom Level. Scroll waaaay down to the Scripting section and change "Allow paste operations via script" (in IE6) or "Allow Programmatic Clipboard Access" (in IE7) to Enable instead of Prompt.

That's all I did to get this to work in the past.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#179922 - 2007-08-29 10:23 AM Re: Read data from clipboard? [Re: Glenn Barnas]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Thanks Glenn,
I knew there would be a solution like that.
I will give it a try, and if you don't mind, I will add your solution to the remarks in both the "clipboard" udf's.

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1003 anonymous users online.
Newest Members
StuTheCoder, M_Moore, BeeEm, min_seow, Audio
17884 Registered Users

Generated in 0.06 seconds in which 0.027 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org