AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Darkfall Online Question..

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Darkfaller
Guest





PostPosted: Thu Aug 06, 2009 1:01 am    Post subject: Darkfall Online Question.. Reply with quote

.. Hi there,


I know, there are 3-4 Posts here about that, but they didnt help me alot..
im a complete noob in such things, my first script, and then its a bigone :/


All i need is to send the key "H" to a window called "Darfkall Online" even when the window isnt active (minimized or not, dont matter)

what i tryed out so far is:

Code:
Numpad1::

SetTitleMatchMode, 2
PostMessage, 0x111, Darkfall Online, H


Where i get the code was:
http://www.autohotkey.com/docs/misc/SendMessage.htm

But i dont get it, 0x111 should stand for a wm_command.. but i dont know what that is..
so im lost at the very first word of the code :/

hopefully someone can help me out here! Smile

thx a lot!
Back to top
lilalurl.T32



Joined: 17 May 2007
Posts: 391
Location: Titan

PostPosted: Thu Aug 06, 2009 1:58 am    Post subject: Reply with quote

I believe you'd better try using the ControlSend command rather than Post/Sendmessage.
________
MERCEDES-BENZ 190 SPECIFICATIONS


Last edited by lilalurl.T32 on Sun Mar 13, 2011 6:43 am; edited 1 time in total
Back to top
View user's profile Send private message
Guest






PostPosted: Thu Aug 06, 2009 8:22 pm    Post subject: Reply with quote

With ControlSend, i can send to an inactive window too?
Back to top
jethrow



Joined: 24 May 2009
Posts: 1907
Location: Iowa, USA

PostPosted: Thu Aug 06, 2009 8:41 pm    Post subject: Reply with quote

Darkfaller wrote:
But i dont get it, 0x111 should stand for a wm_command.. but i dont know what that is..

[pictorial] Find WM_COMMAND parameter with Winspector
(thanks SKAN! Very Happy)
_________________
Very Happy - in case I forgot to smile
Basic Webpage Controls
COM Object Reference
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Darkfaller
Guest





PostPosted: Fri Aug 07, 2009 1:21 am    Post subject: Reply with quote

Ok, this shows me how to put the menus and stuff in..

but all i want is to send a simple letter (hotkey in the game) to the game..

nothing more, i just dont get it..

Winspy wount show me any messages when i press "H"..
Back to top
lilalurl.T32



Joined: 17 May 2007
Posts: 391
Location: Titan

PostPosted: Fri Aug 07, 2009 5:35 am    Post subject: Reply with quote

It seems you are taking the terms "PostMessage" literally, as in "chat" message, while what PostMessage actually does is posting a "computer" message.

What you want to do is Send a simulated keystroke. Therefore, have a look at Send and ControlSend (which can send to an inactive window).
________
Uggs


Last edited by lilalurl.T32 on Sun Mar 13, 2011 6:44 am; edited 1 time in total
Back to top
View user's profile Send private message
Darkfaller
Guest





PostPosted: Fri Aug 07, 2009 7:38 pm    Post subject: Reply with quote

Ok, thx for the Infos..

Now it seems, i cant send to Darkfall Online a key.. it just wont work..

my code is this:

Code:

NumPad1::


SetTitleMatchMode, 2
ControlSend,, m, ahk_id SFMainWindow ;tryied this
ControlSend,, m, Darkfall Online ; tryied this aswell.. wont work..


Dont know why it wont work, maybe the game is made that it wont work?
Back to top
jethrow



Joined: 24 May 2009
Posts: 1907
Location: Iowa, USA

PostPosted: Sat Aug 08, 2009 6:26 am    Post subject: Reply with quote

If using IE, this should work:
Code:
NumPad1::
DetectHiddenWindows, On ; allow sending to a minimized window
SetTitleMatchMode, 2
ControlSend, Internet Explorer_Server1, m, Darkfall
Return

_________________
Very Happy - in case I forgot to smile
Basic Webpage Controls
COM Object Reference
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group