Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 21:35

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

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.

Reply
 
Old   #1
 
admin53's Avatar
 
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
admin53 is offline  
Old 05/02/2011, 13:24   #2
 
Kraizy​'s Avatar
 
elite*gold: 0
The Black Market: 471/0/0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
Send-/PostMessage.
Kraizy​ is offline  
Thanks
1 User
Old 05/11/2011, 20:06   #3
 
admin53's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 24
Received Thanks: 8
Quote:
Originally Posted by xKraizy View Post
Send-/PostMessage.
thx but I need some example because I couldn't understand what was writing on other websites.
admin53 is offline  
Old 05/11/2011, 20:10   #4
 
Kraizy​'s Avatar
 
elite*gold: 0
The Black Market: 471/0/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, ...)
Kraizy​ is offline  
Thanks
1 User
Old 05/15/2011, 10:15   #5

 
sarkoplata's Avatar
 
elite*gold: 166
Join Date: Apr 2009
Posts: 2,339
Received Thanks: 2,661
Quote:
Originally Posted by xKraizy View Post
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 )
sarkoplata is offline  
Old 05/15/2011, 10:41   #6
 
Kraizy​'s Avatar
 
elite*gold: 0
The Black Market: 471/0/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.
Kraizy​ is offline  
Old 05/15/2011, 12:12   #7
 
mrapc's Avatar
 
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#
mrapc is offline  
Old 05/15/2011, 12:48   #8
 
Kraizy​'s Avatar
 
elite*gold: 0
The Black Market: 471/0/0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
@mrapc
Quote:
Originally Posted by admin53 View Post
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#..
Kraizy​ is offline  
Old 05/15/2011, 13:22   #9

 
sarkoplata's Avatar
 
elite*gold: 166
Join Date: Apr 2009
Posts: 2,339
Received Thanks: 2,661
Quote:
Originally Posted by xKraizy View Post
@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.
sarkoplata is offline  
Reply


Similar Threads 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.


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.