pekster Posted June 30, 2004 Share Posted June 30, 2004 UDF: HotKeyLog (extension to HotKeySet)(Download it by clicking the Script Index link in my signature)Inspired by another thread, this UDF adds functionality to the existing HotKeys.Purpose:Currently you can set a hotkey to run a function, and clear that hotkey. However, you have no way to know if a given hotkey is associated with a function, or a function has a hotkey associated with it. When you set or remove hotkeys with this UDF, you gain the ability to do lookups (give it a hotkey, and it will report back what function, if any, is associated wtih it) and reverse lookups (give it a function, and it will report back any hotkey(s) that are associated with it.)Method:The UDF takes 3 paramaters, the first two of which can function just like the original HotKey function. You call it like this: HotKeyLog($key, $func, $matrix)The $key is the HotKey combination, and the $func is the name of the function. The $matrix variable must be an already defined global matrix (also known as a 2-dimention array) that can be any number of rows long.Use the following code to create your global matrix for use with future HotKeyLog calls like this: Global $HotKeyMatrix[1][2]You can then reference the $HotKeyMatrix when you call the HotKeyLog function, and it will update your log of all hotkeys.Features:This function has additional benefits for users who wish to to lookups or reverse lookups on HotKeys. These two methods are accepted:Lookups, where you give the HotKey and recieve back the function that is associated with that HotKey. Used like this:$function = HotKeyLog("!s", "-lookup", $matrix)The $matrix is that global matrix array I talked about aboveReverse Lookups, where you give the function name, and recieve back a list of all hotkeys that are associated with that function. Used like this:$HotkeyArray = HotKeyLog("-lookup", "my_func", $matrix)Once again, the $matrix variable is updated when you create or remove hotkeys with my function.You may download this function by clicking my Script Index link in my signature.Let me know what you think, and if you find it useful!Any suggestions, problems, or discussion is welcome. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
pekster Posted July 3, 2004 Author Share Posted July 3, 2004 My sincere apologies to anyone who has tried to use the project directory link (by clicking on the name of the "HotKeyLog" project on my index page.) I put the wrong link, so that actually linked to my ControlSendPlus project. The link has been corrected. The "direct download" link has been correct all along, however. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
edy Posted July 4, 2004 Share Posted July 4, 2004 My sincere apologies to anyone who has tried to use the project directory link (by clicking on the name of the "HotKeyLog" project on my index page.) I put the wrong link, so that actually linked to my ControlSendPlus project. The link has been corrected. The "direct download" link has been correct all along, however.With the Proxy "Microsoft Isa Server" it's not possible download file, the error is:---------------You are about to log into site "pekster.myftp.org" with usrname "scripting," but web website dows not require auththentication. This may be a attempt to trick you .Is "pekster.myftp.org" the site you want to visit?-----------------------------If I answer "Yes " i have the following error:--------------------------------200 Type successfully set200 command successfully executed550 "/HotKeyLog/HotKeyLog v1.0.zip" File/Directory not found------------------------- Link to comment Share on other sites More sharing options...
SlimShady Posted July 4, 2004 Share Posted July 4, 2004 @Pekster: You can remove the space in the filename. Maybe that'll help. Link to comment Share on other sites More sharing options...
pekster Posted July 4, 2004 Author Share Posted July 4, 2004 @Pekster:You can remove the space in the filename. Maybe that'll help.Done. Hope this helps. If not, see the workaround in the red text that was explained before to paste the project directory on the FTP into an explorer window. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
edy Posted July 4, 2004 Share Posted July 4, 2004 Done. Hope this helps. If not, see the workaround in the red text that was explained before to paste the project directory on the FTP into an explorer window. I have followed the workaround in the red text, using IE that firefox does not work (same error)best regards Link to comment Share on other sites More sharing options...
pekster Posted July 4, 2004 Author Share Posted July 4, 2004 Thanks edy. My server went down, so I changed to a different host. It should be back up. I'll edit the HTML tomorrow to include a comment about the server loosing its connection. The upshot of this is that you can now download the file. If you still can't (because my 2nd host died) just email me, but that really shouldn't remain offline for more than 60 seconds, and that only happends once a day. If it does, I've got some skull bashing to do [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
pekster Posted July 6, 2004 Author Share Posted July 6, 2004 Version 1.1 was released to fix a problem in 1.0. When doing a reverse lookup by function name, you would only get a string containing the first hotkey bound to that function on success. This should have been an array with the first element listing the number of results found. Version 1.1 corrects this problem and returns the array upon success. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. 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