I'm experiencing some odd behaviour with a win32::GUI app. I'm not sure if
this is the best place to post, but I figured it would be a good start.
I have an app that does scanning and document capture. The problem I'm
experiencing is that when I click the scan button, everything executes up to
the system call that gets the image. When it hits the system call it will
sit and wait. I can make it continue if I give it just about ANY user
intervention- moving or clicking the mouse, pressing a key on the keyboard,
ect. If I just leave it, it will sometimes go on it's own, but it usually
takes at least 30 seconds.
I know this is relatively minor, but I also know my users are going to
complain about this :(
I'll include the handler and the scan function below, as both are relatively
short. Note that in the DoSCAN function, the scan button (called $scan) is
disabled right before the system call. When I click the button, it is
immediately disabled. So I know it's getting to that point. But then it
doesn't do the acquire call until I do SOMETHING, ANYTHING else.
And now, without further ado:
sub scan_Click()
{
SetSCANParams();
DoSCAN();
}
sub DoSCAN()
{ log_event("Doing Scan!");
$append="";
for ($i=1;$i<=$scannum;$i++)
{
if ($i>1) {Win32::MsgBox("Please Place Page $i on the Scanner", 0,
"Scanning!"); }
$scancmd="C:\\Acquire\\Acquire.exe /app=\"Pikeville Medical Center\"
/key=-779630267 /BW /B0 /HIDE /R$scanquality /H$scanlength /W$scanwidth /X0
/Y0 $append C:\\tmp.tiff";
$scan->Disable();
@reply = system($scancmd);
log_event("I said: $scancmd");
log_event("Acquire said: ".join("\n",@reply));
$append = "/APPEND";
}
DoVerify();
}
I'd appreciate any input on this.
Thanks
Scott Spearman.