Jump to content

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

Clicks, y moving



  • Please log in to reply
5 replies to this topic
read416
  • Members
  • 33 posts
  • Last active: Oct 24 2015 01:13 AM
  • Joined: 24 Jul 2015

Hi,

Sending clicks to a window for columns of links. If it some 20 pixels vertical gaps, 30 between columns with 10 links each. Need base script for such routine - mouse movings cycles and send clicking. With ability changing pix height between links and columns, and numbers of links in. Everything about 50 pixels from left side.



boiler
  • Members
  • 252 posts
  • Last active: Nov 07 2015 09:39 PM
  • Joined: 04 Jun 2014
✓  Best Answer

This should get you started.  You can test on an MS Paint window.

CoordMode, Mouse, Screen
NumCols := 3
NumRows := 10
VertSpace := 20
HorizSpace := 120
MsgBox,, Position Cursor, Position cursor on the upper-left link and press Enter.
MouseGetPos, StartX, StartY
Loop, % NumCols
{
	DeltaRow := A_Index
	Loop, % NumRows
	{
		DeltaCol := A_Index
		MouseMove, % StartX + (DeltaRow - 1) * HorizSpace, % StartY + (DeltaCol - 1) * VertSpace
		Click
	}
}


read416
  • Members
  • 33 posts
  • Last active: Oct 24 2015 01:13 AM
  • Joined: 24 Jul 2015

Very good script. Thank you!



read416
  • Members
  • 33 posts
  • Last active: Oct 24 2015 01:13 AM
  • Joined: 24 Jul 2015

I'm added

Esc::ExitApp

to script end and now script icon not closing after script ending. Only if Esc was used. How closing it?



boiler
  • Members
  • 252 posts
  • Last active: Nov 07 2015 09:39 PM
  • Joined: 04 Jun 2014
You can add a line that just says ExitApp after the last line and before the line you added.

read416
  • Members
  • 33 posts
  • Last active: Oct 24 2015 01:13 AM
  • Joined: 24 Jul 2015

Thank you again.