Guest robert Posted September 5, 2005 Share Posted September 5, 2005 Greetings to all of youFirstly, I would like to take this opportunity to thank all the people involved who have contributed to help this awesome software evolve. Keep up the great work I have a relatively simple query (for you folks) but not so simple for someone like me :"> who isnt too well versed with script writing and I truly hope someone can assist me with solving my problem. I would like to create two hotkeys as per the following.The First Hotkey is I would like to assign a Hotkey to the Insert button. The action that it should trigger would be (sequence of keys that the Hotkey should emulate) NumEnter (the Enter key on the Numeric Keypad) followed by the Right Control (RCtrl).The Second Hotkey is I would like to assign a Hotkey to the * button on the Numeric Keypad. The action that it should trigger would be (sequence of keys that the Hotkey should emulate) Shift F3, Up Arrow, TAB, Up Arrow, TAB, Backspace, TAB, Backspace, TAB, Up Arrow, NumEnter, Right Control.PLEASE NOTE For BOTH these Hotkeys - ONLY the Num Enter key on the Numeric Keypad will work for this software where I intend using this hotkey. The other Enter key will NOT work. Similarly, ONLY the Right Control key will work for this software where I intend using this hotkey. The Left Control key will NOT work.I earnestly request someone to please forward a ready-made script one which I can cut and paste so as to avail these hotkeys. Also, I would like to use both these Hotkeys in the same program. If there is a way that AutoIt can be told to trigger these Hotkeys ONLY in this software then please include those details in this script something like run only when this Window is Active or on Top etc. The name of the Window for this software is NEAT.Your assistance for the above would be highly appreciated and Thanx! in advance Regards,Robert Goodman Link to comment Share on other sites More sharing options...
Gigglestick Posted September 5, 2005 Share Posted September 5, 2005 (edited) See the HotKeySet documentation. It says the NumPad's Enter key cannot be used as a HotKey. Search the forum for a DllCall for hotkeys. I think there's a DLL you can tap into that can watch for that specific key. As for the other keys: HotKeySet("{INSERT}", "_ProcessInsertKey") Func _ProcessInsertKey() Send("{ENTER}{RCTRL}") EndFunc Second hotkey: HotKeySet("{NUMPADMULT}", "_ProcessStarKey") Func _ProcessStarKey() Send("+{F3}{UP}{TAB}{UP}{BACKSPACE}{TAB}{BACKSPACE}{TAB}{UP}{ENTER}{RCTRL}") EndFunc *EDIT* As for the NumPadEnter, you'll have to search the forum. I don't know how to trap that specific key if HotKeySet doesn't do it. Edited September 5, 2005 by c0deWorm My UDFs: ExitCodes Link to comment Share on other sites More sharing options...
Guest robert Posted September 5, 2005 Share Posted September 5, 2005 Hi! CodewormThank you so much for your post. I think there must have been some misunderstanding in what I have written. I do NOT want the Numpad Enter key AS a Hotkey - I would like to use it IN a Hotkey. The Numpad Enter key is simply one of the keys that features in the sequence for the Hotkey. Like for Example - I read the code that you have scripted for using the Insert key as a Hotkey - namely - HotKeySet("{INSERT}", "_ProcessInsertKey")Func _ProcessInsertKey() Send("{ENTER}{RCTRL}")EndFuncBUTthis Hotkey will NOT work if it isn't the Numpad Enter key that gets triggered. As I have two consecutive days holidays, I will be able to try this script only once I reach my office on 8/Sep/2005. I will revert back and let you know if it works. Meanwhile, can someone please let me know how I can overcome this Numpad Enter problem. Link to comment Share on other sites More sharing options...
BigDod Posted September 5, 2005 Share Posted September 5, 2005 HotKeySet("{INSERT}", "_ProcessInsertKey") Func _ProcessInsertKey() Send("{NUMPADENTER}{RCTRL}") EndFunc Try this Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Gigglestick Posted September 6, 2005 Share Posted September 6, 2005 HotKeySet("{INSERT}", "_ProcessInsertKey") Func _ProcessInsertKey() Send("{NUMPADENTER}{RCTRL}") EndFuncTry this<{POST_SNAPBACK}>Well slap my ass and call me Sally! I confused myself on it being the hotkey and being sent using Send. Nice catch, BigDod. Did this work for you, robert? My UDFs: ExitCodes Link to comment Share on other sites More sharing options...
Guest robert Posted September 6, 2005 Share Posted September 6, 2005 Did this work for you, robert?<{POST_SNAPBACK}>Well I am itching to try this code out. I can do so only on 8/Sep/2005. Will revert back to you folks once I experiment with it.Until then - Thank you a plenty for your continual support...By the way - I needed to know if it were possible to assign this Hotkey to work only in a program specific environment instead of having a Global setting. Like for example - NumPadMult should work as a Hotkey in a window called NEAT where I would like to use it and say as it's original function - that is - a multiplication key in the Calculator. Please do let me know the script / code for the same. 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