IanN1990 Posted October 17, 2011 Share Posted October 17, 2011 (edited) Heya, I have a remote media control. It has some buttons that cant be used for my media player and i would want to rebind them with Autoit Hotkey but for me to do this i need to know there keys in the first place Is there any way or script for me to run so it detects the keys that r inputed from the remote ? Edited April 14, 2012 by IanN1990 Link to comment Share on other sites More sharing options...
JohnOne Posted October 17, 2011 Share Posted October 17, 2011 How certain are you that it emulates key strokes? It might send messages to the gui, or it might emulate mouse clicks. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
IanN1990 Posted October 17, 2011 Author Share Posted October 17, 2011 hmm good question to which i am not sure how i would find out the answer. The item is question is http://www.maplin.co.uk/media-remote-control-227367 which is able to Play/Pause, Next track, Last track, Stop, System Volume Increase, System Volume Decrease, System Volume Mute and Link "No idea what link does " My goal is to detect when "stop" is pressed, to send "play" effectly canceling the button "as i know of no way to block keys" and then lock the computer. Turning the Stop button into a lock button. I would also like to turn the "link" button into a "system switch button" so if $link=0 then the pause/next/last works for media player if $link=1 then pause/next/last works for Kmplayer. Though i belive this idea is within the scope of my abilitys to do it i would need to find out the following information The names of the buttons the "control" emulates so my script can detect it and counter it for my abilitys and knowing the "sendkeys for windows media player pause/play/stop etc but that can be later after i know the media buttons " Is there any script or tool that could help me find out the names of the buttons pressed by the control ? Thanks Link to comment Share on other sites More sharing options...
guinness Posted October 17, 2011 Share Posted October 17, 2011 _IsPressed() might be able to shed some light on your question. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
IanN1990 Posted October 17, 2011 Author Share Posted October 17, 2011 though it took me a while to find it, if your refereing to this http://www.autoitscript.com/autoit3/docs/libfunctions/_IsPressed.htm then i am a little confused because looking at the sample code #include $dll = DllOpen("user32.dll") While 1 Sleep ( 250 ) If _IsPressed("23", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf WEnd DllClose($dll) I would need to know the "numbers" of the keys that r being pressed for the code to detect and then process it. Link to comment Share on other sites More sharing options...
guinness Posted October 17, 2011 Share Posted October 17, 2011 In the Help file you only have to type _IsPressed when on the 'Index' tab. I would suggest you search the forum a little more. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
IanN1990 Posted October 17, 2011 Author Share Posted October 17, 2011 Hmm didn't know the Autoit Software had a help function like that Will save me needing to load the funcations website now i guess what i am kinda after is something like this "I've found with another script that " Link to comment Share on other sites More sharing options...
guinness Posted October 17, 2011 Share Posted October 17, 2011 (edited) You didn't know about F1 in SciTE? My recommendation is to download SciTE4AutoIt3 which is a code editor packed full of features. Edited October 17, 2011 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
IanN1990 Posted October 17, 2011 Author Share Posted October 17, 2011 lol i am starting to get alarmed by how worried ur smilys r becoming and no i didnt, i downloaded the light non-install version "so i can use it on my flash stick at uni" and kinda just jumped into the deep end with coding and syntax makin small projects. "which is what i enjoy doing". Maybe in a month or two if i feel more proffesional and wish to up my game to the next level i will try out that package Still i feel we have got a little off-topic. We know we could use HotkeySet or _IsPressed to detect if the key is pressed, but for ethier to work they would need to know which keys to detect off. Which leads back to the orginal question of some-how finding out what keys the media control panel sends. Link to comment Share on other sites More sharing options...
guinness Posted October 17, 2011 Share Posted October 17, 2011 (edited) Still i feel we have got a little off-topic.Perhaps, but you can't jump in at the deep end without having the proper knowledge or tools to aid in helping you. Look at AutoIt Portable in my signature if you want to carry it on a USB drive. Which leads back to the original question of some-how finding out what keys the media control panel sends.Look at _IsPressed() and the available key codes, then using a process of elimination find out which key is pressed when you push the remote button(s). Edited October 17, 2011 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
IanN1990 Posted October 17, 2011 Author Share Posted October 17, 2011 Hmm ok but i dont think it will work cuz the list referes almost completely to keybaord buttons. The item is not a keybaord, and i dont see anything in the list that would reflct media control buttons "Next, pause, stop, volume up, mute, volume down etc" and all of that side. The "link" button on the control is something unqiue i cant imagie the the small list having it In any event advice has been givien and i would be blind to not even try it out I will report my findings once i have Link to comment Share on other sites More sharing options...
IanN1990 Posted October 17, 2011 Author Share Posted October 17, 2011 (edited) Ok So i wrote out expandcollapse popup#include <Misc.au3> $dll = DllOpen("user32.dll") While 1 Sleep ( 50 ) If _IsPressed("01", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("02", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("04", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("05", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("06", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("09", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("0C", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("0D", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("10", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("11", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("12", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("13", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("14", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("15", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("16", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("1B", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("20", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("21", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("22", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("23", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("24", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("25", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("26", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("27", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("28", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("29", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("2A", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("2B", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("2C", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("2D", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("2E", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("30", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("31", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("32", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("33", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("34", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("35", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("36", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("37", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("38", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("39", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("40", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("41", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("42", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("43", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("44", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("44", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("45", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("46", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("47", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("48", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("49", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("4A", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("4B", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("4C", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("4D", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("4D", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("4E", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("4F", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("50", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("51", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("52", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("53", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("54", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("55", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("56", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("57", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("58", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("59", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("5A", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("5B", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("5C", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("60", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("61", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("62", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("63", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("64", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("65", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("66", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("67", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("68", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("69", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("6A", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("6B", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("6C", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("6D", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("6E", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("6F", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("70", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("71", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("72", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("73", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("74", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("75", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("76", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("77", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("78", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("79", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("7A", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("7B", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("7C", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("7C", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("7D", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("7E", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("7F", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("80H", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("80I", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("80J", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("90", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("91", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("A0", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("A1", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("A2", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("A3", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("A4", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("A5", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("BA", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("BB", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("BC", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("BD", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("BE", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("BF", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("C0", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("DB", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf If _IsPressed("02", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf WEnd DllClose($dll) Ran the code, tested it with 15 different keys to make sure its working as intended and then used my remote control to find no message box. Meaning the control being send by the remote, doesn't match up to any listed in the index Edited October 17, 2011 by IanN1990 Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted October 17, 2011 Share Posted October 17, 2011 Why don't you just use a For-loop instead of repeating all that code? #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 Sleep(250) For $iX = 1 To 254 If _IsPressed(Hex($iX), $dll) Then ConsoleWrite("0x" & Hex($iX, 2) & @LF) EndIf Next WEnd DllClose($dll) See MSDN for why 254. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
IanN1990 Posted October 17, 2011 Author Share Posted October 17, 2011 (edited) ahh its poking me *hides* XD i did think about it, but again a notive it would of been faster to write out all of that using a copy/paste and excel to stack the numbers up by 1 rather then do a complex but effective code *PS i didn't think it would work for all of them as it would go 1 - 254 missing out 4A, 4B etc but anyways live and learn Fantastic job i think your code has done the treat 0xB3 = Play/Pause 0xB1 = Prev Song 0xB0 = Next song 0xB2 = Stop 0xAF = vol up 0xAE = Vol Dom 0xAD = Mute It could not detect the link button, which is a shame this could be hardware related and thus cant be be perhaps. Still now i have some names i can work onto the next step of programing some commands to go with them Edited October 17, 2011 by IanN1990 Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted October 17, 2011 Share Posted October 17, 2011 But 4A is only 74... .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
IanN1990 Posted October 17, 2011 Author Share Posted October 17, 2011 #include $dll = DllOpen("user32.dll") While 1 Sleep ( 250 ) If _IsPressed("B3", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf WEnd DllClose($dll) Just tryed that out, pressed the pause on my media control and the msgbox came up So its a huge success. Thanks for your time in this little project Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted October 17, 2011 Share Posted October 17, 2011 (edited) Good, now you can use those keys in HotKeySet() (if you don't want whatever app has focus to get the keys too) Edited October 17, 2011 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
IanN1990 Posted October 17, 2011 Author Share Posted October 17, 2011 Thats a good idea but i tryed $dll = DllOpen("user32.dll") HotKeySet({"B3", $dll} "_Stop") While 1 Sleep(100) WEnd Func _Stop() MsgBox(0,"_IsPressed", "Stop") EndFunc ;==>_ScrollLock and it didn't work, In the keypress "{"B3", $dll}" worked like a charm so is there a different syntax i need to use for hotkeys ? Link to comment Share on other sites More sharing options...
JohnOne Posted October 17, 2011 Share Posted October 17, 2011 74 is J (uppercase) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
guinness Posted October 17, 2011 Share Posted October 17, 2011 (edited) I see you're making progress now! HotKeySet uses different syntax, example use >> HotKeySet("^c", "_Function") ; ^ = Ctrl, look in Send() to see the correct syntax. While 1 Sleep(100) WEnd Func _Function() ToolTip(ClipGet()) EndFunc ;==>_FunctionSo from doing a little searching B3 appears to be Player Start/Pause >> so try HotKeySet("{MEDIA_PLAY_PAUSE}", "_Function") instead. Look in the example for Send() to get an idea of the 'user friendly' key names. Edited October 17, 2011 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 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