Page 2 of 2

Re: attaching to game/programme question.

Posted: Fri Jan 13, 2012 7:13 pm
by botje
just wanted to let you know i have the same with Aion.

i let bot turn around to scan for targets, but the damn prgram wont register my pressing of the A or D button >.<

Botje

Re: attaching to game/programme question.

Posted: Fri Jan 13, 2012 9:14 pm
by Administrator
Probably just incompatible. Try not using attached input.

Re: attaching to game/programme question.

Posted: Sat Jan 14, 2012 7:37 am
by botje
i thought that too, but it does register TAB, and 1, 2 etc...

Botje

Re: attaching to game/programme question.

Posted: Sat Jan 14, 2012 7:50 am
by lisa
botje wrote:i thought that too, but it does register TAB, and 1, 2 etc...
Have you tried having a text box open in game when doing the wasd ?

It is possible that the key is being registered but it isn't performing the function attached to the key shortcut, in the case of a or d that would be side stepping?

You could also test this by changing the movement shortcuts to 1 2 3 4 which you know have been working and if they don't work anymore then you know it isn't the key presses that is failing it is the actual movement functions.

If that is the case then you probably won't be able to move using attached keyboard but will still be able to do other tasks.

Had another thought, not sure if its possible but you might be able to change the variable that tells the game it has focus, would involve lots of testing and indepth search of the memory to find what the variable or function actually is.

Re: attaching to game/programme question.

Posted: Sat Jan 14, 2012 8:50 am
by botje
ill check that out lisa, although i have to say that AutoIt is able to do it.

Botje

Re: attaching to game/programme question.

Posted: Sat Jan 14, 2012 9:12 am
by lisa
does it do it with focus or without focus?

Re: attaching to game/programme question.

Posted: Sat Jan 14, 2012 10:43 am
by botje
AutoIt only works with focus, but atleast it works.

MM doesnt want to work unfocused, or focussed.

Botje

Re: attaching to game/programme question.

Posted: Sat Jan 14, 2012 12:02 pm
by lisa
I bet if you didn't attach to the window it would work focused, that would be the same as the autoit.

Re: attaching to game/programme question.

Posted: Sat Jan 14, 2012 1:24 pm
by botje
just tested that, and damn your right xd

Botje

Re: attaching to game/programme question.

Posted: Sat Jan 14, 2012 5:46 pm
by botje
perhaps its a good idea to make MM, same as autoit,

activate the desired window, before trying to send input?

Botje

Re: attaching to game/programme question.

Posted: Sat Jan 14, 2012 6:51 pm
by Administrator
botje wrote:perhaps its a good idea to make MM, same as autoit,

activate the desired window, before trying to send input?

Botje
Are you suggesting that MicroMacro would force that window to the foreground before sending key presses? I don't like that kind of behavior by default, but you can do that if you wish.

The function showWindow() will do that. Be aware that the later versions of Windows are trying to do away with having processes bringing unrelated processes to the foreground, so will only work if the calling process (MicroMacro) is run with admin privileges, it is the creator of the second process (as in, you launched the target process from within MicroMacro), or it is in the foreground at the time of the function call.

Re: attaching to game/programme question.

Posted: Sat Jan 14, 2012 8:12 pm
by lisa
I just do this at the start of bot.lua

Code: Select all

include("addresses.lua");
include("settings.lua");
include("functions.lua");

setStartKey(settings.hotkeys.START_BOT.key);
setStopKey(settings.hotkeys.STOP_BOT.key);

local windowList = findWindowList("*", "Turbine Device Class");
if( #windowList == 0 ) then
	print("You need to run LoTRO first!")
end
cprintf(cli.red,"Get focus on Game and press (".. getKeyName(settings.hotkeys.START_BOT.key)..") to start.\n")
repeat
rest(200)
until keyPressed(settings.hotkeys.START_BOT.key)
function main()
So it will print on MM
Get focus on Game and press End to start.
and wait for the keypress before doing anything else.

If you can't get the game to work attached then you can only have 1 instance of the game open and not have that PC doing anything else. So a person needs to start it, making them click a window doesn't seem like asking to much to me lol