Page 1 of 1

PostPosted: Mon Dec 03, 2001 2:16 pm
by rantman
Does anybody know how i would go about assigning a sound (i.e. tone(440, 440) to each hardware button on the palm pilot in pocketC

------------------------
http://www.geocities.com/rant_manca
visit for some humorous rants.

PostPosted: Mon Dec 03, 2001 3:37 pm
by degv
You will obviously use hookhard to grab the user pressing the key and then read the input. You can have whatever happen that you like when the user presses the key.
For example here is a snippet from a program I wrote....

hookhard(1);
e=event(1); // wait for an event

if(e == 5){y=y + 30;
if (y>60){y=60;}
}
else if(e == 6){y=y - 30;
if (y<-300){y=-300;}
}



I'm modifying my y variable when the user presses the key. You could easily substitue a tone command in place of my change to the y variable.

I hope this helps,

David