|
|
|
|
#1 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Can System do this?
It would be handy if I could DetailPrint 4 lines of text for current status, and then if something fails, then I want to be able to remove just those 4 lines, but not the rest of the text from the log window, and print the status once again (4 lines).
Is this possible? -Stu |
|
|
|
|
|
#2 |
|
NSIS Dev
Join Date: Apr 2003
Location: Portugal
Posts: 110
|
Hi,
You can use this two functions to accomplish this task; Ofcourse this functions only have effect while inside sections. PHP Code:
PHP Code:
![]() Hope this help,good luck Ramon |
|
|
|
|
|
#3 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
If this is not already on the archive, may I add it?
-Stu |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
This is what I want to do
Will this work? Section Dummy DetailPrint "This line stays!" DetailPrint "line 1" DetailPrint "line 2" DetailPrint "line 3" DetailPrint "line 4" Call GetDetailViewItemCount Pop $0 Push $0 Call DeleteDetailViewItem IntOp $0 $0 - 1 Push $0 Call DeleteDetailViewItem IntOp $0 $0 - 1 Push $0 Call DeleteDetailViewItem IntOp $0 $0 - 1 Push $0 Call DeleteDetailViewItem SectionEnd |
|
|
|
|
|
#5 |
|
NSIS Dev
Join Date: Apr 2003
Location: Portugal
Posts: 110
|
No it won't work, because you don't decrement the value returned by GetDetailViewItemCount, ie:
Suppose you have 3 items on details view: "Line 1" -> Index is 0 "Line 2" -> Index is 1 "Line 3" -> Index is 2 But GetDetailViewItemCount returns 3, if you want to delete last entry you must decrement the returned value to get 2, witch is the correct index to "Line 3", you see? I can change the function "DeleteDetailViewItem" so the input param is not ZERO based, if you want? btw, use this macros to accomplish what you need: code: then in your dummy section: code: PS: if you want to add it to the archive, feel free to add it, sorry I have no time now good luck, Ramon |
|
|
|
|
|
#6 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
I put up this page with 2 new functions on it.
One deletes lines from the end of the log window, and the other deletes lines from the top. http://nsis.sourceforge.net/archive/...50&instances=0 Works great too! -Stu |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|