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

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