[Enhancement Request] Open and BackUp in LiveCode DP and RC
J. Landman Gay
jacque at hyperactivesw.com
Thu Apr 24 17:47:45 EDT 2014
On 4/24/14, 1:56 PM, Ben Rubinstein wrote:
> I'd love to know: what do other people do to customise their environment?
I use a system I started in HC 25+ years ago and have been adding to
ever since. Back then it was additions to the Home script, today it's a
library plugin that inserts one script into the backscripts and another
into the frontscripts when LC launches. I don't like a lot of extra
stack windows on screen so this is a nice, invisible way to get
functionality. My library stack opens invisibly on startup and stays out
of the way.
The script of the library has dozens of handlers with (usually) short
names. When I want to use one I type it into the message box. For
example, "uc" unlocks the cursor for those OS X times it gets stuck,
"bup" makes a backup, "nc" gives me the number of cards and "nb" gives
me the number of backgrounds. One I use constantly is "gn" or "gp" which
goes to the next/previous card with messages locked, and it takes an
optional parameter which will go to a named or numbered card instead.
Others are more extensive, but just as easy to trigger. Some manage
things I do repeatedly in the script editor, other handlers act on the
selected object, some move or align objects, or flip through all the
cards in a stack setting object properties (handy for the HC conversions
I still do.)
I suppose this method would be harder for someone who had to learn all
the shortcuts at once, but I've been adding them slowly over the years
and I have them memorized. Well, most of them, anyway.
Oh, and here's another one I use all the time:
on getPaint -- replace an img's content; img must be selected
if the selobj = "" then
answer "Select an image first."
answer file "Choose replacement image:"
if it = "" then exit to top
put url ("binfile:"&it) into the selobj
This updates the selected image with with a new image from disk,
preserving all its properties. It's very handy for changing an icon
image so you don't have to reset the icon IDs on every button in the
stack that uses it. It's also good when you've placed an image in
exactly the right position and layer and you don't want to have to
repeat that all over again with a newly imported image.
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the Use-livecode