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)