attaching to game/programme question.

Discuss, ask for help, share ideas, give suggestions, read tutorials, and tell us about bugs you have found with MicroMacro in here.

Do not post RoM-Bot stuff here. There is a subforum for that.
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.
Message
Author
User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: attaching to game/programme question.

#21 Post 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
User avatar
Administrator
Site Admin
Posts: 5342
Joined: Sat Jan 05, 2008 4:21 pm

Re: attaching to game/programme question.

#22 Post by Administrator »

Probably just incompatible. Try not using attached input.
User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: attaching to game/programme question.

#23 Post by botje »

i thought that too, but it does register TAB, and 1, 2 etc...

Botje
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: attaching to game/programme question.

#24 Post 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.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: attaching to game/programme question.

#25 Post by botje »

ill check that out lisa, although i have to say that AutoIt is able to do it.

Botje
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: attaching to game/programme question.

#26 Post by lisa »

does it do it with focus or without focus?
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: attaching to game/programme question.

#27 Post by botje »

AutoIt only works with focus, but atleast it works.

MM doesnt want to work unfocused, or focussed.

Botje
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: attaching to game/programme question.

#28 Post by lisa »

I bet if you didn't attach to the window it would work focused, that would be the same as the autoit.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: attaching to game/programme question.

#29 Post by botje »

just tested that, and damn your right xd

Botje
User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: attaching to game/programme question.

#30 Post by botje »

perhaps its a good idea to make MM, same as autoit,

activate the desired window, before trying to send input?

Botje
User avatar
Administrator
Site Admin
Posts: 5342
Joined: Sat Jan 05, 2008 4:21 pm

Re: attaching to game/programme question.

#31 Post 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.
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: attaching to game/programme question.

#32 Post 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
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Post Reply