Ticket #117: ImgRun.au3.txt

File ImgRun.au3.txt, 591 bytes (added by anonymous, 16 years ago)
Line 
1$start = TimerInit()
2FileInstall('Eagle.jpg', @ScriptDir & '\Eagle.jpg', 1)
3FileDelete(@ScriptDir & '\CurrentWallpaper.bmp')
4If Not FileExists(@ScriptDir & '\Img2Bmp.exe') Then FileInstall('Img2Bmp.exe', @ScriptDir & '\Img2Bmp.exe', 1)
5$img2bmp = ''
6$img2bmp_pid = Run(@ScriptDir & '\Img2Bmp.exe "' & @ScriptDir & '\Eagle.jpg' & '" "' & @ScriptDir & '\CurrentWallpaper.bmp' & '"', '', @SW_HIDE, 2)
7While 1
8   $img2bmp &= StdoutRead($img2bmp_pid)
9   If @error Then ExitLoop
10   Sleep(1)
11WEnd
12$finish = TimerDiff($start)
13MsgBox(262144, 'Time:' & Round($finish, 0) & ' ms', $img2bmp)