Loop Commands or Functions Until a Condition becomes True in Inno Setup -


i want show nice welcome animated gif users when running program installer created using inno setup.

i want display png images order (as inno setup doesn't support displaying animated gifs yet) using isgsg.dll until setup finishes initializing tons of codes.

i wrote code show png images in order, stops after last 1 shown.

i need continue showing first png image after last 1 shown before.

if setup initialized,(i mean if wizardform visible) looping procedure should stop.

the codes wrote display png images:

function initializesetup(): boolean; var   dlgwait: tform; if result = true begin extracttemporaryfile('welcome1.png'); extracttemporaryfile('welcome2.png'); extracttemporaryfile('welcome3.png'); extracttemporaryfile('welcome4.png'); extracttemporaryfile('welcome5.png'); extracttemporaryfile('welcome6.png'); extracttemporaryfile('welcome7.png'); 

<<< looping should begin here >>>

showsplashscreen(dlgwait.handle,expandconstant('{tmp}\welcome1.png'),0250,1000,0250,0,255,true,$ffffff,10); showsplashscreen(dlgwait.handle,expandconstant('{tmp}\welcome2.png'),0250,1000,0250,0,255,true,$ffffff,10); showsplashscreen(dlgwait.handle,expandconstant('{tmp}\welcome3.png'),0250,1000,0250,0,255,true,$ffffff,10); showsplashscreen(dlgwait.handle,expandconstant('{tmp}\welcome4.png'),0250,1000,0250,0,255,true,$ffffff,10); showsplashscreen(dlgwait.handle,expandconstant('{tmp}\welcome5.png'),0250,1000,0250,0,255,true,$ffffff,10); showsplashscreen(dlgwait.handle,expandconstant('{tmp}\welcome6.png'),0250,1000,0250,0,255,true,$ffffff,10); showsplashscreen(dlgwait.handle,expandconstant('{tmp}\welcome7.png'),0250,1000,0250,0,255,true,$ffffff,10); 

<<< looping should continue here if not wizardform visible, otherwise looping should stopped >>>

... end; 

how can expect?

updated question

i can't think why code not working.

this dll requires png file's filename ansistring.

but i've provided string.

is gone wrong or other synatx error here not working?

not working means png images showing loop procedure not working.

the code tried add conditional loop using repeat until:

function initializesetup(): boolean; var   dlgwait: tform;   imessagehandler: tform;   x: integer;   errorcode: integer;   lblwait: tlabel; if result := true begin dlgwait := tform.create(nil); dlgwait.hide; begin order:=1; repeat showsplashscreen(dlgwait.handle,expandconstant('{tmp}\welcome+inttostr(order)+.png'),0250,1000,0250,0,255,true,$ffffff,10); order:=order+1; until fileexists(expandconstant('{tmp}\welcome+inttostr(order)+.png')) = false; end; end; 

are there syntax errors?

but compiler doesn't give compiler warning or error.

thanks in advance.

you need reset counter when you've reached end. should started. (note: untested - don't have innosetup on machine. replace test in until whatever appropriate detect wizardform being visible.)

function initializesetup(): boolean; var   dlgwait: tform;   imessagehandler: tform;   x: integer;   errorcode: integer;   lblwait: tlabel; const   numimages = 7; begin   if result    begin     dlgwait := tform.create(nil);     dlgwait.hide;     order := 1;     repeat       showsplashscreen(dlgwait.handle, expandconstant('{tmp}\welcome' + inttostr(order) + '.png'), 0250, 1000, 0250, 0,255, true, $ffffff, 10);       order := order + 1;       if order > numimages         order := 1;     until wizardform.visible;   end; end; 

Comments