Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: WiLD on May 28, 2003, 01:07 AM

Title: Keyboard Commands?
Post by: WiLD on May 28, 2003, 01:07 AM
Hi all,

i was looking at a bot the other day it had a command that when you press "Esc" it closed it or whatever. I was wondering how this was done. If you could give some examples maybe.

Thx in advance.
Title: Re:Keyboard Commands?
Post by: Tazo on May 28, 2003, 05:17 AM
Add shortcut keys to menus
Title: Re:Keyboard Commands?
Post by: timbo on May 28, 2003, 07:34 AM
make a button
set the cancel property of the button = true (esc)
Title: Re:Keyboard Commands?
Post by: CrAz3D on May 28, 2003, 08:09 AM
using the keyascii properties is how some ppl do it.  The enter key is 13, so it'd be:
If keyascii=13 then
   Do all ur stuff
end if
Title: Re:Keyboard Commands?
Post by: ______ on May 28, 2003, 08:19 AM


If keyascii=27 then ' esc button
  unload me
  end
end if

unload


put this on form_keypress and so on
Title: Re:Keyboard Commands?
Post by: CrAz3D on May 28, 2003, 10:49 AM
I found a dandy little lister of the keyascii code
http://blizzside.com/crazed/Zips/keyascii.zip (http://blizzside.com/crazed/Zips/keyascii.zip)
It works quite well.
Title: Re:Keyboard Commands?
Post by: Skywing on May 28, 2003, 01:26 PM
Quote from: CrAz3D on May 28, 2003, 10:49 AM
I found a dandy little lister of the keyascii code
http://blizzside.com/crazed/Zips/keyascii.zip (http://blizzside.com/crazed/Zips/keyascii.zip)
It works quite well.
Visual Basic provides symbolic constants for many characters.  I'd strongly recommend using those if possible.

Under Win32, you can easily view how characters are mapped with the current charset by using charmap.exe, which can be installed along with Windows (you can add it from the CD using Add/Remove Windows Components if you didn't install it when you installed Windows).