AutoHotkey Community

It is currently May 26th, 2012, 6:05 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: February 23rd, 2008, 2:23 pm 
Offline

Joined: May 17th, 2007, 4:49 pm
Posts: 38
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 February 23rd, 2008, 8:11 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 23rd, 2008, 3:55 pm 
Offline

Joined: June 26th, 2006, 6:14 pm
Posts: 1379
Location: USA
http://msdn2.microsoft.com/en-us/library/ms646280(VS.85).aspx

_________________
Image
ʞɔпɟ əɥʇ ʇɐɥʍ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 23rd, 2008, 8:10 pm 
Offline

Joined: May 17th, 2007, 4:49 pm
Posts: 38
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)


Report this post
Top
 Profile  
Reply with quote  
PostPosted: February 24th, 2008, 1:30 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7501
Location: Australia
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 24th, 2008, 2:12 am 
Offline

Joined: May 17th, 2007, 4:49 pm
Posts: 38
Yes, I have used controlsend as you can see on that script...


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Alpha Bravo, JSLover, LazyMan, Tipsy3000 and 66 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group