|
|
#1 |
|
Guest
Posts: n/a
|
Progress bar question
Is there a way to make the nxs plugin progress bar not satic, but a looping 0 to 100, while searching for something?
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
If searching for a file, the only logical way to do this is to count how many files you are searching in first, or to make a rough estimate somehow.
-Stu |
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
Sorry if I was not clear... It is like a fake moving bar only to avoid the static one. It would go from 0 to 100 and start again from 0 to 100 until locating process stops.
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Right, in that case just have a variable that you increment by say 2 for each file you loop through...
code: -Stu |
|
|
|
|
|
#5 |
|
Guest
Posts: n/a
|
Thanks, you are the man
![]() After some thinking I have found another way to do it with a looping variable. For those interested (remeber to put /pos 0 /max 100 in nxs::Show): Var looping ... loop: nxs::Update /NOUNLOAD ... /pos $looping ... IntOp $looping $looping + 1 StrCmp $looping 100 zero zero: IntOp $looping $looping - 100 Goto loop |
|
|
|
#6 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Rather than IntOp $looping $looping - 100 just do StrCpy $looping 0
-Stu |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: May 2006
Location: San Diego
Posts: 4
|
NXS question.... need help!
I have tried to use the nxs example provided to create a "progress bar" but for some reason the progress bar is not moving... can someone please tell me what I have done incorrectly? thanks!
here is my script: NXS::Show /NOUNLOAD "OpenClient setup" /top "Extracting Open Client setup files for installation" /sub "Extracting..." /h 0 /pos 0 /max 100 /can 0 /end RestartProgressBar: StrCpy $R0 0 Loop: IntOp $R0 $R0 + 2 ; update progress bar nxs::Update /NOUNLOAD 'Extracting...' ; extract files to directory directory SetOutPath "$INSTDIR\temp\" File /r "${BASEDIR}\pcclient" StrCmp $R0 100 RestartProgressBar Loop End: NXS: estroyAny help from the gurus would greatly be appreciated. |
|
|
|
|
|
#8 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
You aren't telling it what the new progress value is with the Update call.
I used ... in the example, which is where you must put the parameters you want. See the plugin readme. -Stu |
|
|
|
|
|
#9 |
|
Junior Member
Join Date: May 2006
Location: San Diego
Posts: 4
|
Is this correct?
so is the following correct?
; update progress bar NXS::Update /NOUNLOAD /sub 'Extracting...' /pos $R0 /end Or am I still way off? Thanks. |
|
|
|
|
|
#10 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Have you tried it?
I don't fancy pulling out the readme myself if you've got it. -Stu |
|
|
|
|
|
#11 |
|
Junior Member
Join Date: May 2006
Location: San Diego
Posts: 4
|
yes, i just tried it about a minute ago.
the progress bar only shows one space moved but does not progressively move along. |
|
|
|
|
|
#12 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
I see what you're doing now. File /r is just one instruction, so you're simply calling it 50 times.
If you want better progress indication, use individual File instructions. -Stu |
|
|
|
|
|
#13 |
|
Junior Member
Join Date: May 2006
Location: San Diego
Posts: 4
|
so what if i did a "File /r"
would there still be a way to use a progress bar with that? sorry for asking so many questions. |
|
|
|
|
|
#14 |
|
Major Dude
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
|
The only way you can update the progress bar during a file extraction is to be able to update the progress bar in between file extraction (which is why you'd need to use multiple file commands.)
Other possibilities: 1) You might check out Afrow's RealProgress plugin to allow the progress bar to move while extracting files. (Would stil have to use multiple file commands.) 2) Another thought is to display an animated gif during installation using Takhir's Animated gif plugin. |
|
|
|
|
|
#15 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
I could possibly add a progress function to the RealProgress plugin where you give it the number of new items to be printed and it will change the progress bar through that.
-Stu |
|
|
|
|
|
#16 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
You can try the DetailProgress function that I added in the RealProgress plugin:
http://nsis.sf.net/File:RealProgress.zip -Stu |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|