FXRuby and clipboard contents

S

Steve

I'm experimenting with FXRuby, and would like to grab the contents of
whatever is on the clipboard and put it in a text box. I'm developing
on windows, and based on what I've found searching around it seems
like I might have to do some OLE-integration api calls.

That's a little disappointing - is there a way to access the contents
of the clipboard in a portable way?

Regards,
Steve
 
H

Hal Fulton

Lyle said:
Oh, OK. Let me do some research and see exactly how that's being done
and come up with some sample code. I think the *basic* data transfer
protocol is along the same lines as that described in the FXRuby
drag-and-drop tutorial, but simplified somewhat.

Well, I hope I didn't misrepresent what the original poster
wanted.

FYI, the app I was thinking of is a simple one -- a cut&paste program
that will allow me to cut on my Windows box and paste on my Linux
box (or vice versa). It's on my to-do list. Could use drb for
communication, shouldn't be hard. Hardest part (as usual) would be
the GUI.

Hal
 
S

Steve

Hal Fulton said:
My impression was that he wanted to do it "programmatically" without
doing a paste, e.g.,

text = FXfoobarWindowsStuff.clipboard.get # or whatever
FXfoobarWindowsStuff.clipboard.copy("Hello!") # "Hello!" into clipbd

I've also been interested in this but have never asked.

Hal

Yep, that's exactly what I'd like to do.

By the way Hal, I really enjoyed your book, it's an excellent resource.

Regards,
Steve Conover
 
H

Hal Fulton

Steve said:
Yep, that's exactly what I'd like to do.

By the way Hal, I really enjoyed your book, it's an excellent resource.

Thanks, Steve. Credit also goes to the five people who contributed
code or text to it, to the two tech editors, and several other people at
the publisher.

I'd like to think there'll be a second edition. As things stand now,
that's not likely. Cross your fingers for me.

Hal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top