Is there a way to shorten this script? (100 graphics and 200 lines of text)

Monte Goulding monte at sweattechnologies.com
Tue May 8 16:32:28 EDT 2012


Hi William

You can use rreHardcopy or mergDoc for AirPrint. mergDoc allows printing via the document preview which will also allow your users to send to other apps etc. if you just want print then rreHardcopy is the way to go.

Cheers

--
Monte Goulding

On 09/05/2012, at 4:57 AM, William de Smet <williamdesmet at gmail.com> wrote:

> Thanks everyone for the contribution!
> 
> I first tried Mark Schonewille's script and that one works immediately.
> My app is almost finished now.
> Now searching the forum for a way to use AirPrint (but that one seems
> sort of impossible at the moment).
> 
> greetings,
> 
> William
> 
> 
> 2012/5/8 Dar Scott <dsc at swcp.com>:
>> Whoops.  Still not right.  The line number has to go up twice as fast as the object number.
>> 
>> This can be done with a separate loop variable or doing some math on the repeat loop variable.
>> 
>> It might be easiest to count graphic objects and then calculate the lines as (2*i-1) and (2*i)
>> 
>> Dar
>> 
>> On May 8, 2012, at 12:38 PM, Paul Dupuis wrote:
>> 
>>> repeat with i = 1 to 200 step 2
>>>  put "d"&i into tObjectName
>>>  set the backgroundcolor of grc tObjectName to the text of line i of fld "in"
>>>  set the foregroundcolor of grc tObjectName to the text of line i+1 of fld "in"
>>> end repeat
>>> 
>>> 
>>> 
>>> On 5/8/2012 2:32 PM, John Dixon wrote:
>>>> repeat with i = 1 to 200 step 2
>>>>>  set the backgroundcolor of grc "d1" to the text of line i of fld "in"
>>>>>  set the foregroundcolor of grc "d1" to the text of line i+1 of fld "in"
>>>>> end repeat
>>> 
>>> --
>>> Paul Dupuis
>>> Cofounder
>>> Researchware, Inc.
>>> http://www.researchware.com/
>>> http://www.twitter.com/researchware
>>> http://www.facebook.com/researchware
>>> http://www.linkedin.com/company/researchware-inc
>>> 
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list