Dariush Posted December 16, 2011 Posted December 16, 2011 For several months I've been using this little script, but now it suddenly stopped working. #Include <String.au3> $dd = "" $title = "" HotKeySet("!t","Test") While 1 WEnd Func Test() MsgBox(0,"",'This is a test') EndFunc The script simply doesn't react to the hotkey. When it was working before, the alt+t hotkey (though I've tried others, no change) directly called the Test function without opening the menu in Firefox (where I'm using it), but now the menu opens and the function doesn't get called. If I put some code in the While 1 loop, it gets executed, so the hotkey gets set. But it doesn't work. Can someone please help?
Moderators Melba23 Posted December 16, 2011 Moderators Posted December 16, 2011 Dariush,Welcome to the AutoIt forum. Check if the HotKey has already been taken by another app. As they say in Highlander: "There can only be one!": $iRet = HotKeySet("!t","Test") MsgBox(0, "HotKey", $iRet) While 1 Sleep(10) WEnd Func Test() MsgBox(0,"",'This is a test') EndFuncIf you get a 0 in the MsgBox then that particular HotKey combination has been taken by another app. Have you installed anything else recently? And note the Sleep(10) I added in your loop - you do not want to fry your CPU so give it a bit of idle time. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
rcmaehl Posted December 16, 2011 Posted December 16, 2011 (edited) Do what Melba suggested first. If you don't get a 0 in the message box then: Scan your system for keyloggers/API intercepting functions using a program like Spybot - Search & Destory or AVZ (AVZ not AVG) as I find them best for detecting keyloggers. Edited December 16, 2011 by rcmaehl My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF
Dariush Posted December 17, 2011 Author Posted December 17, 2011 The above method gives 1. When I ran AVZ, it said Error - file not found (C:WINDOWSsystem32ntoskrnl.exe) Though I really doubt it has anything to do with it, since no hotkeys at all are recognized by autoit.
Bert Posted December 17, 2011 Posted December 17, 2011 run a chkdsk on your drive to check for errors The Vollatran project My blog: http://www.vollysinterestingshit.com/
Dariush Posted December 17, 2011 Author Posted December 17, 2011 But I have no problems with Windows apart from AutoIt not seeing hotkeys. What has chkdsk got to do with that?
Moderators Melba23 Posted December 17, 2011 Moderators Posted December 17, 2011 Dariush,You have asked for help. When help is offered by experienced forum members it seems a little churlish to question it. It is not normal for AutoIt not to honour the HotKeys you set - that is why I suggested checking that the particular key combination you wanted was not already taken by another app. It appears that is not the case - hence the assummption is there is something else wrong. So a first step could well be to run chkdsk and see if there are check your machine for any obvious errors. If there are, then that might solve the HotKey problem - if not, then someone will no doubt come up with another suggestion. As I said above, you have asked for help from the most experienced AutoIt coders available. Either listen to them or drop the whole thing - your choice. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Dariush Posted December 18, 2011 Author Posted December 18, 2011 I'm sorry if I came off as rude, but really, using chkdsk seems like an overkill for such a localized error
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