Jump to content

delayed function


Jotos
 Share

Go to solution Solved by mistersquirrle,

Recommended Posts

Hello,
the following situation:

The code is running in a while loop.
But I want to start a function manually sometimes. I have realized this with a HotKeySet.

The problem now is that the function that I start manually is always delayed.

How can I change this?

Link to comment
Share on other sites

  • Solution

Indeed, you'll need to show your code, as I have no issues/delays with launching a function with a hotkey:

HotKeySet('\', '__Func')
HotKeySet('{ESC}', '__Exit')

While 1
    Sleep(10)
WEnd

Func __Func()
    MsgBox(0,'Test','Test', 3)
EndFunc

Func __Exit()
    Exit
EndFunc

It might be possible that you have some other blocking function happening when you press the hotkey, so it's queued until it's able to actually process it.

We ought not to misbehave, but we should look as though we could.

Link to comment
Share on other sites

  • 2 weeks later...

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
 Share

  • Recently Browsing   0 members

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