Jump to content
Sign in to follow this  
Rorka

Controlsend() to PID?

Recommended Posts

Rorka

Okay say I have two Windows open... both with exactly the same name: "World of warcraft"

Using this:

ControlSend("World of Warcraft", "", "", "{Tab}")

Sends the tab button to the most recent used World of Warcraft window. The problem is that im playing on one account, and using one to ask people in trade to whisper me.

Im currently using this to search for the PID's

$PID = WinGetProcess("World of Warcraft")
$handle = _BMOpenProcess(GUICtrlRead($PIDbox));Hooks the PID

That does work because I can memory write!

I thought that this might work:

ControlSend($handle, "", "", "{Tab}")

I open my first wow and run my code to hook the pid. then open the wow I will be playing!(This way I know it hooks the correct one.)

How can I make it send the Tab button to the correct window? thanks!

Share this post


Link to post
Share on other sites
Kealper

you could rename the WoW window names, to say, "World of Warcraft [sender]" and then "World of Warcraft [Main]", so that way to send things to the chat, you could ControlSend("World of Warcraft [sender]", "", "", "{TAB}")

doing that would eliminate any need for messing with PIDs and such


Share this post


Link to post
Share on other sites
Rorka

you could rename the WoW window names, to say, "World of Warcraft [sender]" and then "World of Warcraft [Main]", so that way to send things to the chat, you could ControlSend("World of Warcraft [sender]", "", "", "{TAB}")

doing that would eliminate any need for messing with PIDs and such

I cant... I need the PID's for other stuff 2.

Share this post


Link to post
Share on other sites
Kealper

well, doing it with renaming the windows, you can be assured that you get the correct PIDs, since the windows will be different, but then again, im not 100% positive on how your doing the rest of the program...but renaming windows just seems like the easiest to do, and im a VERY lazy person :)

to get the $PID and $handle incase you used those elsewhere...

$PID = WinGetProcess("World of Warcraft [Sender]")
$handle = _BMOpenProcess(GUICtrlRead($PIDbox));Hooks the PID
Edited by Kealper

Share this post


Link to post
Share on other sites
Rorka

well, doing it with renaming the windows, you can be assured that you get the correct PIDs, since the windows will be different, but then again, im not 100% positive on how your doing the rest of the program...but renaming windows just seems like the easiest to do, and im a VERY lazy person :)

to get the $PID and $handle incase you used those elsewhere...

$PID = WinGetProcess("World of Warcraft [Sender]")
$handle = _BMOpenProcess(GUICtrlRead($PIDbox));Hooks the PID

Ill have a look, but id prefer not to change window names.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.