Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.

Name:
Email:
Subject:
Message icon:

Attach:
(Clear Attachment)
(more attachments)
Allowed file types: gif, jpg, png, txt, tpl, lng, ini, pvd, psf, ini, cfg, csv, zip, xml, pas, 7z
Restrictions: 4 per post, maximum total size 1024KB, maximum individual size 1024KB
Note that any files attached will not be displayed until approved by a moderator.
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
How many words are in this question?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: firefox
« on: November 09, 2013, 01:57:48 pm »

I finished the script and it runs well.
Many thanks for your help!
Posted by: nostra
« on: November 08, 2013, 06:48:11 pm »

You can save multiple values in the same file, load the file to a string and then split it into separate values using String manipulation functions.
Posted by: firefox
« on: November 08, 2013, 11:44:40 am »

Thanks nostra for example code. Finally, the script works well.
Is there any possible way that saving multiple japanese values in one txt file and load them in runtime?
Posted by: nostra
« on: November 06, 2013, 08:14:10 pm »

To find ">レーベル:</td> from your example do the following:
1. Create a file (for exmple value1.txt) in the "PVD Path\Scripts" directory
2. Put ">レーベル:</td> into the file and save it with UTF8 Encoding with BOM
3. Replace the line where you search for this text with the following line:
Code: [Select]
StartPos := PosFrom(FileToString(GetAppPath + 'Scripts\value1.txt'), HTML, StartPos);So the value is replaced with: FileToString(GetAppPath + 'Scripts\value1.txt')
Posted by: firefox
« on: November 06, 2013, 09:42:35 am »

There seem to be multiple problems (the program was never tested with such languages):
1. There is a problem when passing data to the script. I will fix it in next update
2. The pascal script compiler does not accept non ANSI characters. This can't be fixed, unless the pascal script compiler is updated. As a workaround you could try saving values in japanese in a file and load them in runtime. (but the first problem must be fixed for this to work)
Please give me an example code for saving japanese values in a file and load them in runtime.
Many thanks for your help and PVD v1.0.2.7!
Posted by: nostra
« on: October 22, 2013, 06:42:38 pm »

There seem to be multiple problems (the program was never tested with such languages):
1. There is a problem when passing data to the script. I will fix it in next update
2. The pascal script compiler does not accept non ANSI characters. This can't be fixed, unless the pascal script compiler is updated. As a workaround you could try saving values in japanese in a file and load them in runtime. (but the first problem must be fixed for this to work)
Posted by: firefox
« on: October 21, 2013, 04:24:40 am »

I provided a code page in GetCodePage function (EUC-JP 20932).
You can search with keyword 'mgod0112' with attached script file.
I use writer item for film series info. The writer item didn't show after running the script.
Thank you for your help!
Posted by: nostra
« on: October 20, 2013, 05:53:37 pm »

Make sure to provide a correct code page in GetCodePage function
Code: [Select]
function GetCodePage : Cardinal;
begin
 Result := CODE_PAGE;
end;
Posted by: firefox
« on: October 20, 2013, 05:23:53 pm »

Hello,
Many thanks for the great program.
I've started to write an import script for japanese site (EUC-JP encoding) and I've noticed a strange thing.
I cannot use japanese character in PosFrom.
Os: Windows 8, PVD 1.0.2.6, the script file saved with encoding utf-8.
Code: [Select]
  StartPos := Pos('<table border="0" cellpadding="2" cellspacing="0" class="mg-b20">', HTML);
  StartPos := PosFrom('">レーベル:</td>', HTML, StartPos);
    Cast := Trim(TextBetween(HTML, '>', '<', False, StartPos));
  if Cast <> '----' then
  begin
    CastURL := BASE_URL + Trim(TextBetween(HTML, 'href="', '"', False, StartPos));
    Cast := Trim(TextBetween(HTML, '">', '<', False, StartPos));
    LogMessage('writer: '+ Cast +', url: '+ CastURL);
    AddMoviePerson(Cast, '', '', CastURL, 2);
  end else
    LogMessage('writer not found');