in reply to Re^2: Slideshow using the Windows Picture and Fax Viewer
in thread Slideshow using the Windows Picture and Fax Viewer

Very interesting, thanks for explaining. Perhaps the problem is then related to having too many processes spawned?

Scott

  • Comment on Re^3: Slideshow using the Windows Picture and Fax Viewer

Replies are listed 'Best First'.
Re^4: Slideshow using the Windows Picture and Fax Viewer
by slloyd (Hermit) on Jan 30, 2006 at 01:29 UTC
    Yep. After reading your first reply I thought I would try to rewrite the code without using the system command that way and instead calling start. It worked! Hmm, so now I wonder what the limits of calling system(1,foo) are? Is this a limitation in Perl? What is really happening here?

    Fixed code below:

    #!perl use strict; my $dir=shift || die "no image dir"; my $viewcmd=qq|rundll32.exe C:\\WINDOWS\\System32\\Shimgvw.dll,ImageVi +ew_Fullscreen|; opendir(DIR,$dir) || die "Error opening $dir\: $!"; my @files=grep(/\w/,readdir(DIR)); close(DIR); foreach my $file (@files){ my $absfile="$dir\\$file"; next if $absfile!~/\.(jpg|gif|bmp)$/is; my $syscmd=qq|start $viewcmd $absfile|; print "$syscmd\n"; system($syscmd); select(undef,undef,undef,.5); }

    -------------------------------
    by me
    http://www.basgetti.com
    http://www.kidlins.com