Planetside 2: Send left mouse click to game in background

12/05/2012 11:16 hdnine#1
Hey,

I've just started playing around with this program and i can manage to get the script to work if I have the game in focus:

Code:
Send("{SPACE}")
Which will for example make the character jump. The idea for me is to have these things working in the background while I have other things to do on my computer, so basically have AutoIt run on an inactive window. I tried this:

Code:
ControlClick("Planetside2 v0.473.22.176761 **SHIPPING**", "", "", "", 1, 959, 545)
or even

Code:
ControlSend("[CLASS:GFC_StdWindowClass; INSTANCE:1]", "", "", "{SPACE}")
but it didn't work so does anyone have a clue on how to get control to work for PS2?
12/05/2012 14:48 butter123#2
[Only registered and activated users can see links. Click Here To Register...]
maybe try this
shure the name for the window is correct? maybe small version change or sth...

if ur just making an afk bot, to get some certs, then its much more efficent if you play 10 min. you only get 1 cert per hour i think

if you want to make a lvl bot im interested ;)
12/05/2012 21:58 hdnine#3
The window seems to be correct since that's what AutoIt claims it to be. The AFK script was meant for my Sunderer but i really want it working with the window minimized. Haven't figured it out yet though >.<
12/06/2012 00:40 butter123#4
maybe ill try a bit on the we, but got no time atm
12/07/2012 11:22 hdnine#5
I would really appreciate if someone could give me a code example of having AutoIt communicate with Planetside 2 while minimized -- after that i will continue exploring on my own.

Since i don't understand how Windows and other OS work, and since ControlSend doesn't work, i just need to find a way to be able to send a key or mouse command as mentioned above. There seem to be different approaches like PostMessage UDF or DLL injection but i don't have a clue how these work. I'm not new to programming mind you, but i do so in JavaScript so this is new to me.

"Send" works great when the game is in focus, ControlSend doesn't work at all even though the title is correct. Seems like Window Controls is a problem? Anyway, thanks! ^^
12/08/2012 18:52 xnox2k#6
Like in the help file:

ControlSend ( "title", "text", controlID, "string" [, flag] )

so for you it should be

ControlSend("Planetside2", "", "", "{SPACE}")


and if it still doesn't work try [Only registered and activated users can see links. Click Here To Register...]
12/08/2012 19:29 butter123#7
what i got so far:
send works
controlsend only in character selection screen, not after second loading screen
postmsg working on
12/09/2012 09:53 hdnine#8
Thanks for giving it a shot! I tried the PostMessage UDF code and from what i can tell, it doesn't work. I've made some ConsoleWrite checks to see if the values set are working and they are. the DllCall:s aren't doing anything it seems?
12/14/2012 18:41 butter123#9
since programming a bot which runs hidden didnt work, i would make one which runs active and just repars a flash on the one side and a second one which shoots the flash from a turret. repairman would get points.

anyone interested in using it? cause it needs 2 people to run (shooter / repairman)

and for programming i would need help to calibrate shootduration, to prevent flash of being destroyed

edit: changed the programm to calibrate on the run. but still need one to test and farm with ;)