Re: clipboard issue in Windows?
copy char 1 to -1 of field fieldname -- works fine for me, win 7. Set up a stack with 2 fields, 2 buttons, one copies the other pastes. http://dl.dropbox.com/u/11957935/copyPaste.livecode When you say it doesn't seem to do anything, what do you mean? If you have an insertion point, and paste nothing shows up? The command itself should have an empty result, and it should also contain nothing. However, if you issue the command from the message box, you should get a true response to see that it worked. As mentioned before, sometimes its easier to just set and/or get the clipboarddata directly. Oh, you can also put the clipboard and it will tell you what kinds of data it contains if any. On Wed, Nov 30, 2011 at 12:00 AM, Pete p...@mollysrevenge.com wrote: I can see where the confusion comes from on this. The dictionary claims you can copy a chunk of a control to the clipboard, even has an example - copy word -3 to -1 of field Help. Maybe it used to work as documented in the dictionary and somehow got changed over the years? On Tue, Nov 29, 2011 at 7:20 PM, J. Landman Gay jac...@hyperactivesw.com wrote: On 11/29/11 5:43 PM, Mike Kerner wrote: copy char 1 to -1 of field total -- doesn't seem to do anything. If you do it that way, you need to select the text first, just as if you were doing it manually: select char 1 to -1 of fld total copy But as was already mentioned, setting the clipboardData is much cleaner. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com __**_ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/**mailman/listinfo/use-livecode http://lists.runrev.com/mailman/listinfo/use-livecode -- Pete Molly's Revenge http://www.mollysrevenge.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: clipboard issue in Windows?
Thanks Bob and Jacque - I think I'm going to submit a comment in the documentation for future reference... On Wed, Nov 30, 2011 at 06:40, Mike Bonner bonnm...@gmail.com wrote: copy char 1 to -1 of field fieldname -- works fine for me, win 7. Set up a stack with 2 fields, 2 buttons, one copies the other pastes. http://dl.dropbox.com/u/11957935/copyPaste.livecode When you say it doesn't seem to do anything, what do you mean? If you have an insertion point, and paste nothing shows up? The command itself should have an empty result, and it should also contain nothing. However, if you issue the command from the message box, you should get a true response to see that it worked. As mentioned before, sometimes its easier to just set and/or get the clipboarddata directly. Oh, you can also put the clipboard and it will tell you what kinds of data it contains if any. On Wed, Nov 30, 2011 at 12:00 AM, Pete p...@mollysrevenge.com wrote: I can see where the confusion comes from on this. The dictionary claims you can copy a chunk of a control to the clipboard, even has an example - copy word -3 to -1 of field Help. Maybe it used to work as documented in the dictionary and somehow got changed over the years? On Tue, Nov 29, 2011 at 7:20 PM, J. Landman Gay jac...@hyperactivesw.com wrote: On 11/29/11 5:43 PM, Mike Kerner wrote: copy char 1 to -1 of field total -- doesn't seem to do anything. If you do it that way, you need to select the text first, just as if you were doing it manually: select char 1 to -1 of fld total copy But as was already mentioned, setting the clipboardData is much cleaner. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com __**_ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/**mailman/listinfo/use-livecode http://lists.runrev.com/mailman/listinfo/use-livecode -- Pete Molly's Revenge http://www.mollysrevenge.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, This is good. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: clipboard issue in Windows?
On 11/30/11 1:00 AM, Pete wrote: I can see where the confusion comes from on this. The dictionary claims you can copy a chunk of a control to the clipboard, even has an example - copy word -3 to -1 of field Help. I was wrong, the dictionary is right. Either I was relying on old info, or else I lost a synapse somewhere. This works for me too: copy word 1 to -1 of fld 1 -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: clipboard issue in Windows?
Thanks for confirming that Jacque. SO I guess now we're left wondering what the original problem was. On Wed, Nov 30, 2011 at 9:35 AM, J. Landman Gay jac...@hyperactivesw.comwrote: On 11/30/11 1:00 AM, Pete wrote: I can see where the confusion comes from on this. The dictionary claims you can copy a chunk of a control to the clipboard, even has an example - copy word -3 to -1 of field Help. I was wrong, the dictionary is right. Either I was relying on old info, or else I lost a synapse somewhere. This works for me too: copy word 1 to -1 of fld 1 -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com __**_ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/**mailman/listinfo/use-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode -- Pete Molly's Revenge http://www.mollysrevenge.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: clipboard issue in Windows?
On 11/30/2011 11:35 AM, J. Landman Gay wrote: On 11/30/11 1:00 AM, Pete wrote: I can see where the confusion comes from on this. The dictionary claims you can copy a chunk of a control to the clipboard, even has an example - copy word -3 to -1 of field Help. I was wrong, the dictionary is right. Either I was relying on old info, or else I lost a synapse somewhere. This works for me too: copy word 1 to -1 of fld 1 -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com *sigh* copy and clipboardData may be unreliable on Linux it seems. The copy function and clipboard is complicated in Linux and for some reason the KDE clipboard utility, Klipper, does not copy data from LiveCode using either copy or the clipboardData on my system. It works when Klipper isn't running, though. Warren ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: clipboard issue in Windows?
I found this page http://milianw.de/code-snippets/access-klipper-clipboard-on-cli-under-kde4 If you scroll down in the comments it has this line. echo foobar | ./clipboard -- would add foobar to the clipboard I 'think' you can do this as a shell call to add stuff to the klipper clipboard. At which point I don't know if it will show up in revs clipboard data or not, but worth an attempt. of course ./clipboard should point to wherever the program is (unless its in the path in which case it'd be just clipboard) Not sure this will help or not, but thought i'd toss it out there. Also kinda wondered if theres an easy way to just send a ctrl-c to copy and ctrl-v to paste to the system somehow. On Wed, Nov 30, 2011 at 11:46 AM, Warren Samples war...@warrensweb.uswrote: On 11/30/2011 11:35 AM, J. Landman Gay wrote: On 11/30/11 1:00 AM, Pete wrote: I can see where the confusion comes from on this. The dictionary claims you can copy a chunk of a control to the clipboard, even has an example - copy word -3 to -1 of field Help. I was wrong, the dictionary is right. Either I was relying on old info, or else I lost a synapse somewhere. This works for me too: copy word 1 to -1 of fld 1 -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com *sigh* copy and clipboardData may be unreliable on Linux it seems. The copy function and clipboard is complicated in Linux and for some reason the KDE clipboard utility, Klipper, does not copy data from LiveCode using either copy or the clipboardData on my system. It works when Klipper isn't running, though. Warren __**_ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/**mailman/listinfo/use-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: clipboard issue in Windows?
Don't know if this is a related issue. On Windows at the clipboard in the IDE GUI acts odd at times. Running XP SP3. Sometimes Ctrl Insert/Shift Insert works sometimes not. Ctrl C/Ctrl V work reliably most of the time. Sometimes pasting things from the clipboard to the LC IDE from another windows app works, sometimes not. I put some code on the clipboard in VB6. It would not paste into LC, BUT I pasted to Windows notepad then again put the select text on the clipboard from notepad and was able to paste into the LC IDE??? Control C will put selected text onto the clipboard from both the IDE and the LC Dictionary. Control Insert works only from the IDE but not in the LC Dictionary. Other oddities exist. I think if you're at a debugging breakpoint the rules of the clipboard change but I don't remember what happens. I also just the other day used the LC copy to attempt to put something on the clipboard but it did not work. Thought it was my inner LC newbie coming out and was going to look at the docs, now maybe not. Ralph DiMola IT Director Evergreen Information Services Phone: 518-636-3998 Ex:11 Cell: 518-796-9332 -Original Message- From: use-livecode-boun...@lists.runrev.com [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Warren Samples Sent: Wednesday, November 30, 2011 1:47 PM To: How to use LiveCode Subject: Re: clipboard issue in Windows? On 11/30/2011 11:35 AM, J. Landman Gay wrote: On 11/30/11 1:00 AM, Pete wrote: I can see where the confusion comes from on this. The dictionary claims you can copy a chunk of a control to the clipboard, even has an example - copy word -3 to -1 of field Help. I was wrong, the dictionary is right. Either I was relying on old info, or else I lost a synapse somewhere. This works for me too: copy word 1 to -1 of fld 1 -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com *sigh* copy and clipboardData may be unreliable on Linux it seems. The copy function and clipboard is complicated in Linux and for some reason the KDE clipboard utility, Klipper, does not copy data from LiveCode using either copy or the clipboardData on my system. It works when Klipper isn't running, though. Warren ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: clipboard issue in Windows?
This is why I only use ctrl-c ctrl-v. It seems that shift-insert doesn't necessarily set the dirty bit in the script editor so I have caught myself pasting, hit enter to compile, since it doesn't think theres a change.. poof editor closes, no compile and changes lost. ctrl-v works fine though so i've just forced myself out of the shift-insert habit. On Wed, Nov 30, 2011 at 12:15 PM, Ralph DiMola rdim...@evergreeninfo.netwrote: Don't know if this is a related issue. On Windows at the clipboard in the IDE GUI acts odd at times. Running XP SP3. Sometimes Ctrl Insert/Shift Insert works sometimes not. Ctrl C/Ctrl V work reliably most of the time. Sometimes pasting things from the clipboard to the LC IDE from another windows app works, sometimes not. I put some code on the clipboard in VB6. It would not paste into LC, BUT I pasted to Windows notepad then again put the select text on the clipboard from notepad and was able to paste into the LC IDE??? Control C will put selected text onto the clipboard from both the IDE and the LC Dictionary. Control Insert works only from the IDE but not in the LC Dictionary. Other oddities exist. I think if you're at a debugging breakpoint the rules of the clipboard change but I don't remember what happens. I also just the other day used the LC copy to attempt to put something on the clipboard but it did not work. Thought it was my inner LC newbie coming out and was going to look at the docs, now maybe not. Ralph DiMola IT Director Evergreen Information Services Phone: 518-636-3998 Ex:11 Cell: 518-796-9332 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: clipboard issue in Windows?
poof editor closes, no compile and changes lost Been there done that. I have a couple lost my edits tee shirts. A have abandoned the Ctrl Insert/Shift Insert but old habits are hard to break Ralph DiMola IT Director Evergreen Information Services Phone: 518-636-3998 Ex:11 Cell: 518-796-9332 -Original Message- From: use-livecode-boun...@lists.runrev.com [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Mike Bonner Sent: Wednesday, November 30, 2011 2:21 PM To: How to use LiveCode Subject: Re: clipboard issue in Windows? This is why I only use ctrl-c ctrl-v. It seems that shift-insert doesn't necessarily set the dirty bit in the script editor so I have caught myself pasting, hit enter to compile, since it doesn't think theres a change.. poof editor closes, no compile and changes lost. ctrl-v works fine though so i've just forced myself out of the shift-insert habit. On Wed, Nov 30, 2011 at 12:15 PM, Ralph DiMola rdim...@evergreeninfo.netwrote: Don't know if this is a related issue. On Windows at the clipboard in the IDE GUI acts odd at times. Running XP SP3. Sometimes Ctrl Insert/Shift Insert works sometimes not. Ctrl C/Ctrl V work reliably most of the time. Sometimes pasting things from the clipboard to the LC IDE from another windows app works, sometimes not. I put some code on the clipboard in VB6. It would not paste into LC, BUT I pasted to Windows notepad then again put the select text on the clipboard from notepad and was able to paste into the LC IDE??? Control C will put selected text onto the clipboard from both the IDE and the LC Dictionary. Control Insert works only from the IDE but not in the LC Dictionary. Other oddities exist. I think if you're at a debugging breakpoint the rules of the clipboard change but I don't remember what happens. I also just the other day used the LC copy to attempt to put something on the clipboard but it did not work. Thought it was my inner LC newbie coming out and was going to look at the docs, now maybe not. Ralph DiMola IT Director Evergreen Information Services Phone: 518-636-3998 Ex:11 Cell: 518-796-9332 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: clipboard issue in Windows?
I have the following in my frontscript, loaded at LC startup: private command doUndoSpace -- this solves the problem that after the certain operations -- the script editor remains unaware that the script has changed, -- so an enterkey will close but not save the changed script -- thus we have to *type* at least one character lock screen put the selectedText into selTxt type numToChar(32) -- the important step put word 4 of the selectedChunk into charNbr put selTxt into char charNbr of the target unlock screen end doUndoSpace I call this when I use the scriptPaint routine (also in my frontscript -- I think this comes from Jacque). In the script editor, a control-shift-space pops the mousetext (the word the cursor is hovering over) into the selection, great for copying longAndComplexAndEasilyMisspelledVariableNames. The problem with the routine as I poached it some time ago was that if one opens a script and the only change one makes is a scriptPaint move, the script editor won't see the script as having changed and won't save the change. (Purely scripted changes don't mark the field as dirty.) So I call doUndoSpace in the handler, and it works nicely. It sounds like the same problem is occurring with the paste operation as described in this thread. Maybe the above routine, or something like it, will be useful. You would have to catch the paste in a frontscript and test to see if the window you are pasting into is a script editor window, call doUndoSpace at some point if it is, and pass the paste if it isn't. BTW, Jacque's shortcuts for the script editor (I'm pretty sure it was you, Jacque -- if not, then someone take credit!) include not just scriptPaint but a several other nifty tricks, ie, putting quotes or parens or brackets around a selection. I've used them long enough now that I've gotten addicted to having them at my fingertips. Below is the controlkeydown handler from my frontscript, which incorporates them all. You can see that I use doUndoSpace in each one. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig - on controlkeydown whichKey -- I use control-shift for all the scripteditor shortcuts if the shiftKey is not down then pass controlkeydown put the long name of the target into tarName if revNewScriptEditor is not in tarName then pass controlkeydown end if switch whichKey case ' -- put quotes around the selection get the selection put q(it) into the selection if it = then put the selectedChunk into tSel put word 4 of tSel into word 2 of tSel put (word 4 of tSel) - 1 into word 4 of tSel select tSel end if doUndoSpace break case 9 case 0 -- put parens around the selection get the selection put ( it ) into the selection if it = then put the selectedChunk into tSel put word 4 of tSel into word 2 of tSel put (word 4 of tSel) - 1 into word 4 of tSel select tSel end if doUndoSpace break case [ case ] -- put brackets around the selection get the selection put [ it ] into the selection if it = then put the selectedChunk into tSel put word 4 of tSel into word 2 of tSel put (word 4 of tSel) - 1 into word 4 of tSel select tSel end if doUndoSpace break case -- scriptPaint, control-shift-space put the mouseText into the selection doUndoSpace break default pass controlkeydown end switch end controlkeydown - On Nov 30, 2011, at 3:33 PM, Ralph DiMola wrote: poof editor closes, no compile and changes lost Been there done that. I have a couple lost my edits tee shirts. A have abandoned the Ctrl Insert/Shift Insert but old habits are hard to break Mike Bonner wrote: This is why I only use ctrl-c ctrl-v. It seems that shift-insert doesn't necessarily set the dirty bit in the script editor so I have caught myself pasting, hit enter to compile, since it doesn't think theres a change.. poof editor closes, no compile and changes lost. ctrl-v works fine though so i've just forced myself out of the shift-insert habit. On Wed, Nov 30, 2011 at 12:15 PM, Ralph DiMola rdim...@evergreeninfo.netwrote: Don't know if this is a related issue. On Windows at the clipboard in the IDE GUI acts odd at times. Running XP SP3. Sometimes Ctrl Insert/Shift Insert works sometimes not. Ctrl C/Ctrl V work reliably most of the time. Sometimes pasting things from the clipboard to the LC IDE from another windows app works, sometimes not. I put some code on the clipboard in VB6. It would not paste into LC, BUT I pasted to Windows notepad then again put the select text on the clipboard from notepad and was able to paste into the LC IDE??? Control C will put
Re: clipboard issue in Windows?
On 11/30/11 5:47 PM, Peter M. Brigham, MD wrote: BTW, Jacque's shortcuts for the script editor (I'm pretty sure it was you, Jacque -- if not, then someone take credit!) include not just scriptPaint but a several other nifty tricks, ie, putting quotes or parens or brackets around a selection. I've used them long enough now that I've gotten addicted to having them at my fingertips. Yeah, it's me. I can't live without those either, I've been using them for so many years. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: clipboard issue in Windows?
Just noticed: there is missing piece in my controlkeydown handler -- if you try to just paste it into your frontscript and run it, it will halt on the last line below. It calls a function q(), which you also need: function q str return quote and str and quote end q Sorry. Another piece of my library that I've been using so long I take it for granted. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig on controlkeydown whichKey -- I use control-shift for all the scripteditor shortcuts if the shiftKey is not down then pass controlkeydown put the long name of the target into tarName if revNewScriptEditor is not in tarName then pass controlkeydown end if switch whichKey case ' -- put quotes around the selection get the selection put q(it) into the selection ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: clipboard issue in Windows?
use set the clipboardData instead Bob On Nov 29, 2011, at 3:43 PM, Mike Kerner wrote: Win 7, LC 5.0.2 dp1 So I have a field total, and I want to copy the contents (a number) to the clipboard for inclusion in a spreadsheet - but it doesn't seem to happen. copy char 1 to -1 of field total -- doesn't seem to do anything. -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, This is good. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: clipboard issue in Windows?
On 11/29/11 5:43 PM, Mike Kerner wrote: copy char 1 to -1 of field total -- doesn't seem to do anything. If you do it that way, you need to select the text first, just as if you were doing it manually: select char 1 to -1 of fld total copy But as was already mentioned, setting the clipboardData is much cleaner. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: clipboard issue in Windows?
I can see where the confusion comes from on this. The dictionary claims you can copy a chunk of a control to the clipboard, even has an example - copy word -3 to -1 of field Help. Maybe it used to work as documented in the dictionary and somehow got changed over the years? On Tue, Nov 29, 2011 at 7:20 PM, J. Landman Gay jac...@hyperactivesw.comwrote: On 11/29/11 5:43 PM, Mike Kerner wrote: copy char 1 to -1 of field total -- doesn't seem to do anything. If you do it that way, you need to select the text first, just as if you were doing it manually: select char 1 to -1 of fld total copy But as was already mentioned, setting the clipboardData is much cleaner. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com __**_ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/**mailman/listinfo/use-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode -- Pete Molly's Revenge http://www.mollysrevenge.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode