Sign in to follow this  
Followers 0
ittorref

Problem with HotKeySet

7 posts in this topic

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.

Share this post


Link to post
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

#)

Share this post


Link to post
Share on other sites

Thank you very much nfwu !!

Here is the difference between a beginner like me and a real programmer like you

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
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)

#)

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Thanks mega,

The nfwu's solution is good for me.

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