Search found 33 matches

by mexican scientist
07 Jan 2024, 17:59
Forum: Ask for Help (v1)
Topic: Help with activating code only on a Certain window.
Replies: 4
Views: 353

Re: Help with activating code only on a Certain window.

From Wikipedia: In 2023, IO rebranded Hitman 3 as Hitman: World of Assassination, with the contents of the previous two Hitman games becoming available to Hitman 3 owners. Run Window Spy to see the WinTitle information. It turns out that the title was in capital letters. HITMAN 3 Now it works, than...
by mexican scientist
07 Jan 2024, 00:32
Forum: Ask for Help (v1)
Topic: Help with activating code only on a Certain window.
Replies: 4
Views: 353

Help with activating code only on a Certain window.

There was a code I had like this: #IfWinActive, Hitman 3 code goes here... The code activated only one the window called "Hitman 3" But now, the code does not work. However, If i remove the line #IfWinActive, Hitman 3 , the code works, but it activates everywhere, and I just want the code to be avai...
by mexican scientist
14 Dec 2023, 20:54
Forum: Ask for Help (v1)
Topic: Help with a simple code with time, its driving me nuts!
Replies: 5
Views: 542

Re: Help with a simple code with time, its driving me nuts!

mikeyww wrote:
14 Dec 2023, 20:30
What is your belief about the role of the tilde in your hotkey, and why the tilde is necessary?
If I don't put that tilde, then the key is not registered in the video game that I am playing with the controller.
by mexican scientist
14 Dec 2023, 19:58
Forum: Ask for Help (v1)
Topic: Help with a simple code with time, its driving me nuts!
Replies: 5
Views: 542

Re: Help with a simple code with time, its driving me nuts!

If your controller maps a key to Space , it might act by sending the key down and then immediately up. I don't think it is sending the key down and then immediately up because on the controller If I press the mapped key for 1 second or longer, it behaves like a long press. The message box displays ...
by mexican scientist
14 Dec 2023, 19:10
Forum: Ask for Help (v1)
Topic: Help with a simple code with time, its driving me nuts!
Replies: 5
Views: 542

Help with a simple code with time, its driving me nuts!

~Space:: ; Triggered when the Space key is pressed StartTime := A_TickCount ; Record the start time KeyWait, Space ; Wait for the Space key to be released ElapsedTime := A_TickCount - StartTime ; Calculate the elapsed time MsgBox, Time elapsed: %ElapsedTime% milliseconds return The code works as ex...
by mexican scientist
02 Feb 2023, 01:23
Forum: Ask for Help (v1)
Topic: I need help with a radar code that is too slow
Replies: 1
Views: 254

I need help with a radar code that is too slow

I created a code that acts like a tiny radar that searches pixels around a center (108,520) and with varying radius going from 10 to 97. So, the first loop sets the radius, the second loop searches for all the angles and calculates the x and y coordinates. Then it uses the pixel search to test if th...
by mexican scientist
01 Feb 2023, 02:27
Forum: Ask for Help (v1)
Topic: I need help with a Radar code to search the Color of a pixel
Replies: 1
Views: 256

I need help with a Radar code to search the Color of a pixel

I asked ChatGpt AI this question: is it possible to make a code in AHK that acts like a radar to search a pixel with color 0xFF0000 in a circle that changes radius and whose center is (108,521) The AI answer yes and gave me this code Loop { for (radius = 1; radius <= 100; radius++) { for (angle = 0;...
by mexican scientist
01 Feb 2023, 00:14
Forum: Ask for Help (v1)
Topic: for loop is not showing a message box
Replies: 2
Views: 342

for loop is not showing a message box

Code: Select all

for x in 10 to 100 {
MsgBox % "x is: " x
}
what's wrong?
by mexican scientist
25 Jan 2023, 01:20
Forum: Ask for Help (v1)
Topic: How do i record keys, their press times and the times elapsed between presses?
Replies: 2
Views: 305

How do i record keys, their press times and the times elapsed between presses?

For example. Suppose I press "a" for 150 ms, then wait for 1500 ms and press "b" for 200 ms and wait 5000 ms, etc... I want to record any key that is being pressed and save the information to a file in the desktop with path: "C:\Users\user\Desktop\eso_path.txt" The format of the file should be: "key...
by mexican scientist
21 Jan 2023, 03:02
Forum: Gaming Help (v1)
Topic: PixelSearch
Replies: 2
Views: 370

Re: PixelSearch

If I understand what you mean, then take a picture of your game by pressing the "print screen" button on the key board, then go to https://pixspy.com/ and paste it with ctrl + v. In that page, you will find the coordinates of every single pixel of the monitor picture that you took. You can move the ...
by mexican scientist
20 Jan 2023, 01:56
Forum: Gaming Help (v1)
Topic: Need help with a simple simple problem that seems complicated.
Replies: 3
Views: 387

Re: Need help with a simple simple problem that seems complicated.

Why would you use an unmodified m for a hotkey if you don't want it to fire when typing? because its for a video game that when you press the "m" key it opens the video game map. I have made the hotkey "~m::" so that when I press "m" it opens the map, it focuses the map, it aligns the map, and many...
by mexican scientist
19 Jan 2023, 23:35
Forum: Gaming Help (v1)
Topic: Need help with a simple simple problem that seems complicated.
Replies: 3
Views: 387

Need help with a simple simple problem that seems complicated.

I have a code with hotkey ~m:: ~m:: the code is long and it performs many things. So, when I press the "enter" key and start typing words, like "army" or "Permanent" or any word that contains the letter "m", the code executes. I don't want the hotkey "~m::" to activate when I am typing! How can I fi...
by mexican scientist
12 Jan 2023, 14:38
Forum: Ask for Help (v1)
Topic: I need help ending a script and being ready for the next key press. Topic is solved
Replies: 1
Views: 154

I need help ending a script and being ready for the next key press. Topic is solved

this is my code #IfWinActive, Elder Scrolls Online z:: sleep, 11000 SetTimer, CheckColor, 1000 CheckColor: CoordMode, Pixel, Screen PixelSearch, X, Y, 1263, 958, 1371, 965, 0xF0463B, 10 If ErrorLevel = 0 { Send, {f} sleep, 5000 Send, {f} sleep, 100 PixelSearch, X, Y, 1093, 640, 1099, 644, 0x000000, ...
by mexican scientist
12 Jan 2023, 00:15
Forum: Ask for Help (v1)
Topic: I need help detecting an image on screen
Replies: 1
Views: 253

I need help detecting an image on screen

Before I come to the forums, I do a little bit or research first. I want to make a code that detects an image in a video game called Elder Scrolls Online. So, I came across an old post that explained how to do this and the code they provided was this: IF NOT A_IsAdmin { Run *RunAs "%A_ScriptFullPath...
by mexican scientist
11 Jan 2023, 16:30
Forum: Ask for Help (v1)
Topic: Help with a very simple code problem I have
Replies: 4
Views: 350

Re: Help with a very simple code problem I have

Try the following code. After the F key is released, it will wait for four seconds to see if the F key is pressed again. If it is, the first iteration will be canceled. f Up:: { KeyWait, f, D T4 if ErrorLevel = 0 { return } sendinput, {Lshift down} sleep, 10 sendinput, {Lshift up} sleep, 200 sendin...
by mexican scientist
10 Jan 2023, 22:55
Forum: Ask for Help (v1)
Topic: Help with a very simple code problem I have
Replies: 4
Views: 350

Help with a very simple code problem I have

I want my program to restart only a certain code, for example this is my code: 1:: { ;this is my first code return 2:: { ;This is my second code } return f:: { sleep, 4000 sendinput, {Lshift down} sleep, 10 sendinput, {Lshift up} sleep, 200 sendinput, {d down} sleep, 100 sendinput, {d up} return } S...
by mexican scientist
05 Jan 2023, 22:00
Forum: Ask for Help (v1)
Topic: Help with Code, simple butfustrating Topic is solved
Replies: 7
Views: 548

Re: Help with Code, simple butfustrating Topic is solved

SetTimer VAR ,% ( VAR :=! VAR )?200:"Off" I don't recommend using same name for the label and the toggle variable Also... separate the label and the hotkeys. ... try this... run it as is, to see that it is toggling with both 2 and 9 then you can remove the tooltips and comments from your code to te...
by mexican scientist
05 Jan 2023, 20:14
Forum: Ask for Help (v1)
Topic: Help with Code, simple butfustrating Topic is solved
Replies: 7
Views: 548

Re: Help with Code, simple butfustrating Topic is solved

I removed the code... Tooltip lol... I forgot to remove that before posting... I was using it for test the loop Do you mind If i ask for help with a similar problem but now with a different code? The code does the same thing, but this time I control the loop with the same activation key which is #2...
by mexican scientist
05 Jan 2023, 19:14
Forum: Ask for Help (v1)
Topic: Help with Code, simple butfustrating Topic is solved
Replies: 7
Views: 548

Re: Help with Code, simple butfustrating Topic is solved

Try this... drop the Stop := 1 down one line. Also include returns for each key section. I personally use While(!Stop) for this, rather than Loop. To me it's much more clear. #SingleInstance, force return $2:: stop := 0 Loop { ToolTip, % "in loop" Random, Rand, 1, 100000 IF (Rand <= 95000) ;with 95...
by mexican scientist
05 Jan 2023, 18:45
Forum: Ask for Help (v1)
Topic: Help with Code, simple butfustrating Topic is solved
Replies: 7
Views: 548

Help with Code, simple butfustrating Topic is solved

I have this code that loops and generates a random number between 1 and 100000 and if the number is less than 95000 then it holds 1 down for 200 ms. Else, it holds 1 down for 2000 ms. If I press 9, then the loop stops, but I want my code to do more when I press 9. If I press 9, I want the code to st...

Go to advanced search