[HELP] Visual Basic Keystrokes to Minimized Windows.

03/29/2009 21:34 theoneofgod#1
Sorry If this is in the wrong forum, but I know some of you are quite knowledgeable in this subject.

I've been making scripts for personal use with AutoIt lately, but I have encountered many issues sending simulated keystrokes to a window that isn't visible.

Right, I know that ControlSend will send any keystroke with the handle. I can do this, no problem. But I have issues with the keystrokes being sent to other editable text boxes, like this thread for example, this really does stop the script working correctly.

The scripts are for SRO for buffing a Wizard character, while AFK, (sleeping) etc, it works good most of the time but I need a more advanced language that will send it to that window only, more precise?

I've been googling a lot lately but still a bit confused as to where to start.

Help will be appreciated and thanked appropriately :)
03/29/2009 21:55 daniellook#2
You wanna do this when silkroad is minimized ?
03/29/2009 23:25 theoneofgod#3
Quote:
Originally Posted by daniellook View Post
You wanna do this when silkroad is minimized ?
Yes.
03/30/2009 08:20 daniellook#4
cant help you then
I can only help you if client isn,t minimized
03/31/2009 19:55 IRever#5
Why do you want it to be sent to a textbox if it's only for pressing a slot?
Also does it matter in wich language it is?
03/31/2009 20:02 theoneofgod#6
Quote:
Originally Posted by IRever View Post
Why do you want it to be sent to a textbox if it's only for pressing a slot?
Also does it matter in wich language it is?
in autoit i need a control id for it to work, i only know of edit1, nothing else works.
03/31/2009 20:21 IRever#7
Sorry, but I don't fully understand you.
03/31/2009 22:08 theoneofgod#8
About the language, I just wanted to try something more reliable, stable?

Well I use WinGetHandle with Autoit to find the hwnd to send the keystrokes to, but you also need a control ID. Example:

Code:
$hwnd=WinGetHandle("Babel - Character")
ControlSend($hwnd,"","Edit1","type your string here")
title, text, control ID, string.

I can't seem to find another way of sending keystrokes without having Edit1 as the control Id, but seeing as it sounds like editing a textbox? editable text? it interferes with other programs I use for whatever reason.

I need my script to only send keystrokes to the game just for the belts, without messing with anything else, sounds very possible, just can't figure it out.

EDIT: Also, It is possible to send mouse clicks to SRO while minimized.