Get from File

Jim Ault JimAultWins at yahoo.com
Wed Dec 28 12:03:30 EST 2005


try
on mousedoubleup
  put fld destBlock into dest
  filter dest with "*edit*"  -- should purge all lines without "edit"
  
  replace quote with comma in dest
  
  repeat with x = 1 to 9
    put itemOffset("-"&x, dest) into itemNum
    put item itemNum of dest into fld ("edit"&x)
  end repeat
  put itemOffset("-00", dest) into itemNum
  put item itemNum of dest into fld ("edit00")
  
end mousedoubleup



On 12/28/05 5:26 AM, "Michael D." <dweeble at wi.rr.com> wrote:

> This worked great, I found that I had to grab a bigger chunk from the main
> file and add line numbers to the end result into fld "results" and get:
> 0' "RmArray"
> 1StartArray = Array( _
> 2          "edit-1", "edit-2", "edit-3", "edit-4", "edit-5", _
> 3          "edit-6", "edit-7", "edit-8", "edit-9", "edit-00", _
> 4          "endof", "of", "the", "list", "")
> 5' "endRmArray"
> I'm working to remove the not needed lines*0,1,4,5 and display in a numbered
> column list for user to select the lines they need to edit, which I can do.
> Theres 5 "edit-*" per line,
> 
> Any suggestions on how to get each of the 5 "edit-*" into their individual
> fields from the selected row ?
> 
> and thanks for you help
> Michael
> 
> -------------------------------------
> on getChunk
>   put fld edits into sorce
>   put empty into fld results
>   put "(?si)("&quote&"RmArray.*endRmArray.....)" into regExStr
>   put matchchunk(sorce,regExStr,charPos1,charPos2) into success
>   if success is true then
>     put char charPos1 to charPos2 of sorce into dest
>     else
>     answer "did not find the edit string you were looking for"
>     exit to top
>   end if
>   answer "your gift is behind door number 2"
>   put dest into fld edits
>   put fld edits into editsNum
> put empty into tDisplayData
>   put 0 into tCounter
>   repeat for each line L in editsNum
>     put tCounter && L & cr after tDisplayData
>     add 1 to tCounter
>   end getChunk
>   put tDisplayData into fld results
> --  breakpoint
> 
> ----- Original Message -----
> From: "Jim Ault" <JimAultWins at yahoo.com>
> To: "How to use Revolution" <use-revolution at lists.runrev.com>
> Sent: Tuesday, December 27, 2005 1:52 AM
> Subject: Re: Get from File
> 
> 
>> This works for me...
>> I used a quick stack with fld 1 and fld 2 and 1 button
>> ------- copy from here
>> on getChunk
>>   put fld 1 into  sorce
>>   put "(?si)("&quote&"edit-1.*edit-5.....)" into regExStr
>>   put matchchunk(sorce,regExStr, charPos1,charPos2) into success
>>   if success is true then
>>     put char charPos1 to charPos2 of sorce into dest
>>   else
>>     answer "did not find the edit string you were looking for"
>>     exit to top
>>     end if
>>   answer "your gift is behind door number 2"
>>   put dest into fld 2
>>   breakpoint
>> end getChunk
>> ------------end copy
>> 
>> 
>> On 12/26/05 10:31 PM, "Michael D." <dweeble at wi.rr.com> wrote:
>> 
>>> Greetings,
>>> I'm stuck on something here and looking for some advice with pulling
> this
>>> section from a text file(*.hta). Its search the complete file around 800
> lines
>>> for just this section then
>>> put this section into line numbered field ? then
>>> put each "edit" of selected line into a field.
>>> 
>>> StartArray = Array( _
>>> --- get from here
>>>           "edit-1", "edit-2", "edit-3", "edit-4", "edit-5", _
>>>           "edit-1", "edit-2", "edit-3", "edit-4", "edit-5", _
>>>           "edit-1", "edit-2", "edit-3", "edit-4", "edit-5", _
>>>           "edit-1", "edit-2", "edit-3", "edit-4", "edit-5", _
>>>           "edit-1", "edit-2", "edit-3", "edit-4", "edit-5", _
>>> --- to end of here
>>>           "endof", "of", "the", "list", "")
>>> 
>>> Any help greatly appreciated
>>> Michael
>> 
>> 
>> _______________________________________________
>> 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