Jump to content

Recommended Posts

Posted

First of all, I know nothing about programming. I got ChatGPT to write a script for me to search for a specific image on the screen and click, here it is:

While True
    ; Capture the screen
    $screen = _ScreenCapture_Capture("", 0, 0, 0, 0)

    ; Search for the image on the screen
    $search = _ScreenCapture_Search("ryba.png", 0, 0, 0, 0, $screen)

    ; If the image is found, click on it
    If Not @error Then
        MouseClick("left", $search[0], $search[1])
    EndIf

    ; Sleep for a short interval to avoid excessive clicking
    Sleep(1000) ; Sleep for 1 second (adjust as needed)
WEnd


I'm getting this error. How do I fix it? I've tried running as administrator and installing a different version of AutoIt.

image.png.934b8669c5682787bd88ebd712d925a8.png

Posted
2 minutes ago, Jos said:

So you have no clue what you are running and ask us to fix any chatgpt errors? 

What exactly is the purpose of this script and what are you automating?

The purpose is, like I said, to constantly search for a specific image (ryba.png) on the screen and click on it once it appears.
If the script GPT wrote is incorrect, please say so. You seem irritated with the fact it was AI that wrote it.

Posted

Automating a fishing minigame where you need to click on constantly appearing images of fishes, once it's clicked, you need to wait a few seconds until they start appearing again.

  • Developers
Posted

That's what I sort of expected, so you better now first read our forum rules carefully before posting again 

Ps not irritated by AI having written it, but rather you simply dumping it here to have others fix it without putting any effort in yourself... it seems.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

  • Developers
Posted

Welcome to the AutoIt forum.

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked.

See you soon with a legitimate question I hope.

The Moderation team

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...