senthor Posted November 5, 2008 Share Posted November 5, 2008 Hi all! After long searching, I found a function I need: I need to change the volume of the normal WMPlayer- not the one of a com object. Thus for, I searched google and found a AHK tool called Ac'tiveAid, and in it a function which looks like this: registerAction("mpc_Up") ... func_HotkeyEnable( "mpc_Up" ) ... func_mpc_send_WMP("18815") ... func_mpc_send_WMP(command) { if (WinExist("ahk_class WMPlayerApp")) PostMessage, 0x111, %command%,,,ahk_class WMPlayerApp else if (WinExist("ahk_class WMP Skin Host")) PostMessage, 0x111, %command%,,,ahk_class WMP Skin Host } else return false return true } I tried to translate it to Autoit with: HotKeySet("{ENTER}", "_WMP_UP") ... Func _WMP_UP() If WinExists("[CLASS:WMPlayerApp]") then DllCall("user32.dll", "int", "PostMessage","hwnd", WinGetHandle("[CLASS:WMPlayerApp]"), "int", 18815, "int", 0x111, "int", "0") ElseIf WinExists("[CLASS:WMP Skin Host]") Then DllCall("user32.dll", "int", "PostMessage","hwnd", WinGetHandle("[CLASS:WMP Skin Host]"), "int", 18815, "int", 0x111, "int", "0") EndIF EndFunc But it doesn't work. Any ideas? Thanks, senthor FileListToArray UDFMy tools Link to comment Share on other sites More sharing options...
torels Posted November 5, 2008 Share Posted November 5, 2008 maybe with _SendMessage() (#include <SendMessage.au3>) but I don't know... just guessing Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org Link to comment Share on other sites More sharing options...
rover Posted November 5, 2008 Share Posted November 5, 2008 (edited) Hi all! After long searching, I found a function I need: I need to change the volume of the normal WMPlayer- not the one of a com object. Thus for, I searched google and found a AHK tool called Ac'tiveAid, and in it a function which looks like this: registerAction("mpc_Up") ... func_HotkeyEnable( "mpc_Up" ) ... func_mpc_send_WMP("18815") ... func_mpc_send_WMP(command) { if (WinExist("ahk_class WMPlayerApp")) PostMessage, 0x111, %command%,,,ahk_class WMPlayerApp else if (WinExist("ahk_class WMP Skin Host")) PostMessage, 0x111, %command%,,,ahk_class WMP Skin Host } else return false return true } I tried to translate it to Autoit with: HotKeySet("{ENTER}", "_WMP_UP") ... Func _WMP_UP() If WinExists("[CLASS:WMPlayerApp]") then DllCall("user32.dll", "int", "PostMessage","hwnd", WinGetHandle("[CLASS:WMPlayerApp]"), "int", 18815, "int", 0x111, "int", "0") ElseIf WinExists("[CLASS:WMP Skin Host]") Then DllCall("user32.dll", "int", "PostMessage","hwnd", WinGetHandle("[CLASS:WMP Skin Host]"), "int", 18815, "int", 0x111, "int", "0") EndIF EndFuncoÝ÷ Ø×hzÉ÷öÜ(®@'Ê'^jÄájy,±éíÿªê-y«¢+Ù!½Ñ-åMÐ ÅÕ½ÐííAUAôÅÕ½Ðì°ÅÕ½Ðí}]5A}U@ÅÕ½Ðì¤)!½Ñ-åMÐ ÅÕ½ÐííA9ôÅÕ½Ðì°ÅÕ½Ðí}]5A}8ÅÕ½Ðì¤)!½Ñ-åMÐ ÅÕ½ÐííM ôÅÕ½Ðì°ÅÕ½Ðí}á¥ÐÅÕ½Ðì¤((ÀÌØí¡]¹Äô]¥¹Ñ!¹± ÅÕ½Ðím 1MLé]5A±åÉÁÁtÅÕ½Ðì¤(ÀÌØí¡]¹Èô]¥¹Ñ!¹± ÅÕ½Ðím 1MLé]5@M¥¸!½ÍÑtÅÕ½Ðì¤(()]¡¥±Ä(%M±À ÄÀÀ¤)]¹()Õ¹}]5A}U@ ¤(%%]¥¹á¥ÍÑÌ ÀÌØí¡]¹Ä¤Q¡¸($%±± ±° ÅÕ½ÐíÕÍÈÌȹ±°ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÅÕ½ÐíA½ÍÑ5ÍÍÅÕ½Ðì°ÅÕ½Ðí¡Ý¹ÅÕ½Ðì°ÀÌØí¡]¹Ä°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÁàÄÄÄ°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÄààÄÔ°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°À¤(%±Í%]¥¹á¥ÍÑÌ ÀÌØí¡]¹È¤Q¡¸($%±± ±° ÅÕ½ÐíÕÍÈÌȹ±°ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÅÕ½ÐíA½ÍÑ5ÍÍÅÕ½Ðì°ÅÕ½Ðí¡Ý¹ÅÕ½Ðì°ÀÌØí¡]¹È°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÁàÄÄÄ°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÄààÄÔ°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°À¤(%¹%)¹Õ¹ìôôÐí}]5A}U@()Õ¹}]5A}8 ¤(%%]¥¹á¥ÍÑÌ ÀÌØí¡]¹Ä¤Q¡¸($%±± ±° ÅÕ½ÐíÕÍÈÌȹ±°ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÅÕ½ÐíA½ÍÑ5ÍÍÅÕ½Ðì°ÅÕ½Ðí¡Ý¹ÅÕ½Ðì°ÀÌØí¡]¹Ä°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÁàÄÄÄ°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÄààÄØ°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°À¤(%±Í%]¥¹á¥ÍÑÌ ÀÌØí¡]¹È¤Q¡¸($%±± ±° ÅÕ½ÐíÕÍÈÌȹ±°ÅÕ½Ðì°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÅÕ½ÐíA½ÍÑ5ÍÍÅÕ½Ðì°ÅÕ½Ðí¡Ý¹ÅÕ½Ðì°ÀÌØí¡]¹È°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÁàÄÄÄ°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°ÄààÄØ°ÅÕ½Ðí¥¹ÐÅÕ½Ðì°À¤(%¹%)¹Õ¹ìôôÐí}]5A}8()Õ¹}á¥Ð ¤(%á¥Ð)¹Õ¹ìôôÐí}á¥Ð Edited November 5, 2008 by rover I see fascists... Link to comment Share on other sites More sharing options...
senthor Posted November 5, 2008 Author Share Posted November 5, 2008 (edited) Yes, of course with a Loop and an exit Hotkey, rover! But I didn't want to put it here, so I just added some tiny dots in my code Edited November 5, 2008 by senthor FileListToArray UDFMy tools Link to comment Share on other sites More sharing options...
rover Posted November 5, 2008 Share Posted November 5, 2008 (edited) Yes, of course with a Loop and an exit Hotkey, rover!But I didn't want to put it here, so I just added some tiny dots in my code Hi senthorjust for demonstration purposes for othersso there is a workable example Edited November 5, 2008 by rover I see fascists... Link to comment Share on other sites More sharing options...
senthor Posted November 5, 2008 Author Share Posted November 5, 2008 thanks torels, works with: Func PostMessage($msg = 18815) If WinExists("[CLASS:WMPlayerApp]") then return _SendMessage(WinGetHandle("[CLASS:WMPlayerApp]"), 0x111, $msg) ElseIf WinExists("[CLASS:WMP Skin Host]") Then return _SendMessage(WinGetHandle("[CLASS:WMP Skin Host]"), 0x111, $msg) EndIF EndFunc FileListToArray UDFMy tools Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now