Rule for keyboardHold and 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.
Rule for keyboardHold and key.VK_ALT
Hello,
I want to ask, when we do a multiclient, multiclient1 and multiclient2, multiclient1 have the function keyboardHold(key.VK_ALT), and then we switch to multiclient2, why the function keyboardHold(key.VK_ALT) dont work. If we go back to multiclient1 it works. I assume keyboardHold(key.VK_ALT) only work on active window. Is it true? Is there any way to make the function work in unactive window?
Thanks
I want to ask, when we do a multiclient, multiclient1 and multiclient2, multiclient1 have the function keyboardHold(key.VK_ALT), and then we switch to multiclient2, why the function keyboardHold(key.VK_ALT) dont work. If we go back to multiclient1 it works. I assume keyboardHold(key.VK_ALT) only work on active window. Is it true? Is there any way to make the function work in unactive window?
Thanks
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Rule for keyboardHold and key.VK_ALT
You send it as the modifier to a key press.
Code: Select all
keyboardPress(key.VK_SOMETHING, key.VK_ALT);
Re: Rule for keyboardHold and key.VK_ALT
I try keyboardPress(key.VK_1, key.VK_ALT);
and keyboardPress(key.VK_ALT, key.VK_1);
the error is the same.
182: Wrong number of parameters supplied to keyboardPress().
this is my code before
--keyboardHold(key.VK_ALT); -- The A key will be held down
--yrest(50);
--keyboardPress(key.VK_1);
--yrest(50);
--keyboardRelease(key.VK_ALT); -- The A key is now released
--keyboardBufferClear();
and keyboardPress(key.VK_ALT, key.VK_1);
the error is the same.
182: Wrong number of parameters supplied to keyboardPress().
this is my code before
--keyboardHold(key.VK_ALT); -- The A key will be held down
--yrest(50);
--keyboardPress(key.VK_1);
--yrest(50);
--keyboardRelease(key.VK_ALT); -- The A key is now released
--keyboardBufferClear();
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Rule for keyboardHold and key.VK_ALT
You're using an outdated version, then. Redownload.
Re: Rule for keyboardHold and key.VK_ALT
Now I use micromacro v.1.0
It didnt work.
I have try
---------------
keyboardPress(key.VK_1, key.VK_ALT);
---------------
keyboardSetDelay(100);
keyboardPress( key.VK_V, key.VK_CTRL );
--In my game (Perfect World), it only write v on chat box, I already copy "0" so it must paste "0"
---------------
Is there any clue?
Thanks
It didnt work.
I have try
---------------
keyboardPress(key.VK_1, key.VK_ALT);
---------------
keyboardSetDelay(100);
keyboardPress( key.VK_V, key.VK_CTRL );
--In my game (Perfect World), it only write v on chat box, I already copy "0" so it must paste "0"
---------------
Is there any clue?
Thanks
Re: Rule for keyboardHold and key.VK_ALT
I have try
---------------
keyboardPress(key.VK_ALT, key.VK_1);
---------------
keyboardPress(key.VK_1, key.VK_ALT);
---------------
keyboardSetDelay(100);
keyboardPress( key.VK_V, key.VK_CTRL );
--Still write "v"
---------------
---------------
keyboardPress(key.VK_ALT, key.VK_1);
---------------
keyboardPress(key.VK_1, key.VK_ALT);
---------------
keyboardSetDelay(100);
keyboardPress( key.VK_V, key.VK_CTRL );
--Still write "v"
---------------
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Rule for keyboardHold and key.VK_ALT
Code: Select all
keyboardPress(key.VK_V, key.VK_CONTROL)
Re: Rule for keyboardHold and key.VK_ALT
keyboardPress(key.VK_V, key.VK_CONTROL); --This work but
keyboardPress(key.VK_V, key.VK_ALT) -- dont work
keyboardPress(key.VK_V, key.VK_LALT) -- dont work
keyboardPress(key.VK_V, key.VK_RALT) -- dont work
so the function keyboardHold is active on active window only and not active on multiclient that unactive?
Is that right?
keyboardPress(key.VK_V, key.VK_ALT) -- dont work
keyboardPress(key.VK_V, key.VK_LALT) -- dont work
keyboardPress(key.VK_V, key.VK_RALT) -- dont work
so the function keyboardHold is active on active window only and not active on multiclient that unactive?
Is that right?
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Rule for keyboardHold and key.VK_ALT
keyboardHold() works in attached mode, but not with modifiers. You can hold VK_CONTROL, VK_ALT, and VK_SHIFT, but it doesn't always work with key combinations. That is, holding VK_ALT and pressing A will not necessarily result in ALT+A. This entirely depends on how the game's input handler was programmed.
What is ALT+V supposed to do, anyways? Have you tried using VK_MENU instead of VK_ALT?
What is ALT+V supposed to do, anyways? Have you tried using VK_MENU instead of VK_ALT?
Re: Rule for keyboardHold and key.VK_ALT
I'm sory I mean keyboardPress(key.VK_1, key.VK_ALT).
ALT + 1 is the shortcut for attack monster.
thanks
ALT + 1 is the shortcut for attack monster.
thanks
Re: Rule for keyboardHold and key.VK_ALT
Hello, may I ask again?
In my game the function
=====================================================
--code1
keyboardHold(key.VK_ALT); -- The A key will be held down
yrest(50);
keyboardPress(key.VK_1);
yrest(50);
keyboardRelease(key.VK_ALT); -- The A key is now released
keyboardBufferClear();
===================================================== work
--code2
keyboardPress(key.VK_1, key.VK_ALT); -- didnt work
--code3
keyboardPress( key.VK_V, key.VK_CTRL ); -- work
Is there any possiblilities code1 work and code2 didnt work?
In my game the function
=====================================================
--code1
keyboardHold(key.VK_ALT); -- The A key will be held down
yrest(50);
keyboardPress(key.VK_1);
yrest(50);
keyboardRelease(key.VK_ALT); -- The A key is now released
keyboardBufferClear();
===================================================== work
--code2
keyboardPress(key.VK_1, key.VK_ALT); -- didnt work
--code3
keyboardPress( key.VK_V, key.VK_CTRL ); -- work
Is there any possiblilities code1 work and code2 didnt work?
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Rule for keyboardHold and key.VK_ALT
That is entirely because of the way the game reads input. Holding ALT and then using keyboardPress() does not generate a ALT+key message as only the key was sent (while the ALT hold was separate). There's nothing that can be done about that.
In the second example, try using key.VK_MENU instead of key.VK_ALT with the attached executable.
In the second example, try using key.VK_MENU instead of key.VK_ALT with the attached executable.
- Attachments
-
- micromacro1.01.experimental.zip
- (161.02 KiB) Downloaded 149 times
Re: Rule for keyboardHold and key.VK_ALT
Thank you, I have try VK_MENU and it didnt work. But I think the problem is from the game. I want to start a new topic about Mouse Control. see you
Who is online
Users browsing this forum: No registered users and 0 guests