Really basic fishing

Get help with using AutoHotkey and its commands and hotkeys
Ruathaz

Really basic fishing

16 Sep 2018, 01:14

This is really my first attempt at coding a AHK script. I finally hit a wall and cannot fathom what small errors I made. I am trying to get it to click when the area is no longer the color I set with ctrl+alt+z. I got it to either just keep clicking, or it won't click at all. I stole bits and pieces from other scripts I found, though I never tested them to see if they worked to begin with. Any help would be appreciated.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Rindis
Posts: 202
Joined: 23 Dec 2013, 13:58
Location: Norway

Re: Really basic fishing

16 Sep 2018, 06:37

I kind of test your code (though I don't have any fishing game) and it seems to work, it start when I press F6 and ends when I press F7. I notised 2 things, it takes 5 sec to end the fishing since you have a "sleep 5000" in the startFishing() function, and when I restart the fishing with F6 it no longer seems to find the right color.

my little modifications to test

Code: [Select all] [Expand] [Download] (Untitled.ahk)GeSHi © Codebox Plus

Ruathaz
Posts: 4
Joined: 16 Sep 2018, 01:15

Re: Really basic fishing

16 Sep 2018, 11:24

I am trying to get it to keep running until I press F7. I have that long pause to give the game time to change colors back.
Rindis
Posts: 202
Joined: 23 Dec 2013, 13:58
Location: Norway

Re: Really basic fishing

16 Sep 2018, 11:27

yes but in my test it stopped running when I pressed f7
Ruathaz
Posts: 4
Joined: 16 Sep 2018, 01:15

Re: Really basic fishing

16 Sep 2018, 12:21

So I think I kinda see an issue. I dont have my game full screen. I am trying to get AHK to search those pixels on the screen regardless of what is in focus etc. I am not sure how to do that.
Rindis
Posts: 202
Joined: 23 Dec 2013, 13:58
Location: Norway

Re: Really basic fishing

16 Sep 2018, 12:42

You need to look at
or I would think
Ruathaz
Posts: 4
Joined: 16 Sep 2018, 01:15

Re: Really basic fishing

16 Sep 2018, 16:17

This works perfectly when I have the game in full screen but idk how to get it to work when it's not.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Rindis
Posts: 202
Joined: 23 Dec 2013, 13:58
Location: Norway

Re: Really basic fishing

17 Sep 2018, 00:54

Try
CoordMode, mouse, Window

Return to “Ask For Help”

Who is online

Users browsing this forum: NovaRanger, shgilad81 and 73 guests