Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Ask user for a string
Old
DensetsuNoKaboom
Senior Member
 
DensetsuNoKaboom's Avatar
 
Status: Offline
Posts: 1,188
Join Date: May 2010
Location: e4eaf2
Default Ask user for a string - 06-19-2010, 05:55 PM

Can you make multiple possible answers for the same "ask user for a string" and have each possible answer do a different thing?


Thank you for taking the time to read this signature. This signature loves you.
   
Reply With Quote
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 578
Join Date: Nov 2008
Location: In the interwebs
Default 06-19-2010, 06:42 PM

The short answer is no. The long answer gets very long, and isn't fully complete. I've tried making drop down menus, but they freeze up whenever the Alice window is running. If you want the crazy workaround answer, then it's sort of possible. For the text, have numbers mean different things, and have the person enter a number. The rest is self explainatory.


'Apple Macintosh' - An anagram of 'Complaints Heap'

M.A.C.I.N.T.O.S.H. - Machine Always Crashes, If Not, The Operating System Hangs.

You're *such* a mac person.
   
Reply With Quote
Old
DensetsuNoKaboom
Senior Member
 
DensetsuNoKaboom's Avatar
 
Status: Offline
Posts: 1,188
Join Date: May 2010
Location: e4eaf2
Default 06-19-2010, 06:47 PM

Erm...I understood that up to the second "long".


Thank you for taking the time to read this signature. This signature loves you.
   
Reply With Quote
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 578
Join Date: Nov 2008
Location: In the interwebs
Default 06-19-2010, 06:51 PM

Baisically, it cannot be done with pure alice, and it hasn't been done well in jython. For an example of the crazy version, try searching around for Type It. It has some similar functionality.


'Apple Macintosh' - An anagram of 'Complaints Heap'

M.A.C.I.N.T.O.S.H. - Machine Always Crashes, If Not, The Operating System Hangs.

You're *such* a mac person.
   
Reply With Quote
Old
DensetsuNoKaboom
Senior Member
 
DensetsuNoKaboom's Avatar
 
Status: Offline
Posts: 1,188
Join Date: May 2010
Location: e4eaf2
Default 06-20-2010, 07:58 AM

Erm...I think I just did it in Alice (silly me for answering my own questions). What I did is have a string variable, begin the world by asking the user for a string that becomes the string variable, then make a huge bunch of if/elses saying what to do depending on the variable's value. I think something similar was done in AliceOS's Command Prompt.


Thank you for taking the time to read this signature. This signature loves you.
   
Reply With Quote
Reply

Tags
answer, ask user, if/else, multiple, string

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.