Multiple offenders

Richmond richmondmathewson at gmail.com
Sun Mar 18 14:22:24 EDT 2012


On 03/18/2012 07:18 PM, J. Landman Gay wrote:
> On 3/18/12 5:04 AM, Richmond wrote:
>> Oh Dear, its that time of the month again.
>>
>> Yes it is; Richmond's error trawl......
>>
>> read "SDLC" and other acronyms that cover up
>> incredibly time-consuming exercises.
>>
>> So, here I am merrily going through some 50 objects changing 57620 to 
>> 57618
>> and 57768 to 57769; very, very tedious indeed.
>>
>> Of course life would be about 1,000,000 times easier if each object had
>> the same code;
>> but they don't; just the lines containing those number that need to be
>> altered.
>>
>> Has anybody any bright ideas how this might be done semi-automatically?
>
> Need more info. Are you editing scripts or properties? Are the numbers 
> icon IDs or what?

The numbers are Unicode addresses.

The main difficulty is that in a "normal" situation one could open the 
whole stack up in some text editor such as Textwrangler and
do a search and replace. The snag is that some instances of 57768 need 
to be changed to 57769 and some don't.
----------------

I have, now, completed this exercise the slow way, so this discussion 
can now take on a more general colour.

>
> If icon IDs, in the future, you can use "the id of img 'nameOfImg'" 
> instead of hard-coded numbers if you think they may change later.
>
> For now, if these are in scripts:
>
>  get the script of control x -- x would be a name or number
>  replace "57620" with "57618" in it
>  set the script of control x to it
>





More information about the use-livecode mailing list