Computer Science Canada

clipboard and gui

Author:  jonos [ Fri Feb 13, 2004 5:26 pm ]
Post subject:  clipboard and gui

does GUI have the ability to accept text from the clipboard and does it allow text to be copied to the clipboard

Author:  santabruzer [ Fri Feb 13, 2004 5:29 pm ]
Post subject: 

i asked this a while back.. and i think the answer was no.. but with the new version.. iono if it's possible.. i would suggest to err.. use VB

Author:  jonos [ Fri Feb 13, 2004 5:31 pm ]
Post subject: 

yeah, maybe i will. but i need to learn how to use the things like chr and ord

Author:  Delos [ Fri Feb 13, 2004 6:28 pm ]
Post subject: 

It is possible for GUI to accept text from a "Clipboard". Note the quotation marks.

This would mean creating your own clipboard for the programme:
(summthin like this:)

var clips:string := ""
var ch : array char of boolean

Input.KeyDown (ch)
% Here you would have the GUI.TextFields going.
if ch('^C') then
clips := GUI.GetText (textField)
end if

if ch('^V') then
GUI.SetText (textField, clips)
end if

end loop

That code is not perfect, may be buggy, but you get the idea. There are probably better ways to do it, such as determining selection and such, but that is the basic idea.

Author:  Dan [ Fri Feb 13, 2004 7:58 pm ]
Post subject: 

the clipbord is part of the windows api, turing as far as i know dose not alow u to dricty intreface with the windows api.

u could always get the user to hit Ctrl-v Razz

Author:  Homer_simpson [ Fri Feb 13, 2004 8:13 pm ]
Post subject: 

well i'm almost 100% sure u can't goto windows note pad copy something and paste it to yer program... but u can make a clipboard for tuing only yerself...

Author:  Delos [ Fri Feb 13, 2004 9:23 pm ]
Post subject: 

Hmm...ever heard of dirty commands? That could work.

Just need to find the space in RAM where the clipboard stores stuff...and Bob's your uncle...well, Bob's your robber, really.

Sorry, a very few and select number of ppl would get the full meaning of that joke...