Skip to content

v0.3.5

Compare
Choose a tag to compare
@esotericpig esotericpig released this 29 Mar 15:41
· 35 commits to master since this release

Changed

  • botbuddy.BotBuddy
    • Added:
      • type(int x,int y,int keyCode)
      • type(String text), type(int x,int y,String text)
        • This will type each char (code point) in text using KeyCodes. If the char's key code doesn't exist, then it uses paste(...) for the char instead.
      • typeUnsurely(String text), typeUnsurely(int x,int y,String text)
        • This is the same as type(...), except that if the char's key code doesn't exist, it will not use paste(...) and instead try to look up the char using KeyEvent (which usually doesn't work).
  • botbuddy.BotBuddyCode
    • Changed type Instruction to use new type(...) overloads (when possible)
    • Added typeunsurely Instruction

Added

  • botbuddy.KeyCodes
    • Various methods for converting a char (code point) to a KeyEvent.VK_ virtual key code.
    • getCharCodes(int keyChar)
    • getCharCodes(int keyChar,boolean getExKeyCode)
  • Chars
    • toString(int codePoint)

Notes

KeyCodes may or may not work with non-US keyboards at this time (plan on making it more generic in a future version).

For any chars that don't work, you can call putCharCodes(int keyChar,int[] keyCodes) with your own custom ones. For example:

KeyCodes.putCharCodes('$',new int[] {KeyEvent.VK_SHIFT,KeyEvent.VK_DOLLAR});