Register for your free account! | Forgot your password?

Go Back   elitepvpers > Shooter > Planetside
You last visited: Today at 17:37

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Autoit Send Second Window

Discussion on Autoit Send Second Window within the Planetside forum part of the Shooter category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2013
Posts: 1
Received Thanks: 0
Autoit Send Second Window

Hey guys,

I have written a little script that switches between two PS2 game windows. Each window is a different faction. The two players are standing around a generator, and it goes back and fourth, one overloading a generator, and the other player stabilising the generator. In theory. The script just activates a window, sends the E key for 10 seconds, then switches to the other window and does it again. Over and over. However, only the one window registers the E press. So what happens, is player one has its window activated, and presses E and overloads the generator. Then player two's window gets activated, but for some reason, the client does not recognise the sent E. In fact, it does not recognise any event sent by the script. I can manually press E and it works fine, but the script does not. I have tried focusing on other windows before I focus on the second window, I have tried sending more then one E press, nothing works. The second window does not recognise any input from the script. Logically it is sound, but I really need some help because for some reason it does not work and I am stumped.

Code:
Sleep(1000)
Opt("SendKeyDownDelay", 10000)
$shooter1 = "0x0000000000160442"
$shooter2 = "0x00000000002D04DE"
While 1=1

WinActivate(HWnd($shooter1))

Sleep(500)
Send("e")
Sleep(100)

WinActivate(HWnd($shooter2))

sleep(500)
Send("e")
Sleep(100)


WEnd
benton328 is offline  
Old 02/26/2013, 18:00   #2
 
Osskyw's Avatar
 
elite*gold: 0
Join Date: Feb 2008
Posts: 167
Received Thanks: 25
A window in foreground doesn't mean it's focused, which PS2 needs to be to register Keystrokes.
Osskyw is offline  
Old 03/01/2013, 02:20   #3
 
butter123's Avatar
 
elite*gold: 95
Join Date: May 2011
Posts: 982
Received Thanks: 189
winactivate is enough. maybe use winwaitactive.

but i tried this method some days ago and it only worked 3-4 times, then no certs were gained. same for terminalhacking with recon.

my function to get windowshandels when they are active:

PHP Code:
Func _gethandles()
    
_ArrayAdd($windows,WinGetHandle(""))
    
MsgBox(0,"","Added Window " WinGetTitle(WinGetHandle("")))
EndFunc 
butter123 is offline  
Reply


Similar Threads Similar Threads
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...
Send and UseSkill to the not active window
07/04/2011 - PW Hacks, Bots, Cheats, Exploits - 3 Replies
how do it? I can send to active window only. I try to use autoit, but that did not work Dim Au3 As New AutoItX3Lib.AutoItX3 Dim hWnd As Integer= FindWindow("ElementClient Window", Nothing) Au3.ControlSend("", "", "", "{F1}") I also tried using PostMessage,it does not work Dim hWnd As Integer= FindWindow("ElementClient Window", Nothing)
Send Keys to minimized PW-Window
07/21/2010 - Perfect World - 3 Replies
I want to learn how to send keys to a PW-Window, but it is minimized (because of the other functions my prog has).. i am programming in vb.net (i know.. not the best language but i am getting along with it quite good) so if anyone knows a simple function or can help me with this.. pls tell me :) greetz
Deaparately trying to send Keys to the AR window...
04/26/2009 - Ace Online / AirRivals - 0 Replies
I'm currently trying to code a joystick-support for AirRivals. It doesn't work for one (crazy) reason: The game-window only seems to accept its input from the hardware-based keyboard. Just thought it can be good to consult the "underground", although I'm not wanting to hack AR or to write a bot, but if I send Key-messages to the AR-Handle (using the Windows-API-function postmessage/keybd_event), nothing happens, except if it's a system Key like , or ... for example if I try to send a small...



All times are GMT +1. The time now is 17:37.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.