Planetside 2: Send left mouse click to game in background
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:
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 >.<
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! ^^
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?
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
how to make a mouse that work in background? 08/29/2012 - AutoIt - 2 Replies i want to make a bot pixelsearch but if the bot work i want to do other things. so i want to make a second mouse (invisible) that click pixel while i can make my things. how i can make it???
How to send key on background window 09/26/2011 - General Coding - 3 Replies Do you know how send key in a background window with autoit ?
I try WinActivate("4Story") but I can't do enything else...
Mouse clicks in background 08/01/2009 - General Gaming Discussion - 6 Replies Hi,
i'm tryin to perfom mouse clicks in rom, while it's in background, but i have so far no success. I tried SendMessage/PostMessage and AutoIt, discovered that rom checks mouse clicks with getCursor but even when i NOPed the GetCursor func i had no success. Also, i didn't find any hooks that would manipulate SendMessage/PostMessage, so i'm very confused why my code isn't working. Please help me with some advice.
Thanks for your aid.
so long backtoreality
how to send contorl+mouse click in autoit 09/07/2005 - AutoIt - 0 Replies Hi,
I am wondering how to send contorl+left mouse click in autoit.
What I do now:
AutoItSetOption ( "SendKeyDownDelay", 10)
Send("^")
MouseClick("left",Random&a mp;#40;0,1024,1),Random(0,700,1&am p;#41;,1,1)
AutoItSetOption ( "SendKeyDownDelay", 1)