 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
0mega
Joined: 17 May 2007 Posts: 38
|
Posted: Sat Feb 23, 2008 1:23 pm Post subject: How to send .. + messenger/wmp problem (edited) |
|
|
| 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 |
|
 |
ahklerner
Joined: 26 Jun 2006 Posts: 1381 Location: USA
|
|
| Back to top |
|
 |
0mega
Joined: 17 May 2007 Posts: 38
|
Posted: Sat Feb 23, 2008 7:10 pm Post subject: |
|
|
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 |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 7295 Location: Australia
|
Posted: Sun Feb 24, 2008 12:30 am Post subject: Re: How to send .. + messenger/wmp problem (edited) |
|
|
| 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 |
|
 |
0mega
Joined: 17 May 2007 Posts: 38
|
Posted: Sun Feb 24, 2008 1:12 am Post subject: |
|
|
| Yes, I have used controlsend as you can see on that script... |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|