Here's the basis of a perl program to convert dialogs to scripts. Its not comprehensive, but someone may find it useful (I did!)
#!/usr/local/bin/perl
my $who = "";
my $what = "";
my $comment = "";
while (<>) {
if (/^\@/) {
print "//$_";
} elsif (/^([A-Za-z0-9_]+)\: (.*).$/) {
$who=$1; $what=$2; $comment="";
if ($what =~ m|(\s*//.*).$|) {
$comment=$1; $what =~ s|(\s*//.*)$||;
}
printf 'DisplaySpeech(%s, "%s");%s%s', $who, $what, $comment, "\r\n";
} elsif (/run-script\s+([0-9]+)/) {
print "dialog_request($1);\r\n";
}
# More translations of script commands can go here
}
Nice one SSH! Thanks for sharing it. :)
~Cheers
Do you have to know perl to use it?
SHouldn't think so. I've never really tried to use Windows Perl, but if you've got any unix/linux flavour, it should just runitself if you stick it in a file and chmod +x
Clever idea, nice one SSH.
I won't pretend that I can read perl, but it looks reasonable enough :)