Search found 52 matches

by emanate22
02 Jun 2022, 08:15
Forum: Ask for Help (v1)
Topic: How to make a scroll wheel macro to prevent accidental touch Topic is solved
Replies: 3
Views: 399

Re: How to make a scroll wheel macro to prevent accidental touch Topic is solved

This turns off the wheel, but keeps the MButton functional: *Wheeldown:: *Wheelup:: *Wheelleft:: *Wheelright:: return *MButton:: MsgBox, MButton works ! return I want the scroll wheel to be turned off when the middle button is pressed. Because my scroll wheel is easier to accidentally touch.
by emanate22
02 Jun 2022, 07:47
Forum: Ask for Help (v1)
Topic: How to make a scroll wheel macro to prevent accidental touch Topic is solved
Replies: 3
Views: 399

How to make a scroll wheel macro to prevent accidental touch Topic is solved

For example, when I press the middle button down, I don't want to trigger the scroll wheel, what command should I use? Thanks.

Code: Select all

Mbutton::
return

Mbutton up::
return

WheelDown::
;sendinput 
return

Wheelup::
;sendinput 
return
by emanate22
27 Apr 2022, 07:33
Forum: Ask for Help (v1)
Topic: Why does the soundplay command play a file invalid
Replies: 1
Views: 144

Why does the soundplay command play a file invalid

Soundplay not working but Soundbeep works. So it's not a problem with the speaker settings.Play.Push doesn't work either. It was available when I wrote this script half a year ago. So the path is correct. Tested with other files also does not work. Not sure but it seems to be caused by a decoder upd...
by emanate22
03 Apr 2022, 00:47
Forum: Ask for Help (v1)
Topic: How to execute a macro with a command Topic is solved
Replies: 1
Views: 247

How to execute a macro with a command Topic is solved

For example.I want to execute the left macro when reloading the script.
Send {left} is definitely useless.goto command is useless too.
How to execute the left macro with one line? Thanks

Code: Select all

send {left}
left::
{
;900 lines of content
}
return

F12::reload
return
by emanate22
26 Jan 2022, 07:53
Forum: Ask for Help (v1)
Topic: How should I write this alt+tab macro? Topic is solved
Replies: 2
Views: 337

Re: How should I write this alt+tab macro? Topic is solved

Hallo, try (not tested with FindText()): $!Tab:: Text:="|<>*70$28. " if (ok:=FindText(1879, 3, 1915, 41, 0, 0, Text)) { } else { KeyWait, Tab Send, {Alt down}{tab} } return no need that keywait after test it $!Tab:: Text:="|<>*70$2" if (ok:=FindText(1879, 3, 1915, 41, 0, 0, Text)) { } else { Send, ...
by emanate22
25 Jan 2022, 23:59
Forum: Ask for Help (v1)
Topic: How should I write this alt+tab macro? Topic is solved
Replies: 2
Views: 337

How should I write this alt+tab macro? Topic is solved

Start alt+tab if findtext does not find an image. This can only enter tab at present.

Code: Select all

$!Tab::
Text:="|<>*70$28. "
if (ok:=FindText(1879, 3, 1915, 41, 0, 0, Text))
{
}
else
{
sendinput {alt down}
sleep,1
sendinput {Tab}
sleep,1
sendinput {alt up}
}
return
by emanate22
16 Jan 2022, 23:24
Forum: Ask for Help (v1)
Topic: How to save the coordinate library in the form of excel or txt Topic is solved
Replies: 3
Views: 281

Re: How to save the coordinate library in the form of excel or txt Topic is solved

I used findtext to find the color of a single pixel Why FindText() instead of PixelGetColor? You mean you have it capturing every pixel’s color in a defined area? Why save what’s in an array to a bunch of pseudo-array elements? Or is that commented out because you don’t intend to do that? My target...
by emanate22
16 Jan 2022, 22:52
Forum: Ask for Help (v1)
Topic: How to save the coordinate library in the form of excel or txt Topic is solved
Replies: 3
Views: 281

How to save the coordinate library in the form of excel or txt Topic is solved

I used findtext to find the color of a single pixel, so there are thousands of coordinates. How to save them as txt or excel? I need to use them in another ahk script to compare whether my target is included in these coordinates library. Text:="|<>000000-141414$1.k" if (ok:=FindText(465, 922, 579, 1...
by emanate22
12 Jan 2022, 23:36
Forum: Ask for Help (v1)
Topic: Is there a tool for drawing circles?
Replies: 1
Views: 367

Is there a tool for drawing circles?

For example. Pressing the button is the center of the circle, and the distance from where the button is released to the center is the radius, and then a circle is generated(thinnest border only, everything else is transparent) May be made with gui. Is there any similar tool like that, just for measu...
by emanate22
10 Jan 2022, 08:58
Forum: Ask for Help (v1)
Topic: How to convert two values into time format to do the calculation? Topic is solved
Replies: 5
Views: 502

Re: How to convert two values into time format to do the calculation? Topic is solved

mikeyww wrote:
10 Jan 2022, 08:48

Code: Select all

min       := 20
second    := 59
T         := g * 60 / 160
starttime := Format("2020010102{:02}{:02}", min, second)
starttime += -T, S
FormatTime, time, %starttime%, mm:ss
MsgBox, 64, Starting time from %min%:%second%, %time%
perfect
by emanate22
10 Jan 2022, 08:45
Forum: Ask for Help (v1)
Topic: How to convert two values into time format to do the calculation? Topic is solved
Replies: 5
Views: 502

Re: How to convert two values into time format to do the calculation? Topic is solved

Hallo, try: min:=20 ;example second:=59 ;example Time += -min, Minutes ; = Now - 20 Minutes Time += -second, Seconds MsgBox,% Time ; = Now - 20 Minutes - 59 Seconds Sorry, I may not explain clearly. The min and second I gave are a set of stopwatch time, not the current time. I want use this time an...
by emanate22
10 Jan 2022, 08:05
Forum: Ask for Help (v1)
Topic: How to convert two values into time format to do the calculation? Topic is solved
Replies: 5
Views: 502

How to convert two values into time format to do the calculation? Topic is solved

I have used the findtext() function to get the time in text form. How do I convert the two values of minutes and seconds into time format. I need to do a subtraction calculation, subtract T seconds from the current time, and find out the starting time. min:=20 ;example second:=59 ;example T=g*60/160...
by emanate22
29 Dec 2021, 04:04
Forum: Ask for Help (v1)
Topic: How to make a countdown of a pie chart
Replies: 4
Views: 311

Re: How to make a countdown of a pie chart

Hallo, I had once done something similar: q::CountDown(22,500,300) Return CountDown(No,X:=0,Y:=0,Dia:=100,Time_No:=1000) { ; StartNumber(<10000), Position X,Y, Diameter, Time(>300)/(ms Number) Static N, Colors:=["Green","White"], SF:= [.60,.44,.31,.25], YF:= [-.06,.08,.22,.27] NL := StrLen(N:=Round...
by emanate22
29 Dec 2021, 02:23
Forum: Ask for Help (v1)
Topic: How to make a countdown of a pie chart
Replies: 4
Views: 311

How to make a countdown of a pie chart

How to make a countdown of a pie chart? Use gui command? I need a white one, it will be part green and then becomes all green after the countdown is complete. Can anyone give me an example?Many thanks { Tick3 := 22 SetTimer, Timer3, 1000, Return Timer3: if Tick3-- Gui,2:Hide, else { SetTimer, Timer3...
by emanate22
30 Nov 2021, 20:51
Forum: Ask for Help (v1)
Topic: Does anyone know how to abbreviate these command(part findtext() function)
Replies: 4
Views: 554

Re: Does anyone know how to abbreviate these command(part findtext() function)

Loop,200 Cx%A_Index%:=ok[A_Index].x, Cy%A_Index%:=ok[A_Index].y, Loop,200 DistA%A_Index%:=Sqrt(((Cx%A_Index%-DxA)*(Cx%A_Index%-DxA)+(Cy%A_Index%-DyA)*(Cy%A_Index%-DyA))) DistA:= 1.7976931348623157E+308 ; FloatMax Loop,200 IF DistA%A_Index% DistA:= Min(DistA,DistA%A_Index%) Loop,200 if DistA%A_Index...
by emanate22
30 Nov 2021, 20:41
Forum: Ask for Help (v1)
Topic: Does anyone know how to abbreviate these command(part findtext() function)
Replies: 4
Views: 554

Re: Does anyone know how to abbreviate these command(part findtext() function)

Try: loop, 20 { cx1 := ok[A_Index].x cy1 := ok[A_Index].y } However, I don’t see why you would want to assign array values to a series of individual variables. Why do you want to do that? You can/should do your subsequent calculations/assignments using the array elements. And you should use a loop ...
by emanate22
30 Nov 2021, 08:29
Forum: Ask for Help (v1)
Topic: How to make Min(Number1 , Number2, ...) no longer output null values Topic is solved
Replies: 3
Views: 364

Re: How to make Min(Number1 , Number2, ...) no longer output null values Topic is solved

Hallo, try: DistA2 = 4 DistA7 = 7 DistA := 1.7976931348623157E+308 ; FloatMax Loop, 9 IF DistA%A_Index% DistA := Min(DistA, DistA%A_Index%) MsgBox,% DistA or: DistA2 = 4 DistA7 = 7 DistA:= Min0(DistA1,DistA2,DistA3,DistA4,DistA5,DistA6,DistA7,DistA8,DistA9) MsgBox,% DistA Min0(params*) { Min := 1.7...
by emanate22
30 Nov 2021, 07:36
Forum: Ask for Help (v1)
Topic: Does anyone know how to abbreviate these command(part findtext() function)
Replies: 4
Views: 554

Does anyone know how to abbreviate these command(part findtext() function)

Does anyone know how to abbreviate these commands. Some use the findtext() function.The following commands are too long because there are 200 coordinates, so I only gave 20 examples. Is there a way to abbreviate them(maybe using algebra)? DxA:=77,DyA:=838 wheelup:: t1:=A_TickCount, Text:="" if (ok:=...
by emanate22
30 Nov 2021, 07:14
Forum: Ask for Help (v1)
Topic: How to make Min(Number1 , Number2, ...) no longer output null values Topic is solved
Replies: 3
Views: 364

How to make Min(Number1 , Number2, ...) no longer output null values Topic is solved

Min [v1.1.27+] Returns the minimum value of one or more numbers. Value := Min(Number1, Number2, ...) If one of the input values is non-numeric, an empty string is returned. The function description says that if there is a non-number, it outputs a null value. How can I find the minimum value regardle...
by emanate22
30 Aug 2021, 07:40
Forum: Ask for Help (v1)
Topic: How to make the max and min functions not output null values? Topic is solved
Replies: 4
Views: 318

Re: How to make the max and min functions not output null values? Topic is solved

Give this a try: xPositions := [], yPositions := [] Loop, 20 { if (ok[A_Index].x != "" && ok[A_Index].y != "") { xPositions.push(ok[A_Index].x) yPositions.push(ok[A_Index].y) } } Xmin := Min(xPositions*) Ymin := Min(yPositions*) Xmax := Max(xPositions*) Ymax := Max(yPositions*) See: variadic functi...

Go to advanced search