Alternative to keyboardPress( key.VK_1, key.VK_ALT ); ?
Forum rules
This is a sub-forum for things specific to MicroMacro.
This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
This is a sub-forum for things specific to MicroMacro.
This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
Alternative to keyboardPress( key.VK_1, key.VK_ALT ); ?
Hey Guys...
i get stuck at the point when i want my script to press two keys at the same time.
keyboardPress( key.VK_1, key.VK_LSHIFT ); for example doesnt work for me.
it seems that he only recognizes the "1".
what other possibilities are there to send a two-key-command to the game?
i also tried keyboardHold with both keys and released them. no effect, only the "1" was send.
i get stuck at the point when i want my script to press two keys at the same time.
keyboardPress( key.VK_1, key.VK_LSHIFT ); for example doesnt work for me.
it seems that he only recognizes the "1".
what other possibilities are there to send a two-key-command to the game?
i also tried keyboardHold with both keys and released them. no effect, only the "1" was send.
- Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Alternative to keyboardPress( key.VK_1, key.VK_ALT ); ?
This usually works:
But, it may or may not work for specific games in attached mode. Did you call attach() or attachKeyboard()? Have you called keyboardSetDelay() to try increasing the delay to 100ms or so?
Code: Select all
keyboardHold(key.VK_SHIFT);
keyboardPress(key.VK_1);
keyboardRelease(key.VK_SHIFT);
Re: Alternative to keyboardPress( key.VK_1, key.VK_ALT ); ?
i called attach() and keyboardSetDelay(100).Administrator wrote:This usually works:But, it may or may not work for specific games in attached mode. Did you call attach() or attachKeyboard()? Have you called keyboardSetDelay() to try increasing the delay to 100ms or so?Code: Select all
keyboardHold(key.VK_SHIFT); keyboardPress(key.VK_1); keyboardRelease(key.VK_SHIFT);
- Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Alternative to keyboardPress( key.VK_1, key.VK_ALT ); ?
Try running it in detached mode to see if it works then.
Re: Alternative to keyboardPress( key.VK_1, key.VK_ALT ); ?
doesnt work either... what now? :/Administrator wrote:Try running it in detached mode to see if it works then.
- Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Alternative to keyboardPress( key.VK_1, key.VK_ALT ); ?
I don't know. Every game is programmed differently, so it's hard to write one set of code that works for everything. What game is this even for?
Re: Alternative to keyboardPress( key.VK_1, key.VK_ALT ); ?
Isn't it worth mentioning that you have to have an up to date micromacro because in some older versions the modifier didn't work? Or was that just for Runes of Magic?
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
- Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Alternative to keyboardPress( key.VK_1, key.VK_ALT ); ?
Could be anything, really. The code for handling key modifiers was changed many times, including several fixes and a few times it was broken.
Re: Alternative to keyboardPress( key.VK_1, key.VK_ALT ); ?
Given these limitations... is it even possible to type a capitol letter without being able to hold shift down?
- Administrator
- Site Admin
- Posts: 5313
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Alternative to keyboardPress( key.VK_1, key.VK_ALT ); ?
Yes and no. Yes, it is possible to send a character itself. However, rarely does this actually work beyond text editors. Games tend to use DirectInput, which goes by key events and not character events, meaning it wouldn't work.
For this reason, it is recommended you first try using SHIFT as the key modifier, and then try using keyHold and keyRelease prior and after the keyPress for the character you want.
For this reason, it is recommended you first try using SHIFT as the key modifier, and then try using keyHold and keyRelease prior and after the keyPress for the character you want.
Re: Alternative to keyboardPress( key.VK_1, key.VK_ALT ); ?
I'm trying to have micromacro input a secondary password for Runes of Magic. The secondary password has one upper case letter. I tried keyboardHold/keyboardRelease(key.VK_SHIFT) and keyboardPress( key.VK_V, key.VK_SHIFT ) but nothing works. It seems only one key can be pressed at a time.
Who is online
Users browsing this forum: No registered users and 1 guest