Hi,
write is not the opposite of read (see documentation). You should use the following code:
my $temp = pack ('n', 0x00f0);
syswrite (FH, $temp, 2);
Please be careful with syswrite. It shouldn't be mixed with other write statements (see documentation).
Thomas
1. You can write RTF form you perl script. Word can read RTF-files. Drawback: You must be familiar with RTF.
2. Use Word's macro recorder to get an idea of how to solve the task via OLE automation. The recorded macro shows the used objects with their properties and methods. Then simply...
It should work with [] around table names in Access. The simplest way is building the query in Access until it runs and cut'n paste it into the perl program.
Thomas
Perl doesn't support multiline comments. You can use the follwing code:
if (0) {
... my code
}
The last element of an array is returned by
$#testArray.
$len = $#testArray + 1;
Thomas
Does your program work when you call it from the command line? If not you should correct this. If yes it may be a problem with the scheduler account. Scheduled tasks are started form the TaskScheduler service that runs with the LocalSystem account.
Are you shure that
$Mailer = $Server->CreateObject("SMTPsvg.Mailer");
creates an Object? You should check this. With
$Win32::OLE::Warn = 3;
every COM error is immediately reported and your script dies.
Hope that helps
Thomas
I think perl uses your for-head as a list. The list ($i = 0, $i <= $noinsection, $i++) has three elements and is evaluated before entering the loop. $i is set to 0 and incremented at last resulting to 1. The loop iterates 3 times because the list has 3 elements. The current value of $i (1) is...
sprintf is a C library function. The format string is identical to the printf format string. Have a look to http://msdn.microsoft.com/library/devprods/vs6/visualc/vccore/_crt_printf_type_field_characters.htm
You can buy a perl compiler (from Active State) and create a COM-Server from your perl program. But I think a better solution is the Windows Scripting Host (WSH). Active State's Perl distribution comes along with a Perl Scripting Engine. Perl scripts can run under control of WSH. MS offers a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.