This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic => TI-BASIC
Author Message
Joemama98


Newbie


Joined: 30 Jun 2003
Posts: 7

Posted: 30 Jun 2003 05:07:56 pm    Post subject:

[FONT=Times][SIZE=1]
Hello gentlemen, I'm broadcasting my question out if Input can be applied in...let's say the Text( command. My game, written in BASIC, is displayed strictly on the graph screen, and all font is done in Text(. I wan't to keep this tradition alive, however, Input seems to be only executable by that big font default. Any advice?
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 30 Jun 2003 05:49:47 pm    Post subject:

first of all, input will only work with the home screen. however, if i get up off my big fat metallic a** and find the prgm i wrote to do just that i might Cool post it.
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 30 Jun 2003 06:35:04 pm    Post subject:

here goes:

"<>" means "not equal to"
"->" means "sto ->"


prgm(theta)GETTEXT

Code:
" ->Str1
DelVar CRepeat D=105
If C
Text(A,B,sub(Str1,2,length(Str1)-1
Repeat D
getKey->D
End
If D<>105
Then
If D<>45 and C<E and D<95
Then
Str1+sub("ABC.[6 spaces]DEFGH[5 spaces]IJKLM[5 spaces]NOPQR[5 spaces]STUVW[5 spaces]XYZ ",D-40,1->Str1
C+1->C
End
If D=45 and C>0
Then
sub(Str1,1,length(str1)-1->Str1
C-1->C
If C
Text(A,B,sub(Str1,2,length(Str1)-1)+"[3 spaces]
End
End
End
sub(Str1,2,length(Str1)-1->Str1


anything in [brackets] is something i could not type or would be overly hard to dissern from the text (i.e., multiple spaces in succession)

Variables:
A - Y cordinate of where to place text
B - X cordinate of where to place text
C - (will be modified so move contents to another variable)
D - (will be modified so move contents to another variable)
E - Maximum # of charactars tha will be accepted (High score names, etc.)

----EDIT----
i didnt put it in my original post, but i do have a backspace, [CLEAR]

also, a cursor is cool and adds visual effect, but it also adds to size and execution time


Last edited by Guest on 30 Jun 2003 06:59:22 pm; edited 1 time in total
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 30 Jun 2003 06:49:29 pm    Post subject:

I once made a program like that only mine had a blinking cursor and backspace.

Basically, you use getkey to check the keypad, then you put each character at the space it would be at with the getkey number.

If 2 is 93, then you put 2 in the string at 93. Obviously, you may wish to use a modifyer such as Ans-40 as Darth used, so you don't need to type all the letters.

Now, you take one from the substring and concatnate it to the string. You will then display it on the screen using text at the location of the cursor. Next you need to move the cursor to the right position and also erase the cursors last position. BTW, a cursor is a line that is turned on and off every couple of loops.

Most importantly, you need to make the getkey routine run as fast as possible. In other words, you want getkey istself to be executed many times a second because if you slow it down it will make your routine seem unresponsive.

BTW, to backspace, use sub(Str1,1,lengh(Str1)-1)->Str1, then use a blank text e.g. text(#,#,"few spaces") You do not need to close the parenthesis.
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 30 Jun 2003 09:20:12 pm    Post subject:

i made something like that... it worked good... but i did it on the homescreen, never bothered to convert it to graph...
Back to top
Jeffrey


Member


Joined: 12 Jun 2003
Posts: 212

Posted: 30 Jun 2003 09:26:43 pm    Post subject:

The thing with graphscreen typing routines is, well, they are slow and inefficient most of the time. It is rare to find a fast routine that is complete and takes up little space. I only use them if I absolutely must. Otherwise I use a split screen concept and have the user input from the homescreen with intructions in the top. But I'm too lazy too. Lol, I made a program that automatically centers my graphscreen text and wraps it around to the next line.
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 01 Jul 2003 02:17:22 am    Post subject:

To add a blinking cursor add these two lines inside the loop:

Text(A,B,sub(" -",Ø+(Ø>0),1
Ø+1-2Ø(Ø>5->Ø //change the 5 to something bigger to slow down blinking


Last edited by Guest on 01 Jul 2003 03:22:16 pm; edited 1 time in total
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 01 Jul 2003 02:50:56 pm    Post subject:

plz edit the "not equal to" signs so we can all read it.
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 01 Jul 2003 03:21:03 pm    Post subject:

I didn't use any, I always try to use the characters most similar to those on the calc, therefor I actually spend time to find out how to type the Ø (hold SHIFT, Right ALT and L) since I knew it could be typed.

Besides that one, there's the >, which is the > and the -> which is the -> (store button) it almost makes sense. Neutral


Last edited by Guest on 01 Jul 2003 03:23:36 pm; edited 1 time in total
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 01 Jul 2003 04:19:35 pm    Post subject:

oh, so, the not equal to character represents the theta variable.

Last edited by Guest on 01 Jul 2003 04:22:53 pm; edited 1 time in total
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 01 Jul 2003 04:37:56 pm    Post subject:

No, well yes, the not equal to character that ti-connect uses is used by me for what it actually is, the theta character.
Back to top
Jeffrey


Member


Joined: 12 Jun 2003
Posts: 212

Posted: 01 Jul 2003 06:00:37 pm    Post subject:

Is there any easy way to convert all of those symbols to meaningful characters besides a search and replace or manually doing it? Some special function in TI-Graph link?
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 02 Jul 2003 01:08:30 pm    Post subject:

not that i know of... there might be though!
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 02 Jul 2003 02:00:53 pm    Post subject:

Arcane Wizard wrote:
To add a blinking cursor add these two lines inside the loop:

Text(A,B,sub(" -",Ø+(Ø>0),1
Ø+1-2Ø(Ø>5->Ø //change the 5 to something bigger to slow down blinking

this wouldnt work. the cursor would just stay over the first character. A and B r fixed variables and do not change. this would work if B was updated and it just pasted the one character on the graphscreen

here is the final prgm with a cursor:

Code:
" ->Str1
DelVar CRepeat D=105
Repeat D
Text(A,B,Str1+sub("[3 spaces]-[2 spaces]",1+3(F>0),3
F+1-2F(F>5->F
getKey->D
End
Text(A,B,Str1+"[3 spaces]
If D<>105
Then
If D<>45 and C<E and D<105 and D>40
Then
Str1+sub("ABC:[6 spaces]DEFGH[5 spaces]IJKLM[5 spaces]NOPQR[5 spaces]STUVW[5 spaces]XYZ()[7 spaces].?",D-40,1->Str1
C+1->C
End
If D=45 and C>0
Then
sub(Str1,1,length(str1)-1->Str1
C-1->C
End
End
End
sub(Str1,2,length(Str1)-1->Str1


Total size: 274 bytes

special keys:
[VARS] = :
[0] = [space]
[.] = . (period)
[(-)] = ?
[3] = (
[+] = )

also, it will give a domain error if it goes off of the screen. use E to prevent this (23 if B=0)


Last edited by Guest on 02 Jul 2003 08:01:52 pm; edited 1 time in total
Back to top
Spyderbyte


Advanced Member


Joined: 29 May 2003
Posts: 372

Posted: 02 Jul 2003 02:16:22 pm    Post subject:

Just out of curiousity, are these all of the weird symbols?



This pastes to become:


Code:
ü   ->      
ø   ><
ù   >=
÷   <=
ð(  sqrt(
ë   e
Á   (theta) or ø
Ä   (pi)
ñ   ^-1
Ü   ^2 or ²
Ó   ^3 or ³
Óð( cbrt(
Íð  xrt(
ý^( 10^(
õ   r
ö   T
Ð   []
Ñ   +
Ò   .


Are there any that are missing?

Spyderbyte


Last edited by Guest on 02 Jul 2003 02:18:29 pm; edited 1 time in total
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 02 Jul 2003 02:20:18 pm    Post subject:

Well, it works. A and B have nothing to do with changing the cursor.

Mind you I used A and B without being sure if that are the variables used to display the newly typed character, well, that's what you get when you have to work with uncommented code.

So it might be displayed at the wrong place, if you used it with your codebut it would blink none the same. And I thought I had posted my code for graphscreen input but that must have been a different thread.


Last edited by Guest on 02 Jul 2003 02:25:06 pm; edited 1 time in total
Back to top
yugniht


Member


Joined: 29 May 2003
Posts: 167

Posted: 02 Jul 2003 04:55:49 pm    Post subject:

I haven't read the previous, just the first post. So, I thought I'd just copy and paste something from my site:
Quote:
If you need the user to enter something on the graph screen, instead of using getkey with a bunch of If K=92:Text(Y,X,"Y"):If K=93:Text(Y,X,"Z"), you can make a really long string where every letter is in the corresponding place of its getkey. For example the letter Y would be in the 92nd place in the string. You could just type the long string in and store your input to str0, for example. Here is how the code could look:

" "->Str0
0
Repeat Getkey
End
sub("your long string here",Ans,1)
If Ansø" "
Str0+Ans->Str0 (Here, Str0 is where your text is stored
Text(Y,X,Str0)

(NOTE: ø means "not equal to") If the input is a number and you need to store it to a variable, use this:

expr(sub(str0,2,length(str0)-1)->A (or whatever variable)

These two methods are really fast and you can just use a Repeat or While loop to make it keep going, lets say, until the user has entered 4 characters or pressed "enter." Although it may be long, the string that is, it is the fastest way to input something on the graph screen.  Also, if you don't want the user to press a certain button, for example you want them to enter numbers only, just put a space in the long string for every getkey place that isn't a number.  *
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 02 Jul 2003 08:00:09 pm    Post subject:

in short, that is all mine is. ecept that mine has a backspace function.
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 14 Jul 2003 03:14:52 pm    Post subject:

JBirk, back at the cirrus site (topic was "GetKey" i think) u said u were going to make a prgm that would return when two keys were pressed in this format (the example simulated uparrow and right arrow):
26.25

what is the progress on this prgm?
when will it be done?
how can i get a copy?
Back to top
Display posts from previous:   
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
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement