How to Change Key Colors in RapidQ
I can't write code. Okay, I can write code, but then after I write it, it doesn't work, and I have trouble debugging it. So my ability to write code is a little like my ability to speak Chinese. I can speak Chinese, but when I do, hardly anybody can understand what I said.
This can be a problem.
How Our TouchScreen Works
When I first got the touchscreen computers, I did not really understand how the screen knew it had been touched. Well, not the screen, but the computer attached to the screen. Here were a few of my initial conjectures:
- light
- heat
- chemical reaction
It turns out it is none of the above in the case of the touchscreen Project Bow has been given. The answer is pressure. You press on the screen, and only by pressing on it can you let it know that you have touched a particular spot.
(This is unfortunate for us at Project Bow, because for our purposes, it would have been better if it had a light sensor. Then we could put the touchscreen behind the zoo glass, and Bow could control it without actually touching it.)
Anyway, the answer is pressure. But how is that pressure measured? Ours is a resistive touchscreen. It is made of two flexible sheets and a gap of air between them. When we touch one spot on the screen, contact is made between the two sheets, and this contact is measured in terms of electrical resistance.
But what if we touch two spots on the screen at the same time? We end up selecting a spot somewhere in between.
This design is good for cooperative users who always try to use a product the way it was intended. It is not so good for creative types like Bow, who like to explore every avenue of attack.
Somehow, we need to limit Bow to pressing a single key, so we can prove that his key use is selecting the words he spells.
Recently, I've had two touchscreen computers donated to Project Bow by two separate donors. This is good, because we need to find a way to show the world that Bow is literate. He can write.
In the past, we have been unable to prove this because:
- Bow is faster than we are.
- He spells out words faster than we can see
- If we don't see what he said, then communication does not take place.
- The only reason Bow spells is in order to communicate.
- Bow takes our hands and uses them as pointers, because otherwise we can't see what he says. He doesn't need our hands in order to point. He needs them as a way to direct our attention.
- The scientific community assumes that some sort of cuing from us is taking place, and Bow's communication is not his own.
- To solve this problem, we need a communication device that will allow Bow to spell at his own rate of speed and will sound out what he says so that we can communicate without seeing what he said.
So here we are with two computers that could be potentially harnessed to meet these needs. But in order to use them, we have to understand the limitations and obstacles that stand in our way.
Some of the technical challenges involved in implementing this project are:
- Bow must not be able to take apart the computer, destroy it or damage it -- a physical limitation.
- Bow must not be able to reprogram the computer -- a software problem with physical ramifications. Anyone can reset a computer by pressing all the keys, including control and function keys, in all possible combinations. Human adults don't do this, but chimpanzees are given to trial and error attacks at almost every system. Bow must be denied the rights of a superuser, at least until we can prove he's literate.
- the text-to-speech interpreter must operate in real time, or Bow will be discouraged from using it.
- the keys on the touchscreen should be so configured that Bow cannot access a third key by pressing on two keys at the same time.
- Bow should find the screen and its combination of keys sufficiently engaging to keep his attention.
- The keys must be big enough and far enough apart so that Bow's hand coordination will be sufficient to hit a single key at will.
RapidQ IDE (Integrated Development Environment)
RapidQ in the Wikipedia
Dim saystr as string Dim SV as QOLEObject SV.CreateObject("SAPI.SpVoice") saystr="hello, world" SV.speak(saystr)
The SAPI as explained by Wikipedia
The operating system we are using is Windows XP. The programming language is RapidQ. RapidQ is a Basic Interpreter which was developed by William Yu around the year two thousand. He allowed everyone to have it for free.
For some reason, RapidQ executables all work in Windows XP, but those that contain speech-to-text do not work on Vista.
The secret behind RapidQ is that it incorporates the applications that are already in the operating system into itself, so that the RapidQ code doesn't have to do much, except coordinate between already existing bits of code that are available to it.
In the demo program "Hello World" that I was given, for instance, none of the speech-to-text work is actually in the RapidQ program. The program merely sends a string to the SAPI speech application that comes built into the operating system.
Burkley's Bravado
- Burkley\'s Bravado
This website is dedicated mostly to RapidQ. Contents include: an introduction to RapidQ, RapidQ examples and RapidQ demos, RapidQ links, RapidQ IDEs, RapidQ Groups and RapidQ Forums, RapidQ FAQs, and RapidQ Source Codes.
I was given a fully operative touch screen speech-to-text executable written by volunteers, together with the RapidQ source code that created it. Because Bow does not know how to use the space bar, my volunteer programmers even included the special feature that the end of the string would be determined based on the length of time that elapses after the last key is pressed. That is, wait too long and whatever you type gets pronounced.
I've been asked not to share the RapidQ code for all that with you, so I will only be discussing the small bit of programming that has been left for me to do. What is it? Change the color of the keys.
That's laughable, right? There should be a property called color, and changing the color of a key should be easy. But for some reason it's not.
The current developer who is actively using RapidQ, someone called Burkley, has written a demo program to show how to make buttons have interesting colors. My mission? To learn how this is done and use this knowledge on the Project Bow text-to-speech touchscreen keyboard.
Button Color Demo by Burkley
I'm supposed to read the demo program linked above and figure out from it how to change the colors of the keys in Bow's keyboard. Bow does not seem to want to let me do this, as he creates all sorts of distractions if I try to work on this project. He doesn't seem to mind as much when I write hubs about less abstract subjects, like his own misbehavior. Right now he is sitting in the chair behind me and watching me type. I had to resort to this means of keeping him quiet. Otherwise, he was blowing raspberries and peeing in the potty every fifteen minutes.
From reading the comments, I've gathered that this is a way to pair two button colors, one for when the button that is being selected (by touch or by mouse hovering over the button) and one for when nobody is selecting the button.
Here are some of the questions in my mind as I read this:
- what if two buttons are being selected at once?
- how was the default color set?
- are the numbers for the colors just variables that stand for something else?
- there is reference to bitmaps, but bit maps ought to be binary numbers (usually displayed in hex) , and I don't see anything that looks like that in the code
I suppose the best way to find out is to try to incorporate some of this demo program into something else and see what it does. But Bow is blowing raspberries, and it's almost lunchtime, so I think I'll stop here for now.
I'll let you know if I make any further progress....