Hi everyone,

I'm trying to make something in ICE, but I've some problems.

How should I let a user input something? since the Input and Prompt commands don't work?
And how does the full screen work with where something is put?
(I just don't get it, every time I try something, it's not at the place I expected it to be...)
1) Using the getkey function. You'll likely need to code it to make it display everything, as well as adding inputted characters into the string. Note that the keys are different between BASIC and ICE though.

2) Pixel 0,0 is the top-left corner. Going right increases the x-coordinate, and down increases the y-coordinate.
Privacy_Dragon wrote:
Hi everyone,

I'm trying to make something in ICE, but I've some problems.

How should I let a user input something? since the Input and Prompt commands don't work?
And how does the full screen work with where something is put?
(I just don't get it, every time I try something, it's not at the place I expected it to be...)


You realize there is a whole wiki on that stuff right?
https://github.com/PeterTillema/ICE/wiki
NonstickAtom785 wrote:
Privacy_Dragon wrote:
Hi everyone,

I'm trying to make something in ICE, but I've some problems.

How should I let a user input something? since the Input and Prompt commands don't work?
And how does the full screen work with where something is put?
(I just don't get it, every time I try something, it's not at the place I expected it to be...)


You realize there is a whole wiki on that stuff right?
https://github.com/PeterTillema/ICE/wiki


Yes I know, but I couldn't find it there.
PT_ helped me with this on my 2D Minecraft CE project.

Try this code:

" WRMH VQLG ZUPKFC YTOJEB XSNIDA"->MAINCHARS
" wrmh vqlg zupkfc ytojeb zsnida"->SUBCHARS
" 369 258 147 "->NUMCHARS
If KEY>=10 and KEY<=47
32->CHAR
If VALUE=0
*{MAINCHARS+KEY-10}->CHAR
End
If VALUE=1
*{SUBCHARS+KEY-10}->CHAR
End
If VALUE=2
*{NUMCHARS+KEY-10}->CHAR
End
If CHAR!=32
CHAR->**{Str1+length(Str1
POSA+1->POSA
End
End


*** Thanks to PT_ the code should work!

The code saves the text you type into Str1. You need to make your own GUI/UI (whatever you call it) though!

Hope this helps!
Oh, and about using fullscreen:
You want to use
Quote:
:det(0)

for graphics (like line(), printString(), etc..)

...and
Quote:
:det(1)

for things like the TI-BASIC command Output().
But if it's put in a string it cannot be used for calculations right?
because that's what I want...
And I don't know if it's possible to set a string to a variable?

Maybe

Code:
sub(Str1,1,2)->A

and

Code:
sub(Str1,1,4)->B

?

Because I want someone to be able to input a date, which is then used in further calculations...
Well if you use the code I provided above and put a

Code:
:2->VALUE


right before the above code, it will take only number input from the keypad and save it to Str1.

Then, you MIGHT could try the sub() command.

Remember in ICE, the sub() command works like:

If Str1 is "blah,123abc" and you use sub(Str1,0,4), then you'll get just "blah"... because it's sub( <string> , <start> , <length> )

I used 0 as the <start> place because in ICE, 0 is the first character of the string variable when it comes to sub()

Also, try experimenting to see if you can convert a string with numbers into just a number variable!
hmmmm...

I think that this might work...
I still need to test it though.

Code:
 getKey->KEY
If KEY=33
    0->CHAR
If KEY=34
    10->CHAR
If KEY=26
    20->CHAR
.......
.......
If KEY=33
    0->CHARR
If KEY=34
    1->CHARR
if KEY=26
    2->CHARR
......
......
CHAR+CHARR=INPUT
EDIT: I know what I did wrong...
The output( command doesn't work with several variables.

I really don't know what is wrong now...
Can anyone help me?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement