Sign in to follow this  
Followers 0
Dariush

HotkeySet suddenly stopped working

8 posts in this topic

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?

Share this post


Link to post
Share on other sites



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!": :D

$iRet = HotKeySet("!t","Test")
MsgBox(0, "HotKey", $iRet)
While 1
    Sleep(10)
WEnd

Func Test()
    MsgBox(0,"",'This is a test')
EndFunc

If 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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 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


Active: IRC UDF, WindowEx UDF
Discontinued: GithubBubbleSort UDF

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

But I have no problems with Windows apart from AutoIt not seeing hotkeys. What has chkdsk got to do with that?

Share this post


Link to post
Share on other sites

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. :D

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

I'm sorry if I came off as rude, but really, using chkdsk seems like an overkill for such a localized error :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0