replaceText

-= JB =- sundown at pacifier.com
Sun Jun 7 16:54:15 EDT 2009


Got it working, thanks
I was concerned if it would find the text if it had other characters
on each side instead of spaces and like you say it works.

-=>JB=-


On Jun 7, 2009, at 1:46 PM, Richmond Mathewson wrote:

> I don't think Runtime Revolution as such parses
> words the way human beings do, it will replace
> any string (or part thereof) with any other string.
>
> For the sake of argument try this:
>
> on mouseUp
>  put "id=d2b516" into oldWord
>  put "id=xyz59wk" into newWord
>  if fld id 1004 contains "id=d2b516" then
>    replace oldWord with newWord in fld id 1004
>  end if
> end mouseUp
>
>
> -= JB =- wrote:
>> Will this work if it needs to be characters and not words?
>> I will give it a try and get back with you.
>>
>> -=>JB<=-
>>
>>
>> On Jun 7, 2009, at 1:19 PM, Richmond Mathewson wrote:
>>
>>> Dunno what all the fuss is about;
>>>
>>> this works:
>>>
>>> on mouseUp
>>>  put "id=d2b516" into oldWord
>>>  put "id=anything" into newWord
>>>  if fld id 1004 contains "id=d2b516" then
>>>    replace oldWord with newWord in fld "fSTUFF"
>>>    end if
>>> end mouseUp
>>>
>>> -= JB =- wrote:
>>>> Below is a piece of text from the field,
>>>>
>>>> /link.php?&gr=1&id=d2b516&url=/ftt/
>>>>
>>>> I will be replacing id=d2b516 with id=anything
>>>>
>>>> -=>JB<=-
>>>>
>>>>
>>>> On Jun 7, 2009, at 1:00 PM, Mark Schonewille wrote:
>>>>
>>>>> JB, can you post a piece of the text you are modifying?
>>>>>
>>>>> -- Best regards,
>>>>>
>>>>> Mark Schonewille
>>>>>
>>>>> Economy-x-Talk Consulting and Software Engineering
>>>>> http://economy-x-talk.com
>>>>> Snapper Screen Recorder 2.0.1 http://snapper.economy-x-talk.com
>>>>>
>>>>> If you sent me an e-mail before 15 May and haven't got a reply  
>>>>> yet, please send me a reminder.
>>>>>
>>>>>
>>>>>
>>>>> On 7 jun 2009, at 21:55, -= JB =- wrote:
>>>>>
>>>>>> In the code below the reason I delete chars is because I am  
>>>>>> actually replacing
>>>>>> the same line twice but the first time that line has id=  
>>>>>> before it with no .jpg while
>>>>>> the second time it has thumbs/ before it and a .jpg after.
>>>>>>
>>>>>> Any ideas on how to accomplish this task?
>>>>>>
>>>>>> -=>JB<=-
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> use-revolution mailing list
>>>>> use-revolution at lists.runrev.com
>>>>> Please visit this url to subscribe, unsubscribe and manage your  
>>>>> subscription preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>>>>
>>>>
>>>> _______________________________________________
>>>> use-revolution mailing list
>>>> use-revolution at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your  
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>>>
>>>
>>> _______________________________________________
>>> use-revolution mailing list
>>> use-revolution at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your  
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>>
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your  
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list