[Gambas-user] clipboard

Dimitris Anogiatis dosida at ...626...
Tue Jun 9 06:27:32 CEST 2009


Hey Beren,
If I may add my 2 cents worth of wisdom,

the flow of information in your program is still unknown and it's kinda
difficult to understand
what you're trying to do... however if I read this correctly (correct me if
I'm wrong)

> > > > > Take for example, I want to use the
> > > > > copied data in another program, copy from gambas2, paste into a
web
> > > > > browser. But nothing is being copied into the clipboard.

if copying data off the clipboard and pasting them into a webpage is what
you need
then why not turn your program into a gambas server page and save your data
in a text
file that the server page will read and print into a webpage?

This is how I think it may work for you

Gambas (or other) program -->> saves data into file -->> temp.txt <<-- reads
file <<-- gambas server page renders file as html

unless your plan is otherwise it should be adequate to get your clipboard
data accross

Let me know if that helps at all
Regards
Dimitris


On Mon, Jun 8, 2009 at 9:19 PM, Beren Scott <berenscott at ...1979...> wrote:

> I'll show you the line of code I'm using, it's currently not functioning
> correctly, but I'm getting closer I can feel it.
>
> dim pasteurl as string
> dim villurl[] as string
> dim farmid[] as integer
> dim z as integer
> dim c as integer
>
> pasteurl = "echo " & villurl[z - 1] & farmid[c - 1] & " | xclip"
> SHELL pasteurl WAIT
>
> Okay, so as you can see, the URL is varible, and cannot be hard coded
> like 'hello gambas'. So, I have to apply a form of editing around the
> outside of the command. I'm not that familiar with the workings of
> SHELL, I've installed xclip, but it doesn't appear to be working in it's
> above form. I definitely have something wrong there, but there isn't
> that much example to go by.
>
> On Tue, 2009-06-09 at 05:00 +0200, Stefano Palmeri wrote:
> > Il martedì 9 giugno 2009 04:45:53 Stefano Palmeri ha scritto:
> >
> > Or if you have a KDE 3 DE you could use:
> >
> > SHELL "dcop klipper klipper setClipboardContents 'hello gambas'" WAIT
> >
> > > Il martedì 9 giugno 2009 04:03:48 Beren Scott ha scritto:
> > > > Is it because technically linux doesn't have a clipboard, and that
> > > > simply put the copy command simply applies a reference to the
> location
> > > > of the item you have copied, and then when you paste, it looks up the
> > > > item you wish to paste?
> > > >
> > > > I guess I am trying to find some type of work around, because the
> > > > program simply will not function successfully without the ability to
> > > > copy an item into clipboard. Take for example, it's like this, I have
> > > > Opera browser, and I want the program to generate URL's, and then I
> want
> > > > to using the ctrl - shift V command paste and go. It's all about
> speed.
> > > >
> > > > Now, if there is an alternative way to do this, I'd love it. The
> other
> > > > alternative could be to design a browser into the program itself?
> > > > Though, I'm not much of a coder, but I'm willing to give it a go if
> need
> > > > be.
> > > >
> > > > I have a mission, and that is to complete this program, rofl, I am
> half
> > > > tempted to convert the program to c++, but to be honest, I'd rather
> do
> > > > it in basic, been programming in basic most my life, so not giving up
> > > > yet. Any chance of a change to the way gambas handles clipboard
> > > > functions?
> > >
> > > I don't know. This is a question for Benoit :-)
> > >
> > > If the application you're developing is just for you
> > > and you don't need to redistribute it, you could install
> > > an utility like xclip or xsel and call them with SHELL.
> > >
> > > > On Mon, 2009-06-08 at 18:17 +0200, Stefano Palmeri wrote:
> > > > > Il lunedì 8 giugno 2009 17:27:11 Beren Scott ha scritto:
> > > > > > On Mon, 2009-06-08 at 16:47 +0200, Stefano Palmeri wrote:
> > > > > > > Il lunedì 8 giugno 2009 16:03:23 Beren Scott ha scritto:
> > > > > > > > On Mon, 2009-06-08 at 02:44 -0700, charlesg wrote:
> > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > > > Clipboard.Copy(txtItem.text)
> > > > > > > > >
> > > > > > > > > rgds
> > > > > > > >
> > > > > > > > The problem is however that I am currently console only, no
> gui,
> > > > > > > > and I am getting a non-existent item error on "clipboard". Do
> I
> > > > > > > > have to add any lines of code to fix this?
> > > > > > > >
> > > > > > > >
> > > > > > > >
> -----------------------------------------------------------------
> > > > > > > >-- ---- ---- --- OpenSolaris 2009.06 is a cutting edge
> operating
> > > > > > > > system for enterprises looking to deploy the next generation
> of
> > > > > > > > Solaris that includes the latest innovations from Sun and the
> > > > > > > > OpenSource community. Download a copy and enjoy capabilities
> such
> > > > > > > > as Networking, Storage and Virtualization. Go to:
> > > > > > > > http://p.sf.net/sfu/opensolaris-get
> > > > > > > > _______________________________________________
> > > > > > > > Gambas-user mailing list
> > > > > > > > Gambas-user at lists.sourceforge.net
> > > > > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> > > > > > >
> > > > > > > Enable gb.gui in the project componets list.
> > > > > > >
> > > > > > >
> -------------------------------------------------------------------
> > > > > > >-- ---- ----- OpenSolaris 2009.06 is a cutting edge operating
> system
> > > > > > > for enterprises looking to deploy the next generation of
> Solaris
> > > > > > > that includes the latest innovations from Sun and the
> OpenSource
> > > > > > > community. Download a copy and enjoy capabilities such as
> > > > > > > Networking, Storage and Virtualization. Go to:
> > > > > > > http://p.sf.net/sfu/opensolaris-get
> > > > > > > _______________________________________________
> > > > > > > Gambas-user mailing list
> > > > > > > Gambas-user at lists.sourceforge.net
> > > > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> > > > > >
> > > > > > Okay, that is done, but now I am finding that it isn't copying
> > > > > > anything into the clipboard. Take for example, I want to use the
> > > > > > copied data in another program, copy from gambas2, paste into a
> web
> > > > > > browser. But nothing is being copied into the clipboard.
> > > > >
> > > > > Oh, you're right. I don't know if this is a bug. Hope Benoit
> > > > > reads this. It seems that Gambas copy on its own clipboard.
> > > > > I don't understand.
> > > > > This code:
> > > > >
> > > > > PUBLIC SUB Main()
> > > > >
> > > > >    DIM sss AS String
> > > > >
> > > > >    Clipboard.Copy("hello")
> > > > >    sss = Clipboard.Paste()
> > > > >
> > > > >    PRINT sss
> > > > >
> > > > > END
> > > > >
> > > > > simply print the string on console, but nothing
> > > > > on KDE clipboard or X clipborad (tested with xsel).
> > > > > So, I don't know.
> > > > >
> > > > > Gambas 2.13.1
> > > > >
> > > > > >
> ---------------------------------------------------------------------
> > > > > >-- ---- --- Crystal Reports - New Free Runtime and 30 Day Trial
> > > > > > Check out the new simplified licensing option that enables
> unlimited
> > > > > > royalty-free distribution of the report engine for externally
> facing
> > > > > > server and web deployment.
> > > > > > http://p.sf.net/sfu/businessobjects
> > > > > > _______________________________________________
> > > > > > Gambas-user mailing list
> > > > > > Gambas-user at lists.sourceforge.net
> > > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> > > > >
> > > > >
> -----------------------------------------------------------------------
> > > > >-- ----- Crystal Reports - New Free Runtime and 30 Day Trial
> > > > > Check out the new simplified licensing option that enables
> unlimited
> > > > > royalty-free distribution of the report engine for externally
> facing
> > > > > server and web deployment.
> > > > > http://p.sf.net/sfu/businessobjects
> > > > > _______________________________________________
> > > > > Gambas-user mailing list
> > > > > Gambas-user at lists.sourceforge.net
> > > > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> > > >
> > > >
> -------------------------------------------------------------------------
> > > >-- --- Crystal Reports - New Free Runtime and 30 Day Trial
> > > > Check out the new simplified licensing option that enables unlimited
> > > > royalty-free distribution of the report engine for externally facing
> > > > server and web deployment.
> > > > http://p.sf.net/sfu/businessobjects
> > > > _______________________________________________
> > > > Gambas-user mailing list
> > > > Gambas-user at lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> > >
> > >
> ---------------------------------------------------------------------------
> > >--- Crystal Reports - New Free Runtime and 30 Day Trial
> > > Check out the new simplified licensing option that enables unlimited
> > > royalty-free distribution of the report engine for externally facing
> > > server and web deployment.
> > > http://p.sf.net/sfu/businessobjects
> > > _______________________________________________
> > > Gambas-user mailing list
> > > Gambas-user at lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Crystal Reports - New Free Runtime and 30 Day Trial
> > Check out the new simplified licensing option that enables unlimited
> > royalty-free distribution of the report engine for externally facing
> > server and web deployment.
> > http://p.sf.net/sfu/businessobjects
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list