Jump to content

Recommended Posts

Posted

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
Posted

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 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

 

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

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Posted

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.

  • Moderators
Posted

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 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

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...