Jump to content



Photo
- - - - -

Help Basic


  • Please log in to reply
28 replies to this topic

#1 TheKingChaos

TheKingChaos

    Casio Fan

  • Members
  • PipPip
  • 30 posts
  • Location:Stgo de Chile

  • Calculators:
    Classpad 300

Posted 14 April 2004 - 04:27 AM

Hi .... I have a question of basic :banghead: .... I need to know the codes to programme the keys of the classpad ... or .. what I need is to work with photos ... that on having pressed certain key leaves a photo, for example ... I have two photos pict1 and pict2, which I want is that when the key presses 8 the classpad shows her(it) to myself pict1 and if presses 9 that it(he,she) goes out her(it) pict2 He(She)

understands himself(herself)? :( .-... I sit it but I am occupying a translator ... Hi would be grateful very much for his(its) help thank you

My English one is very bad :blah: :cry:

I might write the code please? Following(Continuing) the example

please please

#2 Overlord

Overlord

    Casio Technician

  • Moderator
  • PipPipPipPipPipPip
  • 355 posts
  • Gender:Male
  • Location:Brussels - Belgium
  • Interests:Math Researcher

  • Calculators:
    My head - C300 OS 3.00 - G100 Rom 1.02 - G65 - G60 - G25

Posted 14 April 2004 - 07:15 AM

codes of the keys :
[0, 1, 2, ..., 9] -> [48, 49, 50, ..., 57]
[.] -> [46]
<span class=EXP' /> -> [147]
[+] -> [43]
[-] -> [45]
[*] -> [60944] (multiply)
[/] -> [47] (divide)
[=] -> [61]
[(, )] -> [40, 41]
[,] -> [44]
[x, y, z] -> [60856, 60857, 60858]
[^] -> [94]
<span class=EXE' /> -> [13]
[up, down, left, right] -> [28, 29, 30, 31]
[Keyboard] -> [144]
[Backspace] -> <span class=8' />
[ON/OFF] -> [145]
[Clear] -> [12]

example :

Do
Getkey t
LpWhile t<56 Or t>57
If t=56
Then
RclPict pict1
Else
RclPict pict2
IfEnd

#3 CrimsonCasio

CrimsonCasio

    UCF Ambassador

  • [Legends]
  • PipPipPipPipPipPipPipPipPipPip
  • 3579 posts
  • Gender:Male
  • Location:USA
  • Interests:Claculators, Stephen King, Video Games, Calculators, Programming, Calculators, Reading, Calculators... hmm, what else... Ah! Calculators!

  • Calculators:
    Algebra FX2.0, CFX 9850Ga+, Classpad 300

Posted 14 April 2004 - 08:23 AM

you might want to download and use the standard basic library from my site, it allows you to use these variables instead of numbers for key codes:

up= kUP
1= k1
9= k9
On/Off= kON
Keyboard= kKEYB
EXE= kEXE
etc...

#4 betoe

betoe

    UCF Spanish Translator

  • [Legends]
  • PipPipPipPipPipPipPip
  • 846 posts
  • Gender:Male
  • Location:Guadalajara/Mazatlan, Mexico.
  • Interests:Electronics, SW development, automotive. Swim->bike->run

  • Calculators:
    Algebra FX2.0 (R.I.P.), Classpad 300

Posted 14 April 2004 - 01:50 PM

TheKingChaos, if you feel unsure with your last post, post it again but in spanish, i think i can help you (at least with the translation :P).

#5 TheKingChaos

TheKingChaos

    Casio Fan

  • Members
  • PipPip
  • 30 posts
  • Location:Stgo de Chile

  • Calculators:
    Classpad 300

Posted 14 April 2004 - 02:16 PM

Thank you betoe - I will have it in one counts(tells) the close time .. overlord I catch on all my doubts thanks to all ... and crimsoncasio already unloaded tape-worm his(its) standard library :D :D :clap: :clap:

In one or two days they I will have another question .... my program is a bit rare(strange) and I am a beginner in programming later they will be able to see it

Again ...-thank you :bow: :bow:

#6 TheKingChaos

TheKingChaos

    Casio Fan

  • Members
  • PipPip
  • 30 posts
  • Location:Stgo de Chile

  • Calculators:
    Classpad 300

Posted 14 April 2004 - 03:38 PM

Other one asks .. since I can alternate between(among) the picts ... for example .. to press 7 and 8 repeatedly and that the photos change ... on the second photo having done it it(she) remains superimposed with the 1 - ... since I can do in order that bottom(fund) does not stay any on the screen of graphs? Already I tried in the configuration but it does not work .... the idea is to change the photos with the keys but without any interruption ... if I place a white bottom(fund) it(he,she) does not serve. One sees badly on having happened of a photo to other one ... help me if? :profanity: :profanity:

#7 CrimsonCasio

CrimsonCasio

    UCF Ambassador

  • [Legends]
  • PipPipPipPipPipPipPipPipPipPip
  • 3579 posts
  • Gender:Male
  • Location:USA
  • Interests:Claculators, Stephen King, Video Games, Calculators, Programming, Calculators, Reading, Calculators... hmm, what else... Ah! Calculators!

  • Calculators:
    Algebra FX2.0, CFX 9850Ga+, Classpad 300

Posted 14 April 2004 - 06:07 PM

use this program, it should work just like you want: (the pictures must be called pict1 ~ pict9)

Local k,pict,num
SetBG Off
SetAxes Off
SetDispGCon Off
SetCoord Off
SetGrid Off
SetLabel Off
Cls
Lbl show
Do
GetKey k
LpWhile k<k1 or k>k9
Cls
k-(k1-1)=>num
ExpToStr num,num
StrJoin "pict",num,pict
isdef(pict)
If RTN=1
Then
RclPict #pict
Else
Print "Picture does not exist"
IfEnd
Goto show


#8 TheKingChaos

TheKingChaos

    Casio Fan

  • Members
  • PipPip
  • 30 posts
  • Location:Stgo de Chile

  • Calculators:
    Classpad 300

Posted 15 April 2004 - 10:39 PM

Thank you CrimsonCasio but it is not what I want to do really ... him dare the real example..

I have 20 photos that are a sequence .... I want to press the key 0 and to advance for the fotos and to press 1 to move back ... my code is very long and with mistakes ... I wait could help ... the standard basic library me does not work very well .... it does not recognize me any expressions .... because of it that me was not working your previous example ... to seeing if it(he,she) can do the code to me without the bookshop standar. - thank you-

#9 CrimsonCasio

CrimsonCasio

    UCF Ambassador

  • [Legends]
  • PipPipPipPipPipPipPipPipPipPip
  • 3579 posts
  • Gender:Male
  • Location:USA
  • Interests:Claculators, Stephen King, Video Games, Calculators, Programming, Calculators, Reading, Calculators... hmm, what else... Ah! Calculators!

  • Calculators:
    Algebra FX2.0, CFX 9850Ga+, Classpad 300

Posted 15 April 2004 - 10:58 PM

you may not have the library installed correctly, that should work. however, i see what you want now, try this code instead (i've omitted the library commands)

this assumes that your pictures are named pict1~pict20
Local k,pict,num
SetBG Off
SetAxes Off
SetDispGCon Off
SetCoord Off
SetGrid Off
SetLabel Off
Cls
1=>num
RclPict pict1
Lbl show
Do
GetKey k
LpWhile k<49 or k>50
Cls
If k=49
Then
num+1=>num
Else
num-1=>num
IfEnd
ExpToStr num,tmp
StrJoin "pict",tmp,pict
RclPict #pict
Goto show

this lets you use any names you want:
Local k,pict,num,plist
{"pict1","pict2"}=>plist (fill this list wth the names of your pictures in the order you want them displayed)
SetBG Off
SetAxes Off
SetDispGCon Off
SetCoord Off
SetGrid Off
SetLabel Off
Cls
1=>num
plist[num]=>pict
RclPict #pict
Lbl show
Do
GetKey k
LpWhile k<49 or k>50
Cls
If k=49
Then
If num=dim(plist)
Then
1=>num
Else
num+1=>num
IfEnd
Else
If num=1
Then
dim(plist)=>num
Else
num-1=>num
IfEnd
IfEnd
plist[num]=>pict
RclPict #pict
Goto show

this second example is more stable but requires a little more work as you must fill plist with the names of your pictures. it can however prevent you from trying to look at pictures above the total amout and below 1, instead jumping to the oppisite end of the list.

#10 TheKingChaos

TheKingChaos

    Casio Fan

  • Members
  • PipPip
  • 30 posts
  • Location:Stgo de Chile

  • Calculators:
    Classpad 300

Posted 15 April 2004 - 11:02 PM

You are a very rapid CrimsonCasio ... thank you .... I will prove(try) it and will warn him if it works .... thank you again..

#11 TheKingChaos

TheKingChaos

    Casio Fan

  • Members
  • PipPip
  • 30 posts
  • Location:Stgo de Chile

  • Calculators:
    Classpad 300

Posted 16 April 2004 - 12:09 AM

Thank you :nod: :nod: ... the second code was just what I needed :roflol:
..... Probably tomorrow have another question .. always related with fotos. - .. I am making something rare

#12 CrimsonCasio

CrimsonCasio

    UCF Ambassador

  • [Legends]
  • PipPipPipPipPipPipPipPipPipPip
  • 3579 posts
  • Gender:Male
  • Location:USA
  • Interests:Claculators, Stephen King, Video Games, Calculators, Programming, Calculators, Reading, Calculators... hmm, what else... Ah! Calculators!

  • Calculators:
    Algebra FX2.0, CFX 9850Ga+, Classpad 300

Posted 16 April 2004 - 02:27 AM

:) your welcome.
can you tell us what your working on?

#13 TheKingChaos

TheKingChaos

    Casio Fan

  • Members
  • PipPip
  • 30 posts
  • Location:Stgo de Chile

  • Calculators:
    Classpad 300

Posted 18 April 2004 - 02:58 PM

I need one more thing ... and estara almost ready(clever)...

I wish now that the cp chooses images at random .... I explain .... I have 20 picts ..... pict1 .. pict2 .. ect ... I need that when the key presses 1 the cp chooses at random the images .... mas exact a group of images .... for example ... if apreto 1 that aparesca of her(it) pict1 to the pict 6 .... or of the pict 7 to the pict 13 ... or of the pict 14 to her(it) pict20

Slightly this way ..... with regard to the code of before ... of post of before .... I need also that on having moved back not aparesca the pict finalizes..

#14 betoe

betoe

    UCF Spanish Translator

  • [Legends]
  • PipPipPipPipPipPipPip
  • 846 posts
  • Gender:Male
  • Location:Guadalajara/Mazatlan, Mexico.
  • Interests:Electronics, SW development, automotive. Swim->bike->run

  • Calculators:
    Algebra FX2.0 (R.I.P.), Classpad 300

Posted 18 April 2004 - 03:28 PM

I will correct some things on the translation:

I need one more thing ... and it will be ready soon...

I wish now that the cp chooses images at random .... I explain .... I have 20 picts ..... pict1 .. pict2 .. ect ... I need that when the key presses 1 the cp chooses at random the images .... more exactly a group of images .... for example ... if i push 1 that appear of it pict1 to the pict 6 .... or of the pict 7 next the pict 13 ... or of the pict 14 to pict20

Slightly this way ..... with regard to the code of before ... of post of before .... I need also that on having moved back not appear the pict finalizes..


Well he need a random code for put images. The random command give you numbers between 0 and 1, you can put a switch~case for put an image depending the value of the random. But there must be a better way, wait for more posts :).

#15 CrimsonCasio

CrimsonCasio

    UCF Ambassador

  • [Legends]
  • PipPipPipPipPipPipPipPipPipPip
  • 3579 posts
  • Gender:Male
  • Location:USA
  • Interests:Claculators, Stephen King, Video Games, Calculators, Programming, Calculators, Reading, Calculators... hmm, what else... Ah! Calculators!

  • Calculators:
    Algebra FX2.0, CFX 9850Ga+, Classpad 300

Posted 18 April 2004 - 07:21 PM

hmm, thanks for clearing it up betoe, but im still not sure what is needed... as i understand it he wants:

- randomly chosen groups of images in groups of 6.

i dont understand this:
"Slightly this way ..... with regard to the code of before ... of post of before .... I need also that on having moved back not appear the pict finalizes.. "

can you clarify?

#16 TheKingChaos

TheKingChaos

    Casio Fan

  • Members
  • PipPip
  • 30 posts
  • Location:Stgo de Chile

  • Calculators:
    Classpad 300

Posted 18 April 2004 - 07:48 PM

I am ordained.....
1 - asks . .... the code of the photos of more up ... the one that has plist ... his code is perfect but on having moved back in the first photo the last one goes out for me - .. I do not want it ... on having moved back in the first photo I want that it remain still ... the same thing for the last photo ... on having advanced the last photo the first one goes out.

2 - asks ... I need that the classpad chooses random photos ..... I have a group of photos .. 3 groups----.y when the key presses 0 that the classpad chooses random a group ... that is at random ... type artificial intelligence .. it..

#17 CrimsonCasio

CrimsonCasio

    UCF Ambassador

  • [Legends]
  • PipPipPipPipPipPipPipPipPipPip
  • 3579 posts
  • Gender:Male
  • Location:USA
  • Interests:Claculators, Stephen King, Video Games, Calculators, Programming, Calculators, Reading, Calculators... hmm, what else... Ah! Calculators!

  • Calculators:
    Algebra FX2.0, CFX 9850Ga+, Classpad 300

Posted 18 April 2004 - 08:21 PM

ok, so you dont want it to clear the last picture... I suppose you want to do something like CasPaints layering effect. try this code and tell me if it works like you want:

Local k,pict,num,plist,group,glist
{"pict1","pict2","pict3","pict4","pict5","pict6","pict7","pict8","pict9","pict11","pict12","pict13","pict14","pict15","pict16","pict17","pict18","pict19","pict20"}=>plist
{6,13,20}=>glist
SetBG Off
SetAxes Off
SetDispGCon Off
SetCoord Off
SetGrid Off
SetLabel Off
Lbl show
Cls
rand(1,3)=>group
for ((group-1)*6)+group=>num To glist[group]
plist[num]=>pict
RclPict #pict
Next
Do
GetKey k
LpWhile k=49
Goto show


#18 TheKingChaos

TheKingChaos

    Casio Fan

  • Members
  • PipPip
  • 30 posts
  • Location:Stgo de Chile

  • Calculators:
    Classpad 300

Posted 18 April 2004 - 09:32 PM

Thank you very much crim .... with this I will be able to finish my program ... it works as I want .......

Only I ask for one more things him
Look at this that ud did

Local k,pict,num,plist
{"pict1","pict2"}=>plist (fill this list wth the names of your pictures in the order you want them displayed)
SetBG Off
SetAxes Off
SetDispGCon Off
SetCoord Off
SetGrid Off
SetLabel Off
Cls
1=>num
plist[num]=>pict
RclPict #pict
Lbl show
Do
GetKey k
LpWhile k<49 or k>50
Cls
If k=49
Then
If num=dim(plist)
Then
1=>num
Else
num+1=>num
IfEnd
Else
If num=1
Then
dim(plist)=>num
Else
num-1=>num
IfEnd
IfEnd
plist[num]=>pict
RclPict #pict
Goto show

The problem is that on having moved back it pict1 it jumps to the last pict .... of the same form - on having advanced the last pict, it appears pict1 .... there bothers it in my program...

I would wish having moved back it pict1 to remain still ...... and on having advanced the last pict that also remains there....

#19 CrimsonCasio

CrimsonCasio

    UCF Ambassador

  • [Legends]
  • PipPipPipPipPipPipPipPipPipPip
  • 3579 posts
  • Gender:Male
  • Location:USA
  • Interests:Claculators, Stephen King, Video Games, Calculators, Programming, Calculators, Reading, Calculators... hmm, what else... Ah! Calculators!

  • Calculators:
    Algebra FX2.0, CFX 9850Ga+, Classpad 300

Posted 18 April 2004 - 11:51 PM

here, try this:
Local k,pict,num,plist
{"pict1","pict2"}=>plist (fill this list wth the names of your pictures in the order you want them displayed)
SetBG Off
SetAxes Off
SetDispGCon Off
SetCoord Off
SetGrid Off
SetLabel Off
Cls
1=>num
plist[num]=>pict
RclPict #pict
Lbl show
Do
GetKey k
LpWhile k<49 or k>50
Cls
If k=49 and num<>dim(plist)
Then
num+1=>num
ElseIf num<>1
Then
num-1=>num
IfEnd
plist[num]=>pict
RclPict #pict
Goto show


#20 TheKingChaos

TheKingChaos

    Casio Fan

  • Members
  • PipPip
  • 30 posts
  • Location:Stgo de Chile

  • Calculators:
    Classpad 300

Posted 26 April 2004 - 03:13 PM

Hello again...

The problem is that I have the code of this form ... for example..

Local k,pict,num,plist,group,glist
{"pict1","pict2","pict3","pict4","pict5","pict6","pict7","pict8","pict9","pict11","pict12","pict13","pict14","pict15","pict16","pict17","pict18","pict19","pict20"}=>plist
{6,13,20}=>glist
SetBG Off
SetAxes Off
SetDispGCon Off
SetCoord Off
SetGrid Off
SetLabel Off
Lbl show
Cls
rand(1,3)=>group
for ((group-1)*6)+group=>num To glist[group]
plist[num]=>pict
RclPict #pict
Next
Do
GetKey k
LpWhile k=49
Goto show

What I need is that if group=1 three times then I later could write another instruction

Since I write this?

#21 CrimsonCasio

CrimsonCasio

    UCF Ambassador

  • [Legends]
  • PipPipPipPipPipPipPipPipPipPip
  • 3579 posts
  • Gender:Male
  • Location:USA
  • Interests:Claculators, Stephen King, Video Games, Calculators, Programming, Calculators, Reading, Calculators... hmm, what else... Ah! Calculators!

  • Calculators:
    Algebra FX2.0, CFX 9850Ga+, Classpad 300

Posted 26 April 2004 - 03:44 PM

umm... im not sure what you mean... :(

#22 TheKingChaos

TheKingChaos

    Casio Fan

  • Members
  • PipPip
  • 30 posts
  • Location:Stgo de Chile

  • Calculators:
    Classpad 300

Posted 26 April 2004 - 05:16 PM

I have this code ...... in it one sees that group can be 1 or 2 for the random .... certain? ... the code repeats itself always for the commands Lbl and Goto

Then when group the value has 1 three times ... I want to execute another command,

The real example is like that:

I am doing a game of you fight, then there is a random that it designates if the blow comes to the opponent or is covered .... if it strikes it, I it have 1 assigned to group in the random of value ... I want to achieve that if it strikes it three times then it works out winning ......


If you do not deal crimson I might order him(her) my program for MSN in order that I understand clearly what I want ......
And if it is possible. I might help to dwarfing the code and to make it more understandable..

I would be grateful for it to you very much...

#23 CrimsonCasio

CrimsonCasio

    UCF Ambassador

  • [Legends]
  • PipPipPipPipPipPipPipPipPipPip
  • 3579 posts
  • Gender:Male
  • Location:USA
  • Interests:Claculators, Stephen King, Video Games, Calculators, Programming, Calculators, Reading, Calculators... hmm, what else... Ah! Calculators!

  • Calculators:
    Algebra FX2.0, CFX 9850Ga+, Classpad 300

Posted 26 April 2004 - 08:34 PM

ok... i think i see. try this:

Local k,pict,num,plist,group,glist,glast,gcount
{"pict1","pict2","pict3","pict4","pict5","pict6","pict7","pict8","pict9","pict11","pict12","pict13","pict14","pict15","pict16","pict17","pict18","pict19","pict20"}=>plist
{6,13,20}=>glist
0=>gcount
0=>glast
SetBG Off
SetAxes Off
SetDispGCon Off
SetCoord Off
SetGrid Off
SetLabel Off
Lbl show
Cls
rand(1,3)=>group
If glast=group
Then
gcount+1=>gcount
if gcount=3
Then
goto exit
IfEnd
Else
group=>glast
0=>gcount
IfEnd
for ((group-1)*6)+group=>num To glist[group]
plist[num]=>pict
RclPict #pict
Next
Do
GetKey k
LpWhile k=49
Goto show
Lbl exit
'code here


#24 TheKingChaos

TheKingChaos

    Casio Fan

  • Members
  • PipPip
  • 30 posts
  • Location:Stgo de Chile

  • Calculators:
    Classpad 300

Posted 26 April 2004 - 10:56 PM

I me do not work his your code... :(

I write to him better my code ... actually it is this

SetBG p4
Cls
Pause
Local k,pict,num,plist,group,glist
{"p5","p6","p7","p15","p15","p15","p16","p16","p17","p18","p19","p20","p22","p22","p23","p24","p25","p26","p4","p5","p6","p7","p101","p102","p102","p102","p103","p103","p104","p105","p106","p24","p25","p26","p4"}=>plist
{19,35}=>glist
Cls
SetBG p2
Cls
Wait 1
SetBG p3
Cls
Wait 1
SetBG p4
Cls
Lbl show
Do
GetKey k
LpWhile k<8
If k=52
Then
rand(1,2)=>group
For ((group-1)*18)+group=>num To glist[group]
plist[num]=>pict
SetBG #pict
Cls
Next
IfEnd
Goto show

The picts of punch are of her p5 up to her p19 and them of covering punch from her p20 up to her p4 ... what I want is ... if it gives 3 punch that goes out another sequence separates .. does he understand me?

My game consists of the fact that if you strike the opponent three times at the time you win, in the sequence of covering punch the opponent covers ... I want to place the sequence of victory later that him of three punches

#25 CrimsonCasio

CrimsonCasio

    UCF Ambassador

  • [Legends]
  • PipPipPipPipPipPipPipPipPipPip
  • 3579 posts
  • Gender:Male
  • Location:USA
  • Interests:Claculators, Stephen King, Video Games, Calculators, Programming, Calculators, Reading, Calculators... hmm, what else... Ah! Calculators!

  • Calculators:
    Algebra FX2.0, CFX 9850Ga+, Classpad 300

Posted 26 April 2004 - 11:21 PM

hmm, im still not sure what you want... :(

#26 TheKingChaos

TheKingChaos

    Casio Fan

  • Members
  • PipPip
  • 30 posts
  • Location:Stgo de Chile

  • Calculators:
    Classpad 300

Posted 27 April 2004 - 01:35 AM

I it will write step along step
In my code ... it goes out
plist: two sequences of photos, one at one stroke towards the opponent and other one in which the opponent covers,

Blow: "p5", "p6", "p7", "p15", "p15", "p15", "p16", "p16", "p17", "p18", "p19"

Annulled blow: "p20", "p22", "p22", "p23", "p24", "p25", "p26", "p4", "p5", "p6", "p7", "p101", "p102", "p102", "p102", "p103", "p103", "p104", "p105", "p106", "p24", "p25", "p26", "p4"

If you press the key 4 at the time the cp chooses between the blow and to cover the blow, which I want is that if the blow comes to him three times then I could write another sequence

What I cannot do, is that the cp detects when 3 blows come to the opponent


:cry: :cry: :crazy: :crazy: :banghead: :banghead:

#27 betoe

betoe

    UCF Spanish Translator

  • [Legends]
  • PipPipPipPipPipPipPip
  • 846 posts
  • Gender:Male
  • Location:Guadalajara/Mazatlan, Mexico.
  • Interests:Electronics, SW development, automotive. Swim->bike->run

  • Calculators:
    Algebra FX2.0 (R.I.P.), Classpad 300

Posted 27 April 2004 - 02:10 AM

If you dont understand the last post, TheKingChaos want to know when a guy in the game receive 3 hits (or blows) from the opponent.

#28 TheKingChaos

TheKingChaos

    Casio Fan

  • Members
  • PipPip
  • 30 posts
  • Location:Stgo de Chile

  • Calculators:
    Classpad 300

Posted 27 April 2004 - 02:36 AM

Already I achieved it---thanks to all :roflol: :roflol: :clap: :clap:

#29 CrimsonCasio

CrimsonCasio

    UCF Ambassador

  • [Legends]
  • PipPipPipPipPipPipPipPipPipPip
  • 3579 posts
  • Gender:Male
  • Location:USA
  • Interests:Claculators, Stephen King, Video Games, Calculators, Programming, Calculators, Reading, Calculators... hmm, what else... Ah! Calculators!

  • Calculators:
    Algebra FX2.0, CFX 9850Ga+, Classpad 300

Posted 27 April 2004 - 06:41 AM

oh... ok :)
grats ;)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users