I guess i am not explaining myself correctly, sorry.
Say I have a UDT array that contains
Character
ImageID
Scan
Now I have a for loop that does the following (not real code)
1. Assigns each Character a letter from A - z ( CHR$(65 - 90) )
2. Assigns each ImageID a number from 1 to 26
3. Assigns each Scan the Scan code of the number.
TYPE ASCII
Character AS STRING
Code AS INTEGER
Image AS INTEGER
ENDTYPE
DIM keyboard(25) AS ASCII
FOR iTemp = 65 TO 90
keyboard(iTemp - 65).Character = CHR$(iTemp)
keyboard(iTemp - 65).Code = 0 ` Return SCANCODE
keyboard(iTemp - 65).Image = iTemp - 64
NEXT iTemp
The reason why I want to do this is because it is easier to use a lookup table like this then having 3 for statments to find out which key was press.
Example
Letter 'Q'
keyboard(17).Character = "Q"
keyboard(17).Code = 16 <-- this i cannot get programmatically
keyboard(17).ImageID = 18
If you can't understand or it cannot be done programmatically i will use 26 statements to do it.
Online Flash Games and Guides .::. http://www.gamestack.org
Online Notebook .::. http://onlinenotes.gamestack.org