|
You last visited: Today at 21:35
Advertisement
How can I send the keys sro_client?
Discussion on How can I send the keys sro_client? within the General Coding forum part of the Coders Den category.
05/02/2011, 04:25
|
#1
|
elite*gold: 0
Join Date: Dec 2010
Posts: 24
Received Thanks: 8
|
How can I send the keys sro_client?
Hello,how can I send keys just sro_client's window with vb6?
I need these codes.I said just because of I want to sendkeys to sro_client's window while what I'm doing something on computer
|
|
|
05/02/2011, 13:24
|
#2
|
elite*gold: 0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
|
Send-/PostMessage.
|
|
|
05/11/2011, 20:06
|
#3
|
elite*gold: 0
Join Date: Dec 2010
Posts: 24
Received Thanks: 8
|
Quote:
Originally Posted by xKraizy
Send-/PostMessage.
|
thx but I need some example because I couldn't understand what was writing on other websites.
|
|
|
05/11/2011, 20:10
|
#4
|
elite*gold: 0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
|
Create an IntPtr variable which contains the handle of your Silkroad window (to find this handle you can use the  -API or the  -Class [take a look at  ]) and use it in the  -API.
You could start like this:
Code:
Dim SilkroadHandle As IntPtr = FindWindow(vbNullString, "WINDOW_NAME")
//or
Dim SilkroadHandle As IntPtr = Process.GetProcessesByName("PROCESS_NAME")(0).MainWindowHandle
Now you got your handle and can use the SendMessage-API:
Code:
SendMessage(SilkroadHandle, ...)
|
|
|
05/15/2011, 10:15
|
#5
|
elite*gold: 166
Join Date: Apr 2009
Posts: 2,339
Received Thanks: 2,661
|
Quote:
Originally Posted by xKraizy
Create an IntPtr variable which contains the handle of your Silkroad window (to find this handle you can use the  -API or the  -Class [take a look at  ]) and use it in the  -API.
You could start like this:
Code:
Dim SilkroadHandle As IntPtr = FindWindow(vbNullString, "WINDOW_NAME")
//or
Dim SilkroadHandle As IntPtr = Process.GetProcessesByName("PROCESS_NAME")(0).MainWindowHandle
Now you got your handle and can use the SendMessage-API:
Code:
SendMessage(SilkroadHandle, ...)
|
Mainwindowhandle or handle ?
btw vb6 doesn't have process class ( which is extremely good i think  )
|
|
|
05/15/2011, 10:41
|
#6
|
elite*gold: 0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
|
Quote:
|
Mainwindowhandle or handle ?
|
You need to find the handle of the control you want to send text to. MainWindowHandle is the handle of the MainControl-/Window (the Silkroad game itself) but if you want to send a text to a textbox in another tool you need to go through all parent controls first - use Spy++ to look for them.
|
|
|
05/15/2011, 12:12
|
#7
|
elite*gold: 238
Join Date: Sep 2009
Posts: 2,327
Received Thanks: 1,164
|
How do you know what Programm he use
AutoIt / VB / C# / C++ /P#
|
|
|
05/15/2011, 12:48
|
#8
|
elite*gold: 0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
|
@mrapc
Quote:
Originally Posted by admin53
how can I send keys just sro_client's window with vb6?
|
And, you can use the SendMessage API with vb.net, vb6, c++, c#..
|
|
|
05/15/2011, 13:22
|
#9
|
elite*gold: 166
Join Date: Apr 2009
Posts: 2,339
Received Thanks: 2,661
|
Quote:
Originally Posted by xKraizy
@mrapc
And, you can use the SendMessage API with vb.net, vb6, c++, c#..
|
"Any" statement is not supported in vb.net ,, %90 of google results give you old vb apis.
btw , i am still searching how to find handle of a hidden window. That's possible with auto-it ( don't know how ) , i'm sure it can be done with vb.net but couldn't find any sources about it.
|
|
|
 |
Similar Threads
|
WindowsInputSimulator (or how to send keys to s4)
10/07/2010 - S4 League - 8 Replies
I don't know how many of you have used this but..
I was playing around with it.
void WaveDashThing()
{
System.Threading.Thread.Sleep(2000);
InputSimulator.SimulateKeyPress(VirtualKeyCode.SPA CE);
InputSimulator.SimulateKeyDown(VirtualKeyCode.VK_A );
InputSimulator.SimulateKeyPress(VirtualKeyCode.SPA CE);
InputSimulator.SimulateKeyUp(VirtualKeyCode.VK_A);
|
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
|
need help send MouseClick dont work in sro_client
04/03/2010 - AutoIt - 3 Replies
need help "send" and "MouseClick" even "MouseMove" dont work in sro_client
what i can do?
|
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...
|
How do I: Click or Send Keys to a minimized window
04/08/2006 - General Coding - 6 Replies
I am making a bot for ConquerOnline, and I need to know how to send clicks or keys to a minimized window, like COPartner does.
Thanks for any help.
|
All times are GMT +1. The time now is 21:35.
|
|