+MKW Posted March 26, 2008 Posted March 26, 2008 (edited) I want to show two message boxes. I can't use the dialog command, because I want to attach a script to the OK-button. The problem: the first box doesn't wait for the OK-button to be pushed, it just runs through. Edited March 26, 2008 by MKW Quote
+Delta68 Posted March 26, 2008 Posted March 26, 2008 Add the second message box into the 'Script to run when button click' on the first message box Quote
J2B2 Posted March 26, 2008 Posted March 26, 2008 (edited) Hi! Have you used a button script before? It's a great feature for what you want to do. I attached a screen captured image of the message box window, and here is the direction on how to use a button script feature. Fill in the Button 1 or 2 text box if you want to customize your buttons. After that, click, Click on Script to run when button clicked... After that, create a script to execute when the button is clicked. Go to IF-THEN and there should be an option that says, "if a button is clicked on a message box.." Does this make sense? Good luck! Let me know how it goes! J2B2 Edited March 26, 2008 by J2B2 Quote
+MKW Posted March 27, 2008 Author Posted March 27, 2008 Thanks! That's a nice workaround, but it doesn't really solve my problem. The first message is optional. It is nested in an if-statement. The second message should be shown every time. btw: I think it is a bug, which should be fixed. Quote
+Delta68 Posted March 27, 2008 Posted March 27, 2008 It's not a bug. It is just the style of the language and has been explained in other threads: like here Quote
+Delta68 Posted March 27, 2008 Posted March 27, 2008 The first message is optional. It is nested in an if-statement. The second message should be shown every time. You could create a messagebox in the 'else' part which is identical to the secondary messagebox in the 'if' part. In this code, if variable var equals "something" msgbox1 will be displayed followed by msgbox2 if var is not equal to "something" just the 'copy of msgbox2' is displayed: function zonezone2:OnEnter() -- #GroupDescription=enterzone -- -- #Comment=enterzone Comment -- if Wherigo.NoCaseEquals(var,"something") then Wherigo.MessageBox{Text=[[msgbox1]],Callback=cartlua.MsgBoxCBFuncs.MsgBoxCB1} else Wherigo.MessageBox{Text=[[copy of msgbox2 ]],} end end ------End Builder Generated functions, Do not Edit, this will be overwritten------ ------------------------------------------------------------------------------- ------Builder Generated callbacks, Do not Edit, this will be overwritten------ ------------------------------------------------------------------------------- --#LASTCALLBACKKEY=1#-- cartlua.MsgBoxCBFuncs.MsgBoxCB1 = function(action) if action ~= nil then -- #GroupDescription=oinclick -- -- #Comment=oinclick Comment -- Wherigo.MessageBox{Text=[[msgbox2]],} end end Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.