Jump to content

Problem with HotKeySet


Recommended Posts

Hello,

I use this script :

HotKeySet("{LEFT}", "FlG")

While 1

Sleep(50)

WEnd

Func FlG()

If StringInStr(WinGetTitle("Active"),"Paramétrage des écrans de saisie") Then

$pos = MouseGetPos()

MouseClickDrag("left",$pos[0],$pos[1],$pos[0]-1,$pos[1],0)

Else

HotKeySet("{LEFT}")

Send("{LEFT}")

HotKeySet("{LEFT}", "FlG")

EndIf

EndFunc

The first problem is when i press the left arrow to fast, it make a double-click and open a dialog box for the control i move that i don't want.

Is it possible to empty the "mouse buffer" after the MouseClikDrag ?

Thank you all.

Link to comment
Share on other sites

HotKeySet("{LEFT}", "FlG")

While 1
Sleep(50)
WEnd

Func FlG()
HotKeySet("{LEFT}")
If StringInStr(WinGetTitle("Active"),"Paramétrage des écrans de saisie") Then
$pos = MouseGetPos()
MouseClickDrag("left",$pos[0],$pos[1],$pos[0]-1,$pos[1],0)
Else
Send("{LEFT}")
EndIf 
HotKeySet("{LEFT}", "FlG")
EndFunc

#)

Link to comment
Share on other sites

HI,

not a very good solution, but you can also use blockinput(1) and the beginning of your function and then again at the end blockinput(0).

So long,

Mega

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

HI,

not a very good solution, but you can also use blockinput(1) and the beginning of your function and then again at the end blockinput(0).

So long,

Mega

That's why i disabled the {LEFT} hotkey, then reenables it after it does what it needs to do.

Your solution works but is not as effective (blocks all input)

#)

Link to comment
Share on other sites

That's why i disabled the {LEFT} hotkey, then reenables it after it does what it needs to do.

Your solution works but is not as effective (blocks all input)

#)

Thanks, I know. But I thought I could mention it, so that he´ll read it, too. :geek:

Maybe he needs to use BlockInput() elsewhere and is glad have read it before. :o

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
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
 Share

  • Recently Browsing   0 members

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