+I&J Posted January 6, 2011 Share Posted January 6, 2011 Hi, I hope someone can help me here! I want to show a message box and make uses of both buttons: One with text "Yes", the other "No" and different script to each, but there is only one place to write script and it then seems to get applied to both buttons. This is really confusing - where can I write the script for button 2? Thanks! Quote Link to comment
tomholmes10 Posted January 6, 2011 Share Posted January 6, 2011 cart31alus.MsgBoxCBFuncs.MsgBoxCB2 = function(action) -- #GroupDescription=Script -- -- #Comment=Script Comment -- if action == "Button1" then do something else do something else end end Holmes Quote Link to comment
+I&J Posted January 6, 2011 Author Share Posted January 6, 2011 Thanks Tom, but that seems as if I will need some programming experience in LUA. I was hoping that it would be possible to specify it using the Wherigo Builder. Is it something which is not yet built into the beta version or why would there not be an option to do it the easy way (for dummies like me?) Quote Link to comment
+tower27 Posted January 6, 2011 Share Posted January 6, 2011 Thanks Tom, but that seems as if I will need some programming experience in LUA. I was hoping that it would be possible to specify it using the Wherigo Builder. Is it something which is not yet built into the beta version or why would there not be an option to do it the easy way (for dummies like me?) take a look at urwigo-Builder, with this tool you don't have to use scripts Quote Link to comment
+I&J Posted January 6, 2011 Author Share Posted January 6, 2011 Thanks, I will definitely give it a try! For now I did a work-a-round as I have to test my cartrige on the ground before my vacation is over. Quote Link to comment
tomholmes10 Posted January 7, 2011 Share Posted January 7, 2011 You can do that with builder! Holmes Quote Link to comment
+sTeamTraen Posted January 7, 2011 Share Posted January 7, 2011 Yes, there is only one script, and you get to use If-Else statements to do different things depending on which button is pressed. I'm guessing that the Builder's layout was designed before the decision to streamline into one script was taken. Quote Link to comment
+cache4pat Posted January 21, 2011 Share Posted January 21, 2011 Hi, I hope someone can help me here! I want to show a message box and make uses of both buttons: One with text "Yes", the other "No" and different script to each, but there is only one place to write script and it then seems to get applied to both buttons. This is really confusing - where can I write the script for button 2? Thanks! I've used the Message buttons in a 'Yet to be Published' Wherigo. There are 3; each of which can be programmed without using LUA. (A great feature, thx Urwigo!!; the last few Updates have been SUPER.) When you create and touch a message box, 'Button1' & 'Button2' appear and can be named. Plus there is a preprogrammed Cancel (3rd selection.) NEXT, find the "Message button" in the 'Expressions' section and use it like 'Compare' in your If/Else code. Once the "Message button" is placed in your code, touch it and a definition box appears which allows you to set it to Tlacitko 1 (Button1), Tlacitko 2 (Button2), or Storno (Cancel). Hope this helps. I've attached an image example of my coding snippet, done within URwigo; targeting my Oregon 450. Cheers, cache4pat Quote Link to comment
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.