Help randomizing first run of a script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Coding_With_ChatGPT
Posts: 1
Joined: 01 Jun 2023, 00:24

Help randomizing first run of a script

Post by Coding_With_ChatGPT » 01 Jun 2023, 00:29

Hi all,

I'm completely new to AHK and have very little experience coding but was able to use ChatGPT to get an understanding of the basics and make what I need. The only issue is the script isn't randomizing properly.

While I can only really tell visually with the mouse, I'm assuming this is happening with the timings too. For the mouse, essentially, I'm trying to click into a random spot in a defined area, but the first time my code runs it always clicks the exact same co-ordinates (I haven't looped it so I don't know if the problem persists with multiple iterations but when I tested it visually it seems like it also follows the same exact string of random coordinates).

Here's a snippet of code I've been using to test with a screenshot.

[ChatGPT-generated code removed by moderator]

I'm assuming that somehow my script is running the same seed to generate the random coordinates but nothing ChatGPT gives me actually works. Has anyone run into the same issue/can anybody help me?

Let me know if I need to provide anymore information

Thanks in advance!

User avatar
boiler
Posts: 16951
Joined: 21 Dec 2014, 02:44

Re: Help randomizing first run of a script

Post by boiler » 01 Jun 2023, 00:35

Coding_With_ChatGPT wrote: nothing ChatGPT gives me actually works.
…which is why ChatGPT-generated code is not allowed per the Forum Rules.

An unfortunate choice of username.

Post Reply

Return to “Ask for Help (v1)”