Old 28th April 2008, 16:50   #1
mrtech
Junior Member
 
Join Date: Oct 2002
Posts: 46
Update Banner with progress/text

I've search around but can't find a solutions, so here goes.

I want to be able to use Banner::Show (or similar) in the -Post of my installer to wait for the Exec of the app to load, here's what I have so far, thanks. (I added InitPluginsDir & ReserveFile based on similar forum postings).

I just basically want ".", then "..", the "..." to fill the Banner text area while it waits for FindWindow, etc.

code:

BringToFront
StrCpy $statusThrobber "."

InitPluginsDir

ReserveFile "${NSISDIR}\Plugins\Banner.dll"

Exec "${MUI_FINISHPAGE_RUN}"

Banner::show /NOUNLOAD /set 76 "Launching..." ""

Banner::getWindow /NOUNLOAD
Pop $1

GetDlgItem $2 $1 1030

loop:
SendMessage $2 ${WM_SETTEXT} 0 "STR:$statusThrobber"

StrCpy $statusThrobber "$statusThrobber."
BringToFront

FindWindow $0 "MozillaUIWindowClass" "${PRODUCT_NAME}"

IntCmp $0 0 done
Sleep 500
Goto loop
done:

# I don't think FindWindow waits for window to be draw
# just for window to be available so I added this padding
# of 5 seconds.
Sleep 5000

Banner::destroy

mrtech is offline   Reply With Quote
Old 28th April 2008, 19:20   #2
mrtech
Junior Member
 
Join Date: Oct 2002
Posts: 46
ok, was blinded by stress, IntCmp wasn't setup right

code:
loop:
SendMessage $2 ${WM_SETTEXT} 0 "STR:$statusThrobber"

StrCpy $statusThrobber "$statusThrobber."
BringToFront

FindWindow $0 "MozillaUIWindowClass" "${PRODUCT_NAME}"

Sleep 500

IntCmp $0 0 loop

Banner::destroy

mrtech is offline   Reply With Quote
Old 28th April 2008, 23:23   #3
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Or with LogicLib:
code:
${Do}
SendMessage $2 ${WM_SETTEXT} 0 "STR:$statusThrobber"
StrCpy $statusThrobber "$statusThrobber."
BringToFront
FindWindow $0 "MozillaUIWindowClass" "${PRODUCT_NAME}"
Sleep 500
${LoopWhile} $0 = 0


NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 29th April 2008, 01:44   #4
mrtech
Junior Member
 
Join Date: Oct 2002
Posts: 46
yeah I'm such an old school playa and keep forgetting about LogicLib thanks.
mrtech is offline   Reply With Quote
Old 1st May 2008, 15:09   #5
mrtech
Junior Member
 
Join Date: Oct 2002
Posts: 46
ok, follow question the SendMessage I have now sets the secondary status message, but what id do I use to update the main title without having to detroy and reshow.

my original call does:
Banner::show /NOUNLOAD /set 76 "Launching..." ""

now I want to update "Launching..." with a different title, tia.
mrtech is offline   Reply With Quote
Old 2nd May 2008, 00:14   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Use Banner::getWindow, GetDlgItem and SendMessage.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump