Converting referenced images to embedded control images

Jim Hurley jhurley at infostations.com
Mon Jun 9 18:09:01 EDT 2003


>
>Message: 9
>Date: Mon, 9 Jun 2003 20:09:22 +0200
>Subject: Re: Converting referenced images to embedded control images
>From: Klaus Major <klaus at major-k.de>
>To: use-revolution at lists.runrev.com
>Reply-To: use-revolution at lists.runrev.com
>
>Hi Jim,
>
>sorry, here is a correct one... ;-)
>
>...
>>>  repeat with i = 1 to the number of cards in this stack
>>>  go to card i
>>>    repeat for each line tLine in  theControls()
>>>     if "image" is in the name of tLine then
>     if the filename of img tLine <> empty then put url("binfile:" & the
>filename of img tLine) into img tLine
>    ## check if not already embedded, then suck it :-)
>>>    end if
>>>    end repeat
>>>  end repeat
>>>
>>>  function theControls
>>>    repeat with i = 1 to the number of controls
>      put the short name of control i into line i of results
>      ## won't work otherwise..


Klaus,

Thanks for the solution. It is much appreciated.

I think one could use the "name" or the "short name" depending on the 
script above. That is, one could say:

"the filename of img tLine"
if tLine contained the short name

or

"the filename of tLine"
if tLne contained the name

The "name" already contains the word "image"

I'll find out when I try it. (But first I'll make a copy.)

In either case I think I can blunder though that issue. It was your code:

      put url("binfile:" & the filename of img tLine) into img tLine

that I needed help with. I thought I would have to import the file 
and somehow delete the old referenced image.

Thanks again.

Jim


>  >>   end repeat
>>>    return results
>>>  end theControls
>>>
>>>  So what goes into:
>>>
>>>  Change from referenced to embedded
>>>
>>>  Thinking wishfully,
>>>
>>>  Jim
>>
>Sorry for the wrong script...
>
>
>Regards
>
>Klaus Major
>klaus at major-k.de
>



More information about the use-livecode mailing list