Random Action Tool Topic is solved

Ask gaming related questions (AHK v1.1 and older)
WhoIsALI
Posts: 11
Joined: 25 Feb 2020, 10:36

Random Action Tool

25 Feb 2020, 12:53

:wave: Hi there guys, i wrote this useful script Caller.ahk that does some action from 1 to 10 randomly each time it's called: Action 1.ahk, Action 2.ahk... till Action 10.ahk
https www2.0zz0.com /2020/02/25/20/637676873.png Broken Link for safety :terms:
Caller.ahk ----->

Code: Select all

		SetWorkingDir %A_ScriptDir%
		SplashTextOn, 90, 0, "Run" => F1 <=
		Sleep,1500
		SplashTextOn, 98, 0, "Reload" => F2 <=
		Sleep,1500
		SplashTextOn, 95, 0, "Exit" => Esc <=
		Sleep,1500
		SplashTextOff
	Esc::ExitApp
	F2::Reload
	F1::
	Random, Repeat, 1, 5
   Loop, %Repeat%
	     {
		Random, Action, 1, 10
		Sleep,800
		Run, Action (%Action%).ahk
		Action := %Action%*1000
		Sleep,%Action%
	     }
  return
I have problem with this Action number 7
Action 7.ahk ----->

Code: Select all

	Random, MouseX, 0, 1599
	Random, MouseY, 0, 899
	MouseMove, %MouseX%, %MouseY%, 100
	Sleep,10
	Click, %MouseX%, %MouseY%
To improve clicks done on Action 7.ahk i'm looking to creat a Clicks.txt file,
where the Action 7.ahk can load mouse coordinates and send them in order, line by line. :crazy:
My full Screen mouse coordinates.
0, 1599
0, 899
please guys help, becouse i searched and did not find anything similar. :beer:
Attachments
Untitled.png
Untitled.png (6.97 KiB) Viewed 788 times
AHK_user
Posts: 515
Joined: 04 Dec 2015, 14:52
Location: Belgium

Re: Random Action Tool  Topic is solved

25 Feb 2020, 14:15

Something like this?
In this example I do not used MouseMove, a little easier to test.

Code: Select all

#SingleInstance, Force

Data_coordinates=
(
100, 200
200, 200
400, 200
200, 600
200, 800
800, 200
)
Loop, Parse, Data_coordinates, `n, `r
{
	Arr_Coord:=StrSplit(A_LoopField, ",")
	MouseMove, % Arr_Coord[1], % Arr_Coord[2]
	sleep, 500
}
return

; Example to work with a file
Loop, read, C:\Coordinates.txt
{
	Arr_Coord:=StrSplit(A_LoopReadLine, ",")
	MouseMove, % Arr_Coord[1], % Arr_Coord[2]
	sleep, 500
}
return
WhoIsALI
Posts: 11
Joined: 25 Feb 2020, 10:36

Re: Random Action Tool

27 Feb 2020, 03:17

dear @AHK_user, that was helpful and inspired me to do more with my script,
thank you sir.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 108 guests