Clipboard madness
Lynch, Jonathan
bnz2 at cdc.gov
Thu Sep 22 12:30:46 EDT 2005
I have a stack in which the user can copy from a field to another
program.
I scripted for this in a rawkeydown handler in the stack script. It also
required modifying ctrl-P to avoid certain problems. Here is the
relevant code:
on rawkeydown pKey
if the selectedfield = empty then pass rawkeydown
if pKey = 65288 and word 4 of the selectedchunk = 0 then
set the linktext of the selectedchunk to empty
set the textfont of the selectedchunk to empty
set the textstyle of the selectedchunk to empty
set the textcolor of the selectedchunk to empty
set the textsize of the selectedchunk to empty
else if pKey = 65289 and the commandkey is down then
put tab into the selection
exit rawkeydown
else if pKey = 46 and the commandkey is down then
put "*" into the selection
else if (pKey = 99 or pKey = 67) and the commandkey is down then
if the selectedfield <> empty then
put the selection into tSel
put the htmltext of the selection into tSelHtml
set the clipboarddata["text"] to tSel
set the clipboarddata["html"] to tSelHtml
select the selectedchunk
exit rawkeydown
end if
else if (pKey = 88 or pKey = 120) and the commandkey is down then
if the selectedfield <> empty then
put the selection into tSel
put the htmltext of the selection into tSelHtml
set the clipboarddata["text"] to tSel
set the clipboarddata["html"] to tSelHtml
delete the selectedchunk
exit rawkeydown
end if
else if ((pKey = 86 or pKey = 118) and the commandkey is down) or
(pKey = 65379) then
if the selectedfield <> empty then
put the clipboarddata["html"] into tSelHtml
put the clipboarddata["text"] into tSel
put the number of characters in tSel into tNumChar
put word 2 of the selectedchunk into tStartChar
if tSelHtml <> empty and the shiftkey is not down then
set the htmltext of the selection to tSelHtml
else if tSel <> empty then
put tSel into the selection
end if
put tStartChar+tNumChar-1 into tNewSelChar
select after character tNewSelChar of the selectedfield
exit rawkeydown
end if
end if
pass rawkeydown
end rawkeydown
-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of MisterX
Sent: Thursday, September 22, 2005 12:20 PM
To: 'How to use Revolution'
Subject: RE: Clipboard madness
ROTFL... I had to check what Glaswegian meant so I pasted it in SpellNO2
and
had that meaning in 2 seconds!
Ah! Most probably not. I think it's because rev developpers do not "have
to"
use a PC daily...
Kevin's time in hell might be to use Rev on a PC to make mac stacks as
im
trying for now 3 weeks with SpellNO2...
In the past 5 years I've used MC at work, it's been clipboard HELL! The
most
basic computer feature since the Mac will not work on PCs...
BTW, copy of these types of lines DOES work otherwise, I would have quit
MC
4 years ago...
Rev/MC is just the best scriptable text generator, manipulator there is!
cheers
Xavier
-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of Charles
Hartman
Sent: Thursday, September 22, 2005 5:59 PM
To: How to use Revolution
Subject: Re: Clipboard madness
Glaswegian?
Charles Hartman
On Sep 22, 2005, at 10:55 AM, rev at armbase.com wrote:
> Quoting Alex Tweedly <alex at tweedly.net>:
>
>
>> rev at armbase.com wrote:
>>
>>
>>> Quoting xbury.cs at clearstream.com:
>>>
>>>
>>>> Yesterday i was BATTLING against a stack who wouldn't copy paste
>>>> information from a field to ultraedit... I tried all keyboard
>>>> combos, and even the menu - just i wouldn't copy
>>>> anything...[snip]copy!
>>>>
>>>
>>>
>>> I've never been able to copy from a stack field to another field via
>>> ctrl-c ctrl-v.
>>>
>>> I jst always assumed you had to script it?
>>>
>>>
>> You may have decided that because of a bug whereby the IDE would not
>> cut/paste unless (or until) there was a script editor window open.
>> Sorry don't know the bug number and a (very) quick search didn't find
>> it. But it is fixed in 2.6 !! so give it a try now.
>>
>>
>
> Bizarely I cant copy and past in my license for 2.6 and I'm stuck
> with 2.5 on
> this computer. :-)
>
> I'll mail Heather about it when I get back from the "September
> weekend". PS I'm
> not a weegie.
>
> PPS Appologies to the list if you don't know what a weegie is. I
> beleive you are
> up the road near Oban Alex, so I assume you do. :-)
>
> All the best
> Bob; Rainy Glasgow
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list