Text Clippings on Windows

Jan Schenkel janschenkel at yahoo.com
Mon Dec 15 11:10:07 EST 2008


--- Bob Hartley <rev at armbase.com> wrote:
> Hugh Senior wrote:
> 
> Hi All
> 
> OKay here is an idea I've not been near rev for a
> long while and I'm 
> sure you can generate the code better than me.
> 
> Okay here goes...... it must be possible since when
> using winzip you can 
> drag part of an archive to the desktop to extract so
> there is no OS bar.
> 
> On mousedown
> clear ttext
> cleat tstack
> put the highlighted txt of this field into ttext
> put the boundary coordinates of the card/stack into
> tstack
> end mousedown
> On mouse up
> if the mouse coordinates is outside tstack
> create textfile.txt on desktop (Use windows standard
> path location 
> script for this)
> paste ttext into textfile.txt
> end mouseup
> 
> Okay I'm an amateur but surely this can be done like
> this and probably 
> more elegantly.
> 
> Cheers
> Bob
> 

I like a challenge :-)

So I created a new stack, dropped a field onto it and
set its script to:
##
on dragStart
   put the selectedText into theText
   put the tempname into theTempName
   create folder theTempName
   put "/" & char 1 to 32 of line 1 of theText &
".txt" after theTempName
   put theText into URL("file:" & theTempName)
   set the dragData["files"] to theTempName
end dragStart
##

That allowed me to drag sort of a text clipping onto
the desktop. No idea how you'd handle the difference
between dropping into another field or onto the
desktop, but the above is a roundabout way to drop a
file onto a Windows explorer window or the desktop.

HTH,

Jan Schenkel.

Quartam Reports & PDF Library for Revolution
<http://www.quartam.com>

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


      



More information about the use-livecode mailing list