|
|
#41 | |
|
Join Date: Sep 2003
Posts: 27,873
|
Quote:
![]() is mainly from playing around with things (all self taught though i wonder why at times ) that i've learnt win32 and even then i still have to research things / spend hours working out why it won't work but that's the same with anything really-daz [edit] p.s. starts a second page here @ n0On3[/edit] |
|
|
|
|
|
#42 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
That's the way I get taught.
I know a few basic languages inside out by making the same program for my game in the different languages. My programs basically read through a Quake2 log file getting the number of kills the entered name has done, how many deaths etc for specific weapons. So far I've done it in Basic, QuickBasic, Perl and C I'm looking forward to getting MS Visual Studio but that will come once I have finised school. -Stu |
|
|
|
|
#43 |
|
Join Date: Sep 2003
Posts: 27,873
|
i remember basic
first language i learnt back on my old atari ste (one for the history books and i've still got it).only do c now since it's straight forward, have dabbled a bit in c++ but not enough to be able to do it all the time. learnt the basics of c at uni and then win32 for my final project (a little editor and development thing for some DOS tools from the first year). still developing the thing so that i can have a MDI text editor with customisable syntax highlighting of my source files. also worked on a thing to allow most windows and dialogs to 'dock' to the screen edge or the inside of MDI window eg Excel and that as linux does - makes positioning of windows easier to do but still have a few bugs with the code when it's closed down (but with recent stuff i've done here i think i may have the solution to the problems)File reading is the fun stuff to do windows hooks and subclassing are a real pain in comparison at times-daz |
|
|
|
|
#44 |
|
Senior Member
|
hi, I used v0.98 beta 3 and still have the extra fourth button. I don't know how it got there
PHP Code:
|
|
|
|
|
#45 |
|
Join Date: Sep 2003
Posts: 27,873
|
can you post a screen shot of what's appearing for you. also what OS are you using?
i will have a look at the code again in a bit but i can't think what could be going wrong also did this version definitely fix the crash issue you were having in the earlier versions? -daz |
|
|
|
|
#46 |
|
Senior Member
|
yes, it seems that the silent crash is gone
![]() I attach a snap. Using Win98se |
|
|
|
|
#47 |
|
Join Date: Sep 2003
Posts: 27,873
|
thanks for the picture and it's what i expected to see.
i managed to reproduce the problem and it's down to there being other values on the stack. the function will read in until it gets to the 4 button limit or there is nothing else on the stack hence what you get. best option i can think of would be to add a control character on for the last button to ensure that the correct number of buttons are added e.g. IDYES "blah" \eIDCANCEL -daz |
|
|
|
|
#48 |
|
Senior Member
|
ah, so the problem is the stack...
do all plugins read parameters from stack? |
|
|
|
|
#49 |
|
Join Date: Sep 2003
Posts: 27,873
|
yep, that's how they are passed for the plugin to get them. the issue with this plugin is that it takes variable parameters unlike most other plugins which accept a fixed number of parameters - hence the problem with reading what is available.
so the options are: * a control flag on the last button * assuming that if the stack parameter converts to a number to stop * to control the number it expects (as in older versions) * ensure the stack is clear before using the function personally i think the first option is the easiest to use. didn't have enough time to make the above alteration last night, will be up by tomorrow. -daz |
|
|
|
|
#50 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
You can do what the author of UnTGZ has done. He forced an extra stack push of "--" for inputs of variant sizes. It's the most elegant and simple way in my opinion. Forcing a flag on the last button might cause the user to delete it when editing or move it around when moving the buttons.
BTW, nsisdt uses the $0 variable
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
#51 |
|
Join Date: Sep 2003
Posts: 27,873
|
yeah the flag option has it's issues
![]() i'll have a look at what you've mentioned, thanks. -daz |
|
|
|
|
#52 |
|
Senior Member
Join Date: Apr 2004
Posts: 130
|
Can somebody help me out on this one. Here is the code I'm using:
messagebox::show "MB_ICONQUESTION" "" "" "$(TEXT_INSTCLIENT_MSG)" "$(TEXT_YES_MSG)" "$(TEXT_NO_MSG)" I keep getting a third button like what is described above. I've tried the possible fixes except I can't figure out how to clear the stack to make the third button go away. I tried the control flag "\e$(TEXT_NO_MSG)" but then it just shows up in the buttons text. It also looks like the last option is one he was talking about putting back in but never did. Is there a newer version of this available or can somebody show me a workaround? |
|
|
|
|
#53 |
|
Senior Member
Join Date: Aug 2004
Posts: 109
|
and I'm upping this topic because I think you should explain in your txt what is the id of an icon group
I have this code : code: and I didn't find the good value for "103" resource hacker gave me the good values... say it in your help file ![]() see ya and thx for your great plugin dro
|
|
|
|
|
#54 |
|
Senior Member
Join Date: Aug 2004
Posts: 109
|
hello
I have this messagebox : code: But I have no sound when it appears I'd like that a window "question" sound comes... How can I do ? thx for your answers
|
|
|
|
|
#55 |
|
Join Date: Sep 2003
Posts: 27,873
|
point 1: yeah, i agree on that. i also really need to just better document the plugin (as well as finding the source code for it on my old machine otherwise it's re-write time which in some ways could be a good thing i think
and since there's a decent changelog in the zip i can re-work things if needed that way)point 2: not sure to be honest, only thing i can think of is that you don't have a sound assigned to that system action (you'd need to check in the sound properties dialog) -daz |
|
|
|
|
#56 |
|
Senior Member
Join Date: Aug 2004
Posts: 109
|
are saying that this code is giving you a sound ?
|
|
|
|
|
#57 |
|
Join Date: Sep 2003
Posts: 27,873
|
i've just looked through some info on msdn and the MessageBeep(..) needs to be called. as a work around you can use the system plugin to manually do this.
i think i will just do a complete re-code of the plugin and i'm noting down to have sound support in there as well (for some of my Winamp plugins i need to alter a standard messagebox so i intend to make a general core which will work for them and as a nsis plugin for this) just as i was about to post i did a quick system scan and i've found what looks like the source code for 0.98beta (first one i believe) so i'll do a bit more and see what else i can find since if i can get 0.98b3 that'll make my life easier) -daz |
|
|
|
|
#58 |
|
Senior Member
Join Date: Aug 2004
Posts: 109
|
yeah
![]() this is cool I'm waiting for it ![]() "bon courage" like we say in France see ya
|
|
|
|
|
#59 |
|
Major Dude
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
|
Hey DrO,
This might be a moot point if you are still planning to re-write, but I thought I'd mention it: In your latest reslease (v0.98 beta 3), I still get a crash with the silent install. To recreate, just run the file messagebox_s.exe included with the package. The crash occurs on the message box that reads "And for the special options" I've attached a screenshot of the message box that generates the error. i also noticed that the "no" button should be named "m12if you can!" Here's the text of the error: The application, , generated an application error The error occurred on 07/11/2005 @ 07:54:13.718 The exception generated was c00000fd at address 100023B4 (<nosymbols>) This is nothing urgent--just letting you know. Thanks!
|
|
|
|
|
#60 |
|
Forum King
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
|
btw, nsis (english translation) officially uses "OK" and not "Ok", like that messagebox plugin (IDOK)
|
|
|
|
|
#61 |
|
Junior Member
Join Date: Nov 2005
Posts: 3
|
Hello DrO,
I am using your MessageBox plugin v0.98 beta 3. I found two bugs: 1. when I use you plugin in a section twice without pop $0 between them, I get three buttons in the second messagebox. Here an example script: ------------------------- OutFile "MessageBoxTest.exe" ; Installer sections Section "-Installation actions" SecInstallation messagebox::show MB_ICONINFORMATION|MB_DEFBUTTON1 "" "" "test" "Download Now" "Download Later" ; Pop $0 ; without this the next messagebox will have three buttons although only two are defined!!! messagebox::show MB_ICONINFORMATION|MB_DEFBUTTON1 "" "" "test2" "Download Now" "Download Later" Pop $0 StrCmp $0 "1" 0 readyTest ; pressed "Download Now" ExecShell "open" "http://google.com/" readyTest: SectionEnd ----------------------------- 2. When I use your plugin in the .onInit function my installer always crashes. Here an example script: ----------------------------- OutFile "MessageBoxTest.exe" Section SectionEnd Function .onInit messagebox::show MB_ICONINFORMATION|MB_DEFBUTTON1 "" "" "test" "Download Now" "Download Later" messagebox::show MB_ICONHAND|MB_DEFBUTTON2 "" "" "and for the special options...$\n" "IDYES" "m12if you can!" ClearErrors FunctionEnd ----------------------------- Could you help me with this bugs or do I have bugs in my scripts. Thanks in advance and regards |
|
|
|
|
#62 |
|
Senior Member
|
I too am also experiencing this problem
|
|
|
|
|
#63 |
|
Join Date: Sep 2003
Posts: 27,873
|
because the plugin uses a variable parameter list you need to ensure that the stack is in a 'clean' state otherwise it will start pulling more than it should do (as you've come across). there was a post a few up by kichik about using a terminating parameter to indicate the end of the params.
as for the crash, i've managed to find the source code for 0.98 beta 1. i'm not sure where the beta 3 code is (could be on my old dev machine still...) i'll see if i can at least get the code working again and fix up some of the issues that i'd fixed from b1 to b3 and hopefully the issue you're having as well -daz |
|
|
|
|
#64 |
|
Senior Member
|
How do I apply what Kichik mentioned a few post up? I am not sure although I tried pushing before and after this plugin and failed to work around it
![]() Also, if you do plan on re-writing the code can you possibly add in support for jumps much like how MessageBox Handles them now? PHP Code:
Thank you DrO, I find the plugin very promising. Thank you again! |
|
|
|
|
#65 |
|
Senior Member
|
I found this link (http://forums.winamp.com/showthread....212#post935212) in the forums and tried out what Virtlink said. It seems to work as advertised...
PHP Code:
|
|
|
|
|
#66 | |
|
Join Date: Sep 2003
Posts: 27,873
|
the post by kichik was a suggestion on how the plugin could be fixed to handle the multiple parameters better.
i've been out of the loop on any real nsis coding for a while so i'm not sure if plugins are able to do what you're asking for with the jumps so i can't say. the other option is to have a quick macro in place to wrap things up for such a case (is something i'd need to look into to see if it's viable or not, etc) Quote:
-daz |
|
|
|
|
|
#67 |
|
Join Date: Sep 2003
Posts: 27,873
|
i've managed to get the 0.98 beta 1 code compiling on my machine here at work and that example script doesn't crash for me but beta 3 does so i broke something with beta 3.
i've just added in /end needing to be on the end of a call to the plugin's function which fixes all of the pop fun since i can now at least only process what's needed and not anything else (will have to make sure it's working 100% though before i do anything else with it). because of the state of the code i'm going to ditch a 1.0 and effectively re-code a fair chunk of it to aim towards a 2.0 since i also want to have the ability to have a checkbox on the bottom of the messagebox for setting as a default action type of thing. it's going to take a few days for me to get upto speed with the code again but should have at least a fixed working build by the middle of the week ![]() -daz |
|
|
|
|
#68 |
|
Senior Member
|
What I meant was instead of...
PHP Code:
PHP Code:
|
|
|
|
|
#69 |
|
Senior Member
|
I have a problem I am not too sure how to get passed. It involves nesting a variable within a temporary !define inside a !macro. Basically, I am trying to create a macro in which I would be able to use relative jumps a bit easier to get around...
PHP Code:
PHP Code:
I might have mistakes in the code but am unable to test it out fully ![]() Any help is greatly appreciated on this! Thank you! |
|
|
|
|
#70 |
|
Senior Member
Join Date: Jul 2003
Posts: 152
|
how do you include a custom icon, where do you put that icon (dll file) for it to recognised
|
|
|
|
|
#71 |
|
Senior Member
Join Date: Jul 2003
Posts: 152
|
Anyone?
Dro Please |
|
|
|
|
#72 |
|
Join Date: Sep 2003
Posts: 27,873
|
sorry for the delay in reply, real world kept me from a proper browse of the forums yesterday.
the icon needs to be in a resource dll if i remember correctly (the example script uses shell32.dll from memory). i'll try and double-check the code over tonight (if need be i can look at modifying to make a custom build which allows you to specify just a .ico to be used (should be a relatively easy change from what i rememeber of the icon api in windows) -daz |
|
|
|
|
#73 |
|
Senior Member
Join Date: Jul 2003
Posts: 152
|
Thanks DrO for the reply,
No need to change it to a ico, (but if you want that would be great), I can easily make icon dll file, I just need to no where to place or extract the dll file too, so it works, I tried placing it in the system32 folder, but it didn't work I just got a blank space where a icon should have been. That's just messing around with your default script, I'm not really bother about adding more button, it would just be nice if I could place a custom icon in it. Plus I'm not really sure what to put in the script, whether you can specify a named custom icon as in "fred.dll,0" or does could you specify it as "$INSTDIR\fred.dll,0" Thanks Tony |
|
|
|
|
#74 |
|
Join Date: Sep 2003
Posts: 27,873
|
you'd need to specify a full path, the reason the shell32 one works is because it's already on the system's default search path
-daz |
|
|
|
|
#75 |
|
Senior Member
Join Date: Jul 2003
Posts: 152
|
ah ok I'll try it thanks mate
|
|
|
|
|
#76 |
|
Senior Member
Join Date: Jul 2003
Posts: 152
|
Nah I can't get it to work, I've placed a dll file in the system32 folder, the dll file has 2 icons in it so the full path and icon number (for icon 2) would be "$SYSDIR\fred.dll,2" right?
It didn't work It frustrating
|
|
|
|
|
#77 |
|
Join Date: Sep 2003
Posts: 27,873
|
with that dll, open it up in resource hacker for example and look for a [icon group] value in the tree. check which icon group the icon you want to use is in and then use the id of that group. that works ok for me from what i can tell
-daz |
|
|
|
|
#78 |
|
Senior Member
Join Date: Jul 2003
Posts: 152
|
Ah this is why it probably won't work tried opening it with res hacker as you suggested, but Res Hack says its not a win32 executable file I made the dll file with Axialis IconWorkshop
Bugger
|
|
|
|
|
#79 |
|
Join Date: Sep 2003
Posts: 27,873
|
use the attached dll for adding your icons into. it's a valid dll i built in msvc and i tested by manually adding an icon in with resource hacker and it worked for me
-daz |
|
|
|
|
#80 |
|
Senior Member
Join Date: Jul 2003
Posts: 152
|
thank but that didnt work but it gave me an idea, I found a existing dll file it was a file called acctres.dll deleted all the crap out of it leaving two icon and replaced those with my icons
And it works so thanks |
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|