Autofile snapshots

Ken Norris pixelbird at interisland.net
Mon Mar 24 13:47:01 EST 2003


**********
> From: "Chipp Walters" <chipp at chipp.com>
> Subject: RE: Autofile snapshots
> Date: Sun, 23 Mar 2003 18:57:02 -0600
>
> look at the import snapshot command
-----------
Yes, that's what I said:
----------
> 
>> -----Original Message-----
>> Sent: Sunday, March 23, 2003 2:12 PM
>> Subject: Autofile snapshots
>>
>> As it is, it looks like I'd have to import,
----------
...See? Although I didn't mention it, this means I already know about the
[import snapshot] command. I'm OK so far, right?

What I want to do:

I will have a number of different screens available for the same buttons,
i.e., create a different look and feel for each. The need for doing this has
to do with varying visual deficits of potential users, and is therefore more
important than mere "Preference'.

I have a background group image which has 'pictures' of buttons in it. The
actual buttons are exactly aligned (I call it 'registered') to each of the
appropriate areas of the picture. A bunch of the buttons have different
functions which mean they must hold icon images separately in these cases,
so I decided I may as well make separate icons out of _all_ the buttons.

The end-use is to eliminate the large background group image it came from,
and replace it by batch-importing the small mages into a standalone to use
as icons at runtime, meaning they don't get saved by the standalone, but are
called up at runtime by the Preferences, which can be changed at any time.

All that means making separate images out of each little 'button picture' of
the large image. There will be about 80 of them.

The problems are:

1) I  have to continue the process in order to make them into separate image
files something like this:
----------
>> cut, paste into PhotoShop (or
>> something) to make a JPEG file out of it, for each one.
---------- 
Each image is captured thus from a _section_ of a large background group,
image which is actually the rect of each button, then converted.

This means I have to change each image thus created into a JPEG image and
then put it into a file folder for use as icons, then delete each created
image from the stack I used to capture it, because I don't want it saved
there.

NOTE: Of course, the standalone is not ready for build yet, so I need to
keep saving it until it is. There is no sense in keeping the separate icon
images there, because it will disturb the process (naming, etc.) I want to
test for the standalone operations.

...and 
----------
>> Since I have at least 80 to do, I'd sure like to automate it somehow.
----------
2) Develop a process to help automate it. It would be OK to make a handler
that does it when I click the button that now shows the appropriate section
of the background image while its down. Hopefully I can somehow use "import
snapshot" to do this.

So far the "import snapshot" command (which I also posted in another
message) looks like this:

on mouseDown
  rectSet -- This handler  sets the group's rect to the rect of the button
  show group "kybdDN"
  import snapshot from the rect of me
  -- Is supposed to take a picture of the button in it's 'down' state to use
  -- as an icon later when he whole process is done.
end mouseDown

But, it is taking pictures of the stack window, not the button rect, but I
haven't found a cure for it so far (I have been trying variations with no
success). I'm stuck here right now.

Ken N.





More information about the use-livecode mailing list