readln writeln messing up

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
paranova9
Newbie
Posts: 17
Joined: Wed Jul 29, 2009 9:19 pm

readln writeln messing up

Post by paranova9 » Thu Sep 23, 2010 8:31 am

I am trying to copy a line from one text to another but
00:00:01,240 is being replaced with 240
and blank lines are replaced with 0

can that be fixed?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Sep 23, 2010 11:13 am

Without seeing your code we can't tell you what is wrong/how it can be changed to make it work. Please send your code.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

paranova9
Newbie
Posts: 17
Joined: Wed Jul 29, 2009 9:19 pm

Post by paranova9 » Thu Sep 23, 2010 6:51 pm

let>e=0
let>l=0




label>entry
add>e,1
label>line
add>l,1

ReadLn>D:\DESKTOP\subs\1.srt,l,a
if>a=##EOF##,end




writeln>D:\DESKTOP\new text document1.txt,a

if>le=l,entry

label>end

paranova9
Newbie
Posts: 17
Joined: Wed Jul 29, 2009 9:19 pm

Post by paranova9 » Thu Sep 23, 2010 6:58 pm

source

1
00:00:01,240 --> 00:00:02,590
¤£¤Ó¦n

2
00:00:06,520 --> 00:00:07,790
¤°¤\¥s¤£¤Ó¦n


output

1
240 --> 00:00:02,590
¤£¤Ó¦n
0
2
520 --> 00:00:07,790
¤°¤\¥s¤£¤Ó¦n
0

paranova9
Newbie
Posts: 17
Joined: Wed Jul 29, 2009 9:19 pm

Post by paranova9 » Thu Sep 23, 2010 7:04 pm

also, before (and i wasn't doing much different), it was only printing the last 3 numbers after each comma and separating the lines

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Sep 23, 2010 7:36 pm

You have a parameter missing from your WriteLn line. WriteLn requires three parms where the second is the result variable. You have only two.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

paranova9
Newbie
Posts: 17
Joined: Wed Jul 29, 2009 9:19 pm

Post by paranova9 » Fri Sep 24, 2010 5:46 am

Thanx mtettmar! isn't that weird it was working at all?

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts