Hello Monks
This worked on Windows XP but is not working on Windows 7.
So, I have a file open in XMetaL and having edited, parsed and saved the file, I need to check internal links are ok. The script "check.pl" does this.
This is from my XMetal Macro:
sub CheckMarkup { # document must be saved unless ($ActiveDocument->{Saved}) { $Application->Alert("Document must be saved before checking"); return; } # document must be valid unless ($ActiveDocument->{IsValid}) { $Application->Alert("Document must be valid before checking (r +un Validate)"); return; } # get the path to this document my $path = $ActiveDocument->{FullName}; # run the check script my $shell = Win32::OLE->new('WScript.Shell'); unless ($shell) { $Application->Alert("Can't make WScript.Shell object"); return; } $shell->Run("I:\\...\\check.bat \"$path\"", 5); }
This is the content of the check.bat file:
perl -w I:\...\xml2sgm.pl %1
perl -w I:\...\check.pl %1
The check.bat file is being found ok, but %1 comes up empty.
It certainly appears Windows 7 is the culprit as nothing else has changed.
Incidentally I: is a mapped drive to our Unix server.
Can anyone help with this problem? Your collective wisdom would be most appreciated.
In reply to perl subroutine in XMetaL macro - $path not being passed to batch file on Windows 7 by spb54
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |