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 

How to send .. + messenger/wmp problem (edited)

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



Joined: 17 May 2007
Posts: 38

PostPosted: Sat Feb 23, 2008 1:23 pm    Post subject: How to send .. + messenger/wmp problem (edited) Reply with quote

Code:
WM_KEYDOWN = 0x100
WM_KEYUP = 0x101
WinGetActiveTitle, WinTitle
SendMessage, 0x100 , wParam, lParam, Edit1, %WinTitle%


What wParam and IParam should be to send control+v (paste)?


Last edited by 0mega on Sat Feb 23, 2008 7:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
ahklerner



Joined: 26 Jun 2006
Posts: 1381
Location: USA

PostPosted: Sat Feb 23, 2008 2:55 pm    Post subject: Reply with quote

http://msdn2.microsoft.com/en-us/library/ms646280(VS.85).aspx
_________________

ʞɔпɟ əɥʇ ʇɐɥʍ
Back to top
View user's profile Send private message
0mega



Joined: 17 May 2007
Posts: 38

PostPosted: Sat Feb 23, 2008 7:10 pm    Post subject: Reply with quote

Didn't found how to send control+v, and wm_paste doesn't work to messenger psm (yes, again messenger psm problem....)

Code:
#NoEnv 
SendMode Input 
SetKeyDelay, 0, 10
SetBatchLines, -1
SetMouseDelay, -1
setWinDelay, -1
CoordMode, Mouse, Screen
SetDefaultMouseSpeed, 0               ;some of these are useless, but i dont care
SetControlDelay, -1

loop
{
RegRead, Author, HKEY_CURRENT_USER, Software\Microsoft\MediaPlayer\CurrentMetadata, Author
RegRead, Title, HKEY_CURRENT_USER, Software\Microsoft\MediaPlayer\CurrentMetadata, Title
RegRead, Duration, HKEY_CURRENT_USER, Software\Microsoft\MediaPlayer\CurrentMetadata, durationString
Clipboard =%Author% - %Title% [%Duration%]
BlockInput, On
PostMessage,0x111, 56606, 0,,Windows Live Mess
Sleep, 25
;ControlFocus , DirectUIHWND1, Windows Live Mess
;Sleep, 25
Controlsend,DirectUIHWND1, ^v,Windows Live Mess
;SendMessage, 0x302, , ,DirectUIHWND1, ahk_class MSBLWindowClass doesn't work, don't know why. 0x302 = wm_paste
Sleep, 25
SendMessage, 0x102, 0x0D, ,DirectUIHWND1, Windows Live Mess
BlockInput, Off
Title3 = %Title%
loop
{
Sleep, 10000
RegRead, Title2, HKEY_CURRENT_USER, Software\Microsoft\MediaPlayer\CurrentMetadata, Title
if Title3 = %Title2%
continue
else
Break
}
}

esc:: Reload

This needs Blogging Plug-in to wmp http://www.wmplugins.com/ItemDetail.aspx?ItemID=287.

My problems are: (I don't understand com commands)
How to detect wmp song change.
How to send text to messenger psm text area without messenger window is active or minimized (have to send text when only trayicon)
Back to top
View user's profile Send private message
Lexikos



Joined: 17 Oct 2006
Posts: 7295
Location: Australia

PostPosted: Sun Feb 24, 2008 12:30 am    Post subject: Re: How to send .. + messenger/wmp problem (edited) Reply with quote

0mega wrote:
What wParam and IParam should be to send control+v (paste)?
This is asked too often. Use ControlSend. It takes care of preparing and sending the messages; all you need to do is tell it which keys to send and which control/window to send to. If it doesn't work, neither will sending WM_KEY* etc. manually.
Back to top
View user's profile Send private message Visit poster's website
0mega



Joined: 17 May 2007
Posts: 38

PostPosted: Sun Feb 24, 2008 1:12 am    Post subject: Reply with quote

Yes, I have used controlsend as you can see on that script...
Back to top
View user's profile Send private message
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