Grupos de Google ya no admite publicaciones ni suscripciones nuevas de Usenet. El contenido anterior sigue visible.

Need help reading and writing a file from between two points.

25 vistas
Ir al primer mensaje no leído

big_jon...@lycos.co.uk

no leída,
29 mar 2014, 1:24:55 p.m.29/3/14
para
I need a standalone script to Read in a TextStream from a file and Write out every line to a new file.
However it must write only from the line beginning with UniqueString and stop at the line ending with OneOffString.

Any help would be appreciated, thank you.

Evertjan.

no leída,
29 mar 2014, 2:45:48 p.m.29/3/14
para
big_jon...@lycos.co.uk wrote on 29 mrt 2014 in
microsoft.public.scripting.jscript:
Standalone scripts do not function,
they are just text,
you need an engine to execute them.

I would suggest you hire a commercial programmer,
this NG is pretty much dead,
and on comp.lang.javascript most posters will only
help you if you try to programme yourself first.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

big_jon...@lycos.co.uk

no leída,
29 mar 2014, 6:05:57 p.m.29/3/14
para
On Saturday, 29 March 2014 18:45:48 UTC, Evertjan. wrote:
> Standalone scripts do not function,
>
> they are just text,
>
> you need an engine to execute them.
>

I need a standalone script, not something integrated as part of a web page etc. It will be a .js file invoked by either a double click or from the commandline on a PC which will have the engine built in.

If you can't help then don't but I really do see no reason to make crazy suggestions and exacerbate the death of this group by alienating others.

I'm a .cmd file scripter, I need a .js scripter not a commercial programmer.

I could post what I've got so far, but it would be pointless, because all I could provide would come directly from millions of on-line sources and wouldn't provide anyone here with anything of use to them. FileSystemObject, CreateTextFile, OpenTextFile ForReading, OpenTextFile ForWriting, Iterate through ReadFile line by line, If Regex Match UniqueString Then WriteLine, NextLine, If Not Regex Match Writeline Else Close Files.

All I need is some information on how to check the content of each line read, in order that I can output only those I require.

Evertjan.

no leída,
29 mar 2014, 7:11:08 p.m.29/3/14
para
big_jon...@lycos.co.uk wrote on 29 mrt 2014 in
microsoft.public.scripting.jscript:

> On Saturday, 29 March 2014 18:45:48 UTC, Evertjan. wrote:
>> Standalone scripts do not function,
>>
>> they are just text,
>>
>> you need an engine to execute them.
>>
>
> I need a standalone script, not something integrated as part of a web
> page etc. It will be a .js file invoked by either a double click or from
> the commandline on a PC which will have the engine built in.

You will need an engine, like cscript/wscript.

> If you can't help then don't but I really do see no reason to make crazy
> suggestions and exacerbate the death of this group by alienating others.

This group is dead, that is why I showed you the javascript one.

> I'm a .cmd file scripter, I need a .js scripter not a commercial
> programmer.
>
> I could post what I've got so far, but it would be pointless, because
> all I could provide would come directly from millions of on-line sources
> and wouldn't provide anyone here with anything of use to them.
> FileSystemObject, CreateTextFile, OpenTextFile ForReading, OpenTextFile
> ForWriting, Iterate through ReadFile line by line, If Regex Match
> UniqueString Then WriteLine, NextLine, If Not Regex Match Writeline Else
> Close Files.
>
> All I need is some information on how to check the content of each line
> read, in order that I can output only those I require.

Wel, you won't find it here, and not for free.

big_jon...@lycos.co.uk

no leída,
30 mar 2014, 7:54:24 a.m.30/3/14
para
On Saturday, 29 March 2014 23:11:08 UTC, Evertjan. wrote:
> big_jon...@lycos.co.uk wrote on 29 mrt 2014 in
>
> microsoft.public.scripting.jscript:
>
> > on a PC which will have the engine built in.
>
> You will need an engine, like cscript/wscript.
I came here in the hope of finding a smart person to help me, not for a person trying to be smart who cannot read!
>
> > suggestions and exacerbate the death of this group by alienating others.
>
> > not something integrated as part of a web page etc.
>
> This group is dead, that is why I showed you the javascript one.
The javascript one, once I've waded through the life there that is primarily SPAM, is heavily web focused. Also javascript is technically not jscript.
>
> > If you can't help then don't but I really do see no reason to make crazy
> > suggestions and exacerbate the death of this group by alienating others.
> > I'm a .cmd file scripter, I need a .js scripter not a commercial programmer.
> Wel, you won't find it here, and not for free.
Anyone who believes that providing help, (read the topic title), or information to help me produce a script which satisfies my requirements is worthy of payment is an arse, I wonder what you believe?
>
> --
>
> Evertjan.

Evertjan.

no leída,
30 mar 2014, 11:01:55 a.m.30/3/14
para
big_jon...@lycos.co.uk wrote on 30 mrt 2014 in
microsoft.public.scripting.jscript:

> Anyone who believes that providing help, (read the topic title), or
> information to help me produce a script which satisfies my requirements
> is worthy of payment is an arse, I wonder what you believe?

Usenet is for discussion, providing help is optional and should not be
demanded.

I don't ask for paymant, I suggest you pay for services provided by a
professional programmer, which I am not.

Please do not use foul language.

Dr J R Stockton

no leída,
30 mar 2014, 3:11:30 p.m.30/3/14
para
In microsoft.public.scripting.jscript message <XnsA3001E3D6836eejj99@194
.109.133.133>, Sun, 30 Mar 2014 00:11:08, Evertjan. <exxjxw.hannivoort@i
nter.nl.net> posted:

>This group is dead, that is why I showed you the javascript one.

How can that be, while you and I are here?

--
(c) John Stockton, nr London UK Reply address via Merlyn Home Page.
news:comp.lang.javascript FAQ <http://www.jibbering.com/faq/index.html>.
<http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.

Evertjan.

no leída,
31 mar 2014, 4:19:23 a.m.31/3/14
para
Dr J R Stockton <repl...@merlyn.demon.co.uk.invalid> wrote on 30 mrt 2014
in microsoft.public.scripting.jscript:

> In microsoft.public.scripting.jscript message <XnsA3001E3D6836eejj99@194
> .109.133.133>, Sun, 30 Mar 2014 00:11:08, Evertjan. <exxjxw.hannivoort@i
> nter.nl.net> posted:
>
>>This group is dead, that is why I showed you the javascript one.
>
> How can that be, while you and I are here?

Well John, we are dead too, perhaps.
At least, how could we measure we are not?

We could not know, if we are, like html, in a stateless protocol,
and jscript being fased out on the long forgotten lonely browser.

Even serverside jscript can only serve when called for.

Even the last straw, sorry law,
that of the speed of light being the limit of all speeds,
suffers from inflation.

Michael Bednarek

no leída,
31 mar 2014, 4:57:25 a.m.31/3/14
para
On Sat, 29 Mar 2014 10:24:55 -0700 (PDT), big_jon...@lycos.co.uk
wrote in microsoft.public.scripting.jscript:

>I need a standalone script to Read in a TextStream from a file and Write out every line to a new file.
>However it must write only from the line beginning with UniqueString and stop at the line ending with OneOffString.

I do something similar by using Instr() to determine the positions of
UniqueString (lngP1) and OneOffString (lngP2) and then output the wanted
text with Mid(strText, lngP1 + Len(UniqueString), lngP2). YMMV.

--
Michael Bednarek "ONWARD"

Evertjan.

no leída,
31 mar 2014, 8:27:59 a.m.31/3/14
para
Michael Bednarek <mbATmbed...@BLACKHOLESPAM.NET> wrote on 31 mrt
2014 in microsoft.public.scripting.jscript:
But Instr() and Mid() is VBScript.

This NG is JScript as is the OQ, methinks,
in JScript you can use Regex to perform all such tasks.

var myStr = myStr.replace(/^a..a(bb)cc(c.{3}c)$/,'$2xxx$1yyy');

You could do this with VBS too,
but that looks awefull in VBS.
0 mensajes nuevos