ReadLn -notepad

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
carkon
Newbie
Posts: 13
Joined: Sun Sep 26, 2010 9:36 am

ReadLn -notepad

Post by carkon » Sun Sep 26, 2010 9:56 am

hi.firstly sorry about my english..

i have a video website..i face some problem in my website..i have 3 information in notepad i take picture..first is video title , second is video picture link (each video have picture from 0001 to 0009 but in notepad is just writing first url), and third is video lenght...see picture

Image

so i want to configured like this..there is about 2000 video

Image

can ý do this.. i tryed it about 2 days but i cant anyone help me :shock:

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Sun Sep 26, 2010 10:50 am

Try this:

Code: Select all

  Let>j=1
  Let>k=1
  Let>l=1


Label>Main_Loop
  //Read Title
  GoSub>Read_Title
  If>title=##EOF##,Finish

WriteLn>c:\results.txt,result,%title%

//Read Photos
  GoSub>Read_Photo
  If>photo=##EOF##,Finish

WriteLn>c:\results.txt,result,http://%title%-0001.jpg
WriteLn>c:\results.txt,result,http://%title%-0002.jpg
WriteLn>c:\results.txt,result,http://%title%-0003.jpg
WriteLn>c:\results.txt,result,http://%title%-0004.jpg
WriteLn>c:\results.txt,result,http://%title%-0005.jpg
WriteLn>c:\results.txt,result,http://%title%-0006.jpg
WriteLn>c:\results.txt,result,http://%title%-0007.jpg
WriteLn>c:\results.txt,result,http://%title%-0008.jpg
WriteLn>c:\results.txt,result,http://%title%-0009.jpg
WriteLn>c:\results.txt,result,%SPACE%

//Read Length
  GoSub>Read_Length
  If>length=##EOF##,Finish

WriteLn>c:\results.txt,result,%length%
WriteLn>c:\results.txt,result,%SPACE%
WriteLn>c:\results.txt,result,------------------------------

Goto>Main_Loop

Label>Finish


SRT>Read_Title
  ReadLn>c:\title.txt,l,title
  Let>j=j+1
END>Read_Title

SRT>Read_Photo
  ReadLn>c:\photo.txt,k,photo
  Let>k=k+1
END>Read_Photo

SRT>Read_Length
  ReadLn>c:\length.txt,l,length
  Let>l=l+1
END>Read_Length


carkon
Newbie
Posts: 13
Joined: Sun Sep 26, 2010 9:36 am

Post by carkon » Sun Sep 26, 2010 12:37 pm

thank you for this script but there is a small problem...when i upload video screencapture photo my hosting changed all of name...

WriteLn>c:\results.txt,result,http://%title%-0001.jpg
WriteLn>c:\results.txt,result,http://%title%-0002.jpg
WriteLn>c:\results.txt,result,http://%title%-0003.jpg
WriteLn>c:\results.txt,result,http://%title%-0004.jpg
WriteLn>c:\results.txt,result,http://%title%-0005.jpg
WriteLn>c:\results.txt,result,http://%title%-0006.jpg
WriteLn>c:\results.txt,result,http://%title%-0007.jpg
WriteLn>c:\results.txt,result,http://%title%-0008.jpg
WriteLn>c:\results.txt,result,http://%title%-0009.jpg

so its not working...

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Sun Sep 26, 2010 2:37 pm

Ok, try this now.

Code: Select all

  Let>j=1
  Let>k=1
  Let>l=1

  IfFileExists>c:\results.txt
     DeleteFile>c:\results.txt
  Endif


Label>Main_Loop
  //Read Title
  GoSub>Read_Title
  If>title=##EOF##,Finish

WriteLn>c:\results.txt,result,%title%

//Read Photos
  GoSub>Read_Photo
  If>photo=##EOF##,Finish

  separate>photo,-,photoname

  WriteLn>c:\results.txt,result,http://%photoname_1%-0001.jpg
  WriteLn>c:\results.txt,result,http://%photoname_1%-0002.jpg
  WriteLn>c:\results.txt,result,http://%photoname_1%-0003.jpg
  WriteLn>c:\results.txt,result,http://%photoname_1%-0004.jpg
  WriteLn>c:\results.txt,result,http://%photoname_1%-0005.jpg
  WriteLn>c:\results.txt,result,http://%photoname_1%-0006.jpg
  WriteLn>c:\results.txt,result,http://%photoname_1%-0007.jpg
  WriteLn>c:\results.txt,result,http://%photoname_1%-0008.jpg
  WriteLn>c:\results.txt,result,http://%photoname_1%-0009.jpg
  WriteLn>c:\results.txt,result,%SPACE%

//Read Length
  GoSub>Read_Length
  If>length=##EOF##,Finish

WriteLn>c:\results.txt,result,%length%
WriteLn>c:\results.txt,result,%SPACE%
WriteLn>c:\results.txt,result,------------------------------

Goto>Main_Loop

Label>Finish


SRT>Read_Title
  ReadLn>c:\title.txt,l,title
  Let>j=j+1
END>Read_Title

SRT>Read_Photo
  ReadLn>c:\photo.txt,k,photo
  Let>k=k+1
END>Read_Photo

SRT>Read_Length
  ReadLn>c:\length.txt,l,length
  Let>l=l+1
END>Read_Length


adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Sun Sep 26, 2010 3:03 pm

.
I posted a modified solution. Give it a try.
.

carkon
Newbie
Posts: 13
Joined: Sun Sep 26, 2010 9:36 am

Post by carkon » Sun Sep 26, 2010 3:44 pm

yes its worked..great thank you very much

just i changed WriteLn>c:\results.txt,result,%photoname_1%-0001.jpg (removed http://) because it give me http://http://image.jpg.



thanks againn

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