Issues with click and drag mouse

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
yonycool
Posts: 1
Joined: 22 May 2017, 10:30

Issues with click and drag mouse

22 May 2017, 10:37

Hi!
I built a script than Clicks a specific point on screen, and It all worked out with Click.
But when I wanted to Click a certain point and and than take what was clicked and move it to another point on the screen, When using Click, it sometimes moves too fast, and releases what i was holding.
So when I converted what I need to MouseClickDrag, it won't let my script run, and it gives me an error.
I need to be able to MouseClickDrag from current point fast, but not too fast so it teleports the mouse.
This is what I have:

Code: Select all

#IfWinActive Hearthstone
^z:: Click 634, 1009 ; Card 1
^x:: Click 695, 1009 ; Card 2
^c:: Click 759, 1009 ; Card 3
^v:: Click 820, 1009 ; Card 4
^b:: Click 879, 1009 ; Card 5
^n:: Click 938, 1009 ; Card 6 
^m:: Click 1000, 1009 ; Card 7
^,:: Click 1065, 1009 ; Card 8
^.:: Click 1128, 1009 ; Card 9
^/:: Click 1159, 1009 ; Card 10


^h:: MouseClickDrag, Left , ,  960, 822 [, 20 , R ] ; Hero
^p:: Click 1141, 822 ; Hero Power

^F2:: MouseClickDrag, Left , ,  960, 200 [, 20 , R] ; Enemy Hero
^F3:: Click 1141, 200 ; Enemy Hero Power

^F4:: Click 1560, 490 ; End Turn	

^F5:: Click 1630, 600 ; Deck
^F6:: Click 1630, 350 ; Enemy Deck

^F7:: Click 970, 20 ; Enemy Hand


^a:: MouseClickDrag, Left , , 956, 578 [, 20 , R ] ; 1 Minion on Board, middle minion when 3,5,7 cards are on board
^s:: MouseClickDrag, Left , , 895, 578 [, 20 , R ] ; Left minion when 2 minions are on board, Second minion from left when 4 minions on board, 3rd minion from left when 6 cards on board
^d:: MouseClickDrag, Left , , 1027, 578 [, 20 , R ] ; Right minion when 2 minions are on board, Third minion from left when 4 mionions on board, Fourth minion from left when 6 cards on board
^f:: MouseClickDrag, Left , , 820, 578 [, 20 , R ] ; Left minion when 3 minions are on board, Second minion from left when 5 minions on board, Third minion from left when 7 cards on board
^g:: MouseClickDrag, Left , , 1100, 578 [, 20 , R ] ; Right minion when 3 mionions are on board, Fourth minion from left when 5 minions on board, Fifth minion from left when 7 cards on board
^j:: MouseClickDrag, Left , , 750 , 578 [, 20 , R ] ; Left minion when 4 minions are on board, Second minion from left when 6 cards on board
^k:: MouseClickDrag, Left , , 1170, 578 [, 20 , R ] ; Right minion when 4 minions are on board, Fifth minion from left when 6 cards on board
^l:: MouseClickDrag, Left , , 680, 578 [, 20 , R ] ; Left minion when 5 minions on board, Second minion from left when 7 cards on board
^;:: MouseClickDrag, Left , , 1240, 578 [, 20 , R ] ; Right minion when 5 minions on board, Sixth minion from left when 7 cards on board
^':: MouseClickDrag, Left , , 620 , 578 [, 20 , R ] ; Left minion when 6 minions on board
^\:: MouseClickDrag, Left , , 1310, 578 [, 20 , R ] ; Right minion when 6 minions on board
^q:: MouseClickDrag, Left , , 540, 578 [, 20 , R ] ; Left minion when 7 minions on board
^w:: MouseClickDrag, Left , , 1380, 578 [, 20 , R ] ; Right minion when 7 cards on board


^1:: MouseClickDrag, Left , , 956, 400 [, 20 , R ] ; 1 Minion on Board, middle minion when 3,5,7 cards are on board - ENEMY
^2:: MouseClickDrag, Left , , 895, 400 [, 20 , R ] ; Left minion when 2 minions are on board, Second minion from left when 4 minions on board, 3rd minion from left when 6 cards on board - ENEMY
^3:: MouseClickDrag, Left , , 1027, 400 [, 20 , R ] ; Right minion when 2 minions are on board, Third minion from left when 4 mionions on board, Fourth minion from left when 6 cards on board - ENEMY
^4:: MouseClickDrag, Left , ,  820, 400 [, 20 , R ] ; Left minion when 3 minions are on board, Second minion from left when 5 minions on board, Third minion from left when 7 cards on board - ENEMY
^5:: MouseClickDrag, Left , ,  1100, 400 [, 20 , R ] ; Right minion when 3 mionions are on board, Fourth minion from left when 5 minions on board, Fifth minion from left when 7 cards on board - ENEMY
^6:: MouseClickDrag, Left , ,  750 , 400 [, 20 , R ] ; Left minion when 4 minions are on board, Second minion from left when 6 cards on board - ENEMY
^7:: MouseClickDrag, Left , ,  1170, 400 [, 20 , R ] ; Right minion when 4 minions are on board, Fifth minion from left when 6 cards on board - ENEMY
^8:: MouseClickDrag, Left , ,  680, 400 [, 20 , R ] ; Left minion when 5 minions on board, Second minion from left when 7 cards on board - ENEMY
^9:: MouseClickDrag, Left , ,  1240, 400 [, 20 , R ] ; Right minion when 5 minions on board, Sixth minion from left when 7 cards on board - ENEMY
^0:: MouseClickDrag, Left , ,  620 , 400 [, 20 , R ] ; Left minion when 6 minions on board - ENEMY
^-:: MouseClickDrag, Left , ,  1310, 400 [, 20 , R ] ; Right minion when 6 minions on board - ENEMY
^=:: MouseClickDrag, Left , ,  Click 540, 400 [, 20 , R ] ; Left minion when 7 minions on board - ENEMY
^F1:: MouseClickDrag, Left , ,  1380, 400 [, 20 , R ] ; Right minion when 7 cards on board - ENEMY




Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: ArkuS and 208 guests