Re: Delete lines in files (text files)

2008-01-19 Thread Björnke von Gierke

You should be able to read the file one chunk at a time. For example:

on mouseUp
  answer file "the huge file"
  if it <> "" and the result = "" then
put it into theFilePath
  end if
  open file theFilePath for read
  repeat until the result = "eof"
read from file theFilePath until return
put it into theCurrentLine
--do stuff here with theCurrentLine
--but don't keep the data completely in memory!!!
  end repeat
  close file theFilePath
end mouseUp


Adjust as needed
Bjoernke

On 19 Jan 2008, at 20:58, Till Bandi wrote:

it is a csv file, that means it is a text file. I work on a mac with  
OS X 10.5. English is not my mother tongue but I think that is not  
the problem.


I did not have time yet to try the solution Mark Smith proposed -  
tomorrow I'l try.


Thanks, Till


Am 19.01.2008 um 19:20 schrieb Joe Lewis Wilkins:


Till,

What kind of files are they? Text, picts, sounds? And what is their  
structure? How organized? How can they be opened for editing/ 
reorganizing/resizing? What platform are you using and upon which  
one(s) do you plan to run the RR solution? I take it that English  
is not your language of choice; could that be a problem, since it  
is mine?


Not sure I can help, but these would all be considerations/concerns.

Joe Willkins


On Jan 19, 2008, at 10:03 AM, Till Bandi wrote:


Joe

I think I am in control of the situation - but I did not find a  
way to split my 5.6 Gigabyte file into smaller files. Any idea?


Till

Am 18.01.2008 um 08:02 schrieb Joe Lewis Wilkins:


Till,

Sounds to me as if you need to make some better arrangements;  
file-size-wise that is. You are in control of the situation; are  
you not?


Joe Wilkins


--

official ChatRev page:
http://chatrev.bjoernke.com

Chat with other RunRev developers:
go stack URL "http://homepage.mac.com/bvg/chatrev1.3.rev";

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: Delete lines in files (text files)

2008-01-19 Thread Randall Lee Reetz
Do you know for sure what char your return char is and del is set to it?

-Original Message-
From: "Till Bandi" <[EMAIL PROTECTED]>
To: "How to use Revolution" 
Sent: 1/19/2008 11:58 AM
Subject: Re: Delete lines in files (text files)

it is a csv file, that means it is a text file. I work on a mac with  
OS X 10.5. English is not my mother tongue but I think that is not the  
problem.

I did not have time yet to try the solution Mark Smith proposed -  
tomorrow I'l try.

Thanks, Till


Am 19.01.2008 um 19:20 schrieb Joe Lewis Wilkins:

> Till,
>
> What kind of files are they? Text, picts, sounds? And what is their  
> structure? How organized? How can they be opened for editing/ 
> reorganizing/resizing? What platform are you using and upon which  
> one(s) do you plan to run the RR solution? I take it that English is  
> not your language of choice; could that be a problem, since it is  
> mine?
>
> Not sure I can help, but these would all be considerations/concerns.
>
> Joe Willkins
>
>
> On Jan 19, 2008, at 10:03 AM, Till Bandi wrote:
>
>> Joe
>>
>> I think I am in control of the situation - but I did not find a way  
>> to split my 5.6 Gigabyte file into smaller files. Any idea?
>>
>> Till
>>
>> Am 18.01.2008 um 08:02 schrieb Joe Lewis Wilkins:
>>
>>> Till,
>>>
>>> Sounds to me as if you need to make some better arrangements; file- 
>>> size-wise that is. You are in control of the situation; are you not?
>>>
>>> Joe Wilkins
>> ___
>> use-revolution mailing list
>> use-revolution@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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Delete lines in files (text files)

2008-01-19 Thread Till Bandi
it is a csv file, that means it is a text file. I work on a mac with  
OS X 10.5. English is not my mother tongue but I think that is not the  
problem.


I did not have time yet to try the solution Mark Smith proposed -  
tomorrow I'l try.


Thanks, Till


Am 19.01.2008 um 19:20 schrieb Joe Lewis Wilkins:


Till,

What kind of files are they? Text, picts, sounds? And what is their  
structure? How organized? How can they be opened for editing/ 
reorganizing/resizing? What platform are you using and upon which  
one(s) do you plan to run the RR solution? I take it that English is  
not your language of choice; could that be a problem, since it is  
mine?


Not sure I can help, but these would all be considerations/concerns.

Joe Willkins


On Jan 19, 2008, at 10:03 AM, Till Bandi wrote:


Joe

I think I am in control of the situation - but I did not find a way  
to split my 5.6 Gigabyte file into smaller files. Any idea?


Till

Am 18.01.2008 um 08:02 schrieb Joe Lewis Wilkins:


Till,

Sounds to me as if you need to make some better arrangements; file- 
size-wise that is. You are in control of the situation; are you not?


Joe Wilkins

___
use-revolution mailing list
use-revolution@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Delete lines in files (text files)

2008-01-19 Thread Mark Smith
On OS X (and Linux, I'd think), there's a cammand line utility which  
split big files up into files of whatever size/number of lines you  
like. It's called 'split'


If you type "man split" into a terminal window, you'll see it's manual.

Best,

Mark

On 19 Jan 2008, at 18:03, Till Bandi wrote:


Joe

I think I am in control of the situation - but I did not find a way  
to split my 5.6 Gigabyte file into smaller files. Any idea?


Till

Am 18.01.2008 um 08:02 schrieb Joe Lewis Wilkins:


Till,

Sounds to me as if you need to make some better arrangements; file- 
size-wise that is. You are in control of the situation; are you not?


Joe Wilkins

___
use-revolution mailing list
use-revolution@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Delete lines in files (text files)

2008-01-19 Thread Joe Lewis Wilkins

Till,

What kind of files are they? Text, picts, sounds? And what is their  
structure? How organized? How can they be opened for editing/ 
reorganizing/resizing? What platform are you using and upon which one 
(s) do you plan to run the RR solution? I take it that English is not  
your language of choice; could that be a problem, since it is mine?


Not sure I can help, but these would all be considerations/concerns.

Joe Willkins


On Jan 19, 2008, at 10:03 AM, Till Bandi wrote:


Joe

I think I am in control of the situation - but I did not find a way  
to split my 5.6 Gigabyte file into smaller files. Any idea?


Till

Am 18.01.2008 um 08:02 schrieb Joe Lewis Wilkins:


Till,

Sounds to me as if you need to make some better arrangements; file- 
size-wise that is. You are in control of the situation; are you not?


Joe Wilkins

___
use-revolution mailing list
use-revolution@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Delete lines in files (text files)

2008-01-19 Thread Till Bandi

Joe

I think I am in control of the situation - but I did not find a way to  
split my 5.6 Gigabyte file into smaller files. Any idea?


Till

Am 18.01.2008 um 08:02 schrieb Joe Lewis Wilkins:


Till,

Sounds to me as if you need to make some better arrangements; file- 
size-wise that is. You are in control of the situation; are you not?


Joe Wilkins

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Delete lines in files (text files)

2008-01-18 Thread Devin Asay


On Jan 17, 2008, at 11:22 PM, Till Bandi wrote:

I guess that would be a good solution - my only problem is that the  
file has 5.6 Gigabytes. So I can't put it all in memory.


My real problem is here:

put 1 into vStartwert
set the cursor to watch
open file tFileIn
open file tFileOut

repeat forever
read from file tFileIn at vStartwert for 100 lines
put it into vChunk
replace ";" with tab in vChunk
replace "," with "." in vChunk
write vChunk to  file vFileOut at end
add number of chars of vChunk to vStartwert
end repeat
close file tFileIn
close file tFileOut

This works until the output file reaches 2 Gigabytes. So I think  
vStartwert is getting to big and doesn't work anymore. Therefore I  
wanted to delete
the Lines I already treated in the input file so I could always  
start at the first line.


Maybe there is a better solution?


As you know you can read in large chunks of the file in sequence and  
write it out to a second file without having to have the whole file  
in memory all at once (which is the main drawback of using URLs as  
opposed to file read/writes.) What if you broke up the file into  
manageable chunks before you did any processing? Something like  
(pseudocode):


read in 100 lines from bigFile
write out 100 lines to destFile1
read in next 100 lines from bigFile
write out 100 lines to destFile2
etc.

Then process each destFileN separately, and recombine them when  
you're finished?


Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Delete lines in files (text files)

2008-01-17 Thread Joe Lewis Wilkins

Till,

Sounds to me as if you need to make some better arrangements; file- 
size-wise that is. You are in control of the situation; are you not?


Joe Wilkins

On Jan 17, 2008, at 10:22 PM, Till Bandi wrote:

I guess that would be a good solution - my only problem is that the  
file has 5.6 Gigabytes. So I can't put it all in memory.


My real problem is here:

put 1 into vStartwert
set the cursor to watch
open file tFileIn
open file tFileOut

repeat forever
read from file tFileIn at vStartwert for 100 lines
put it into vChunk
replace ";" with tab in vChunk
replace "," with "." in vChunk
write vChunk to  file vFileOut at end
add number of chars of vChunk to vStartwert
end repeat
close file tFileIn
close file tFileOut

This works until the output file reaches 2 Gigabytes. So I think  
vStartwert is getting to big and doesn't work anymore. Therefore I  
wanted to delete
the Lines I already treated in the input file so I could always  
start at the first line.


Maybe there is a better solution?

Till

Am 17.01.2008 um 20:25 schrieb Devin Asay:



On Jan 17, 2008, at 12:05 PM, Till Bandi wrote:


Hi all

is there a way to delete lines in a text file from Revoution? - i  
did not see how this can be done but probably it is very simple.


Till,

You have to read it in then write it back out. You can do it in  
one line like this (assume you want to delete the first line):


put line 2 to -1 of url "file:/path/to/file.txt" into url "file:/ 
path/to/file.txt"


Just modify the range of lines you want to have in the final file.

HTH

Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

___
use-revolution mailing list
use-revolution@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Delete lines in files (text files)

2008-01-17 Thread Till Bandi
I guess that would be a good solution - my only problem is that the  
file has 5.6 Gigabytes. So I can't put it all in memory.


My real problem is here:

put 1 into vStartwert
set the cursor to watch
open file tFileIn
open file tFileOut

repeat forever
read from file tFileIn at vStartwert for 100 lines
put it into vChunk
replace ";" with tab in vChunk
replace "," with "." in vChunk
write vChunk to  file vFileOut at end
add number of chars of vChunk to vStartwert
end repeat
close file tFileIn
close file tFileOut

This works until the output file reaches 2 Gigabytes. So I think  
vStartwert is getting to big and doesn't work anymore. Therefore I  
wanted to delete
the Lines I already treated in the input file so I could always start  
at the first line.


Maybe there is a better solution?

Till

Am 17.01.2008 um 20:25 schrieb Devin Asay:



On Jan 17, 2008, at 12:05 PM, Till Bandi wrote:


Hi all

is there a way to delete lines in a text file from Revoution? - i  
did not see how this can be done but probably it is very simple.


Till,

You have to read it in then write it back out. You can do it in one  
line like this (assume you want to delete the first line):


put line 2 to -1 of url "file:/path/to/file.txt" into url "file:/ 
path/to/file.txt"


Just modify the range of lines you want to have in the final file.

HTH

Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

___
use-revolution mailing list
use-revolution@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Delete lines in files (text files)

2008-01-17 Thread Mark Wieder
Randall-

> But isnt 10 a bit draconian?

Yep - it's draconian and it's arbitrary. And every time I get riled up about 
it I calm down and figure out a way to do what I want without having to 
break the limits. Sometimes by realizing that my app really can be better 
placed as a plugin stack, in which case the script limits don't apply; 
sometimes by coming up with an alternate plan that doesn't involve changing 
stack scripts after all - self-modifying code does get a bit gnarly to 
debug.

...and if you *really* need to modify more than ten lines of scripts you can 
state your case to the runrev team and apply for a waiver of the limits. In 
theory, anyway - I've never run into anyone who actually needed to do this.

-- 
 Mark Wieder
 [EMAIL PROTECTED]



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Delete lines in files (text files)

2008-01-17 Thread Eric Chatonet

Well...
All limits are arbitrary and this does not apply to Rev only :-)
See scriptLimits function in the dictionary:

* the number of statements permitted when changing a script (normally  
10 in a standalone application)
* the number of statements permitted in a do command (normally 10 in  
a standalone application)
* the number of stacks permitted in the stacksInUse (normally 50 in a  
standalone application)
* the number of objects permitted in the frontScripts and backScripts  
(normally 10 in a standalone application)


But AFAIK a 'if then end if' (three lines) is counted as one line  
only for instance.


Le 17 janv. 08 à 23:47, Randall Lee Reetz a écrit :


But isnt 10 a bit draconian?

-Original Message-
From: "Eric Chatonet" <[EMAIL PROTECTED]>
To: "How to use Revolution" 
Sent: 1/17/2008 2:27 PM
Subject: Re: Delete lines in files (text files)

Hi Randall,

If you were allowed to set any script to any value (i.e. thousands of
lines of code), you could build a standalone, the stacks of which
would be able to clone all Rev features.
This limitation has been introduced to prevent this.
Just a security measure :-)

Le 17 janv. 08 à 23:18, Randall Lee Reetz a écrit :


I dont get it... Please explain.

-Original Message-
From: "Eric Chatonet" <[EMAIL PROTECTED]>
To: "How to use Revolution" 
Sent: 1/17/2008 12:35 PM
Subject: Re: Delete lines in files (text files)

Hi Randall,

Le 17 janv. 08 à 21:00, Randall Lee Reetz a écrit :


But i didn't know about this ten line limit?  That seems strange.
Why is that limit there?  And, yes i want to know how to fake it.


This limit is just to prevent malicious guys to fake Rev itself :-)

Best regards from Paris,
Eric Chatonet.


Best regards from Paris,
Eric Chatonet.



Best regards from Paris,
Eric Chatonet.

Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [EMAIL PROTECTED]/



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: Delete lines in files (text files)

2008-01-17 Thread Randall Lee Reetz
But isnt 10 a bit draconian?

-Original Message-
From: "Eric Chatonet" <[EMAIL PROTECTED]>
To: "How to use Revolution" 
Sent: 1/17/2008 2:27 PM
Subject: Re: Delete lines in files (text files)

Hi Randall,

If you were allowed to set any script to any value (i.e. thousands of  
lines of code), you could build a standalone, the stacks of which  
would be able to clone all Rev features.
This limitation has been introduced to prevent this.
Just a security measure :-)

Le 17 janv. 08 à 23:18, Randall Lee Reetz a écrit :

> I dont get it... Please explain.
>
> -Original Message-
> From: "Eric Chatonet" <[EMAIL PROTECTED]>
> To: "How to use Revolution" 
> Sent: 1/17/2008 12:35 PM
> Subject: Re: Delete lines in files (text files)
>
> Hi Randall,
>
> Le 17 janv. 08 à 21:00, Randall Lee Reetz a écrit :
>
>> But i didn't know about this ten line limit?  That seems strange.
>> Why is that limit there?  And, yes i want to know how to fake it.
>
> This limit is just to prevent malicious guys to fake Rev itself :-)
>
> Best regards from Paris,
> Eric Chatonet.

Best regards from Paris,
Eric Chatonet.

Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [EMAIL PROTECTED]/



___
use-revolution mailing list
use-revolution@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Delete lines in files (text files)

2008-01-17 Thread Eric Chatonet

Hi Randall,

If you were allowed to set any script to any value (i.e. thousands of  
lines of code), you could build a standalone, the stacks of which  
would be able to clone all Rev features.

This limitation has been introduced to prevent this.
Just a security measure :-)

Le 17 janv. 08 à 23:18, Randall Lee Reetz a écrit :


I dont get it... Please explain.

-Original Message-
From: "Eric Chatonet" <[EMAIL PROTECTED]>
To: "How to use Revolution" 
Sent: 1/17/2008 12:35 PM
Subject: Re: Delete lines in files (text files)

Hi Randall,

Le 17 janv. 08 à 21:00, Randall Lee Reetz a écrit :


But i didn't know about this ten line limit?  That seems strange.
Why is that limit there?  And, yes i want to know how to fake it.


This limit is just to prevent malicious guys to fake Rev itself :-)

Best regards from Paris,
Eric Chatonet.


Best regards from Paris,
Eric Chatonet.

Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [EMAIL PROTECTED]/



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: Delete lines in files (text files)

2008-01-17 Thread Randall Lee Reetz
I dont get it... Please explain.

-Original Message-
From: "Eric Chatonet" <[EMAIL PROTECTED]>
To: "How to use Revolution" 
Sent: 1/17/2008 12:35 PM
Subject: Re: Delete lines in files (text files)

Hi Randall,

Le 17 janv. 08 à 21:00, Randall Lee Reetz a écrit :

> But i didn't know about this ten line limit?  That seems strange.   
> Why is that limit there?  And, yes i want to know how to fake it.

This limit is just to prevent malicious guys to fake Rev itself :-)

Best regards from Paris,
Eric Chatonet.

Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [EMAIL PROTECTED]/



___
use-revolution mailing list
use-revolution@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Delete lines in files (text files)

2008-01-17 Thread Eric Chatonet

Hi Randall,

Le 17 janv. 08 à 21:00, Randall Lee Reetz a écrit :

But i didn't know about this ten line limit?  That seems strange.   
Why is that limit there?  And, yes i want to know how to fake it.


This limit is just to prevent malicious guys to fake Rev itself :-)

Best regards from Paris,
Eric Chatonet.

Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [EMAIL PROTECTED]/



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Delete lines in files (text files)

2008-01-17 Thread Mark Wieder
Randall-

The ten-line limit is only for standalone apps. If you're running in the IDE 
there's no limit. Does that help?

-- 
 Mark Wieder
 [EMAIL PROTECTED]



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: Delete lines in files (text files)

2008-01-17 Thread Randall Lee Reetz
Was joking.

-Original Message-
From: "Devin Asay" <[EMAIL PROTECTED]>
To: "How to use Revolution" 
Sent: 1/17/2008 11:44 AM
Subject: Re: Delete lines in files (text files)


On Jan 17, 2008, at 12:37 PM, Randall Lee Reetz wrote:

> Wow, i gave the supercard syntax, lots more verbose, (better  
> question: how do you delete a line of script?).

How about (not tested):

get the script of btn "myBtn"
delete line 4 of it
set the script of btn "myBtn" to it

I think you might run up against the 10-line script limitation if you  
were doing this in a standalone app. Anybody know for sure?


Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

___
use-revolution mailing list
use-revolution@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: Delete lines in files (text files)

2008-01-17 Thread Randall Lee Reetz
Actually richard,  this thread ran away on me... But i didn't know about this 
ten line limit?  That seems strange.  Why is that limit there?  And, yes i want 
to know how to fake it.

randall

-Original Message-
From: "Richard Gaskin" <[EMAIL PROTECTED]>
To: "How to use Revolution" 
Sent: 1/17/2008 11:52 AM
Subject: Re: Delete lines in files (text files)

Devin Asay wrote:
> On Jan 17, 2008, at 12:37 PM, Randall Lee Reetz wrote: 
>> Wow, i gave the supercard syntax, lots more verbose, (better  
>> question: how do you delete a line of script?).
> 
> How about (not tested):
> 
> get the script of btn "myBtn"
> delete line 4 of it
> set the script of btn "myBtn" to it
> 
> I think you might run up against the 10-line script limitation if you  
> were doing this in a standalone app. Anybody know for sure?

Any script longer than 10 lines cannot be put into an object at runtime.

Randall, why do you need to edit the script at runtime?  I'll bet 
there's a more efficient solution we may be able to come up with for you.

-- 
  Richard Gaskin
  Managing Editor, revJournal
  ___
  Rev tips, tutorials and more: http://www.revJournal.com
___
use-revolution mailing list
use-revolution@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Delete lines in files (text files)

2008-01-17 Thread Richard Gaskin

Devin Asay wrote:
On Jan 17, 2008, at 12:37 PM, Randall Lee Reetz wrote: 
Wow, i gave the supercard syntax, lots more verbose, (better  
question: how do you delete a line of script?).


How about (not tested):

get the script of btn "myBtn"
delete line 4 of it
set the script of btn "myBtn" to it

I think you might run up against the 10-line script limitation if you  
were doing this in a standalone app. Anybody know for sure?


Any script longer than 10 lines cannot be put into an object at runtime.

Randall, why do you need to edit the script at runtime?  I'll bet 
there's a more efficient solution we may be able to come up with for you.


--
 Richard Gaskin
 Managing Editor, revJournal
 ___
 Rev tips, tutorials and more: http://www.revJournal.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Delete lines in files (text files)

2008-01-17 Thread Devin Asay


On Jan 17, 2008, at 12:37 PM, Randall Lee Reetz wrote:

Wow, i gave the supercard syntax, lots more verbose, (better  
question: how do you delete a line of script?).


How about (not tested):

get the script of btn "myBtn"
delete line 4 of it
set the script of btn "myBtn" to it

I think you might run up against the 10-line script limitation if you  
were doing this in a standalone app. Anybody know for sure?



Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: Delete lines in files (text files)

2008-01-17 Thread Randall Lee Reetz
Wow, i gave the supercard syntax, lots more verbose, (better question: how do 
you delete a line of script?).

randall

-Original Message-
From: "Devin Asay" <[EMAIL PROTECTED]>
To: "How to use Revolution" 
Sent: 1/17/2008 11:25 AM
Subject: Re: Delete lines in files (text files)


On Jan 17, 2008, at 12:05 PM, Till Bandi wrote:

> Hi all
>
> is there a way to delete lines in a text file from Revoution? - i  
> did not see how this can be done but probably it is very simple.

Till,

You have to read it in then write it back out. You can do it in one  
line like this (assume you want to delete the first line):

put line 2 to -1 of url "file:/path/to/file.txt" into url "file:/path/ 
to/file.txt"

Just modify the range of lines you want to have in the final file.

HTH

Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

___
use-revolution mailing list
use-revolution@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: Delete lines in files (text files)

2008-01-17 Thread Randall Lee Reetz
You open the file
You read the contents odd the file
You put it into a var or field or customprop
You close the file
You delete the lines in your container
You open the file again
You write that container to the file
You close the file
-Original Message-
From: "Till Bandi" <[EMAIL PROTECTED]>
To: "How to use Revolution" 
Sent: 1/17/2008 11:05 AM
Subject: Delete lines in files (text files)

Hi all

is there a way to delete lines in a text file from Revoution? - i did  
not see how this can be done but probably it is very simple.

Thanks

Till
___
use-revolution mailing list
use-revolution@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Delete lines in files (text files)

2008-01-17 Thread Devin Asay


On Jan 17, 2008, at 12:05 PM, Till Bandi wrote:


Hi all

is there a way to delete lines in a text file from Revoution? - i  
did not see how this can be done but probably it is very simple.


Till,

You have to read it in then write it back out. You can do it in one  
line like this (assume you want to delete the first line):


put line 2 to -1 of url "file:/path/to/file.txt" into url "file:/path/ 
to/file.txt"


Just modify the range of lines you want to have in the final file.

HTH

Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution