|
okeefem Newbie
Joined: 28 Aug 2003 Posts: 3 Location: Canada
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Aug 28, 2003 8:28 pm |
The #MENU command expands and/or evaluates variables and functions immediately. Use ~ to prevent this. %pick() returns a stringlist for multiple picks. Use #FORALL to repeat the action with each pick one-at-a-time.
#MENU {pick} {#FORALL ~%pick( get, drop) {~%i magic}} |
|
|
|
okeefem Newbie
Joined: 28 Aug 2003 Posts: 3 Location: Canada
|
Posted: Thu Aug 28, 2003 9:59 pm |
Thank you for such a quick response.
I can give you my humble assurance I have no knowledge of any programming and admit to the superiority of you all. It now behooves me to humiliate myself further by repeating the question in another form and asking for further clarification.
I would like to right click to make a "Menu" appear, then select a line and be presented with a list of choices. If more than one choice is selected I would like all choices to execute in the listed order.
This is my next attempt (cut and pasted from the window)"
#Forall ~%pick{"drop %selword","get %selword","sacrifice %selword","bury corpse","bury %Selword"}
^ syntax error
" at the first "("
"
I cut and pasted your solution to my "command line" and ended up with another "speed menu" item named "pick". When selected it entered a command "%magic".
I cut and paste from the help file... "pick Syntax: %pick(s1,s2,s3,...)..." this previously would give me a list and if more than one item was picked a ";" (semi-colon) would automatically be inserted between the listed items and enable all items to execute. Is this no longer the case?
I appreciate the ZMUD lessons teaching me what a "varible" and an "alias" are (kinda) but instead of wasting hours playing I am spending hours learning to build a game interface. I do not want to appear an ingrate, but I did not purchase this "program" to learn a programing language. It was my impression that this would be a somewhat automated somewhat graphical interface designed to ease the use and increase the enjoyment of a text based "game".(As in reducing the typing of commands) This seems to be a roundaboutway to get customers to invent the expected interface. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Aug 29, 2003 1:50 am |
The syntax error is that your first "(" isn't really a "(", it's a "{". Also, since you're entering the command in the settings editor (GUI), you don't need the ~, but you do need to supply an action for #FORALL.
#FORALL %pick("drop %selword","get %selword","sacrifice %selword","bury corpse","bury %selword") {%i}
NOTE: You're right about the command I supplied not working from the command line either. The command-line syntax has an optional field for the menu number, which I was using while testing but left out when I posted. With the number, ~ is needed. Without the number, it isn't. |
|
|
|
okeefem Newbie
Joined: 28 Aug 2003 Posts: 3 Location: Canada
|
Posted: Fri Aug 29, 2003 3:41 am |
Lightbulb, you are an excellent teacher, and I hope you are treated well in your life. Thank you for your patience.
I have it now thank you. I will try and keep it down ib future but my lack of technical expertise combined with a poor outlook leads me into frustration.
Thank you. |
|
|
|
|
|