Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

How can I make mouse as a keyboard without repeat when I hold it?



  • Please log in to reply
12 replies to this topic
Clone2
  • Members
  • 8 posts
  • Last active: Oct 03 2014 07:08 AM
  • Joined: 19 Mar 2013

What really I want is: When I press and hold "up"arrow, it will do left click and hold it (no repeat) within certain coordinate (such as 1226, 631). And when I release the "up"arrow, it will stop holding the left click.

 

Please help me, I need it very much... Thank in advance. I want to play game in bluestack with keyboard.

 

Maybe it can be a hint:

 

~~~
Moving the Mouse Cursor via the Keyboard
~~~
*#up::MouseMove, 0, -10, 0, R  ; Win+UpArrow hotkey => Move cursor upward
*#Down::MouseMove, 0, 10, 0, R  ; Win+DownArrow => Move cursor downward
*#Left::MouseMove, -10, 0, 0, R  ; Win+LeftArrow => Move cursor to the left
*#Right::MouseMove, 10, 0, 0, R  ; Win+RightArrow => Move cursor to the right

*<#RCtrl::  ; LeftWin + RightControl => Left-click (hold down Control/Shift to Control-Click or Shift-Click).
SendEvent {Blind}{LButton down}
KeyWait RCtrl  ; Prevents keyboard auto-repeat from repeating the mouse click.
SendEvent {Blind}{LButton up}
return

*<#AppsKey::  ; LeftWin + AppsKey => Right-click
SendEvent {Blind}{RButton down}
KeyWait AppsKey  ; Prevents keyboard auto-repeat from repeating the mouse click.
SendEvent {Blind}{RButton up}
return
~~~


Masonjar13
  • Members
  • 1517 posts
  • Last active:
  • Joined: 16 Sep 2012

Here, this is a script I wrote myself and use actively every day, no problems.

Spoiler

Tell me how that works for you ^_~


OS: Windows 7 Ultimate / Windows 8.1 Pro | Editor: Notepad++


Clone2
  • Members
  • 8 posts
  • Last active: Oct 03 2014 07:08 AM
  • Joined: 19 Mar 2013

That's a great script. It make my keyboard like a mouse completely.

But, back to my question above. What really I want is: When I press and hold "up"arrow, it will do left click and hold it (no repeat) within certain coordinate (such as 1226, 631). And when I release the "up"arrow, it will stop holding the left click.

 

Can you just give a script that I request?I only need that...

It's my script to play zenonia 5 in bluestack (Resolution 1366X768):
 

*z::MouseClick left, 1226, 631
return

*x::MouseMove, 209, 565
return

*a::MouseClick left, 1071, 672
return

*s::MouseClick left, 1081, 574
return

*d::MouseClick left, 1151, 497
return

*f::MouseClick left, 1260, 485
return

*q::MouseClick left, 1282, 312
return

c::MouseClickDrag, left, 1081, 574, 1151, 497


;NOTE
;z = attack
;x = go to d-pad, use your mouse to move
;a = slot 1
;s = slot 2
;d = slot 3
;f = slot 4
;q = menu
;c = change slot (skill or item)

This ("x" button (to point the d-pad instantly) + mouse to move)  bother me enough to move although it help me a little. I wish, I can change this ("x" button + mouse to move) with "up","down", rigth", and "left" to move.
If I use with my simple script above, when I hold the button, it will do auto-repeat. What must I do?
Thank for answer my question...grin.png



fifthfreedom
  • Members
  • 12 posts
  • Last active: Apr 16 2017 02:56 PM
  • Joined: 09 Mar 2013
✓  Best Answer

This will do exactly what you ask and nothing more.  Just change the 100, 100 coordinates to the coordinates of your choosing.

 

up::
MouseMove, 100, 100
Send {LButton down}
While GetKeyState("up", "p")
  Sleep 100
Send {LButton up}
return



Clone2
  • Members
  • 8 posts
  • Last active: Oct 03 2014 07:08 AM
  • Joined: 19 Mar 2013

That's it. It works. Thank you very much... ^_^



Gatsby25
  • Members
  • 1 posts
  • Last active: Apr 14 2013 01:52 PM
  • Joined: 14 Apr 2013

uhmmm Clone2 can you type the coordinates you used in the script that the other guy used? we have the same resolution (1366x768)

 

THANK YOU in advance

:)))



robert_ilbrink
  • Members
  • 561 posts
  • Last active: Mar 10 2015 08:36 PM
  • Joined: 05 May 2012

If you don't want to "drag" by accident whilst holding you mousebutton, you could add...

up::
  MouseMove, 100, 100
  BlockInput, MouseMove
  Send {LButton down}
  While GetKeyState("up", "p")
    Sleep 100
  Send {LButton up}
  BlockInput, MouseMoveOff
return


aspero88
  • Members
  • 1 posts
  • Last active: Apr 28 2013 07:18 PM
  • Joined: 27 Apr 2013

can you add left and right i don`t know how to do left and right and to have slide..... for example when i tap up 2 time my character move fast can you help me pls



robert_ilbrink
  • Members
  • 561 posts
  • Last active: Mar 10 2015 08:36 PM
  • Joined: 05 May 2012

Have you looked at the mouse click help pages before asking these questions? Judging from the question about left right mouse buttons, it seems that you did not even take the initiative to look this up. DO that first, write your script and when it doesn't work, show what you have and ask for help.



rtmoose
  • Members
  • 10 posts
  • Last active: Dec 16 2013 03:33 AM
  • Joined: 12 Nov 2013

Here, this is a script I wrote myself and use actively every day, no problems.

Spoiler

Tell me how that works for you ^_~

 

 

hi there.. this script is exactly what i need..

 

however, can you please show me what to change in order to

 

a) make it work with the wsad keys

 

B) work ONLY when i have PGUP key pressed

 

I have no idea how to code these scripts so please be clear in your explanation



Masonjar13
  • Members
  • 1517 posts
  • Last active:
  • Joined: 16 Sep 2012

You simply have to change the hotkeys. I don't necessarily care to put in the work to make it only work with Page Up pressed; it seems a bit ridiculous. If you want that, you'll have to do it yourself :)


OS: Windows 7 Ultimate / Windows 8.1 Pro | Editor: Notepad++


Clone2
  • Members
  • 8 posts
  • Last active: Oct 03 2014 07:08 AM
  • Joined: 19 Mar 2013

 

If you don't want to "drag" by accident whilst holding you mousebutton, you could add...

up::
  MouseMove, 100, 100
  BlockInput, MouseMove
  Send {LButton down}
  While GetKeyState("up", "p")
    Sleep 100
  Send {LButton up}
  BlockInput, MouseMoveOff
return

Thanks for this addition info...^_^

By the way, I'm thinking for this script again so that this script can be better to be used...

 

How to make this script can be used as diagonal pressed in keyboard?
For example, I want to press "Upper left", so what I must to do to make "up" and "left" in my keyboard can be pressed as "upper left"??
Thanks in advance... :D



Masonjar13
  • Members
  • 1517 posts
  • Last active:
  • Joined: 16 Sep 2012

If you look at my mouse script, it's in there under each hotkey. It checks if one of the other keys is pressed as well and if up/down is combined with left/right, it moves with both combinations in mind.


OS: Windows 7 Ultimate / Windows 8.1 Pro | Editor: Notepad++