Search found 555 matches
- 21 Apr 2024, 22:51
- Forum: Scripts and Functions (v1)
- Topic: Dijkstra Map example / visualizer
- Replies: 0
- Views: 50
Dijkstra Map example / visualizer
This is a Dijkstra Map, sometimes also called a flowfield I think, it's a good pathfinding algorithm for fast paths on maps that don't change much, in the example I have tried to explain how it works as best I can, although there may be a better way to do it, I was just trying to learn, if anyone sp...
- 02 Jun 2023, 17:14
- Forum: Ask for Help (v1)
- Topic: Help me fix an error in this old yet still useful function 'Notify()' Topic is solved
- Replies: 1
- Views: 197
Re: Help me fix an error in this old yet still useful function 'Notify()' Topic is solved
In the notify.ahk file at line 346 If (Exit = A_Gui) ;ExitApp Return it may have something to do with this, I believe the label should end there but because the line above was commented out but the if statement was left in, it means the return may never occur and it flows into the next label causing...
- 26 Apr 2023, 03:44
- Forum: Ask for Help (v1)
- Topic: ImageSearch: search on an image file instead of on the screen - is it possible?
- Replies: 7
- Views: 633
Re: ImageSearch: search on an image file instead of on the screen - is it possible?
Window scanning should be significantly faster than desktop, though it may not work on some directx games you can easily get all matches by using the ImageArray function, here is an example #include ShinsImageScanClass.ahk scan := new ShinsImageScanClass("WindowTitleHere") return f1:: ;region scans ...
- 25 Apr 2023, 00:01
- Forum: Ask for Help (v1)
- Topic: ImageSearch: search on an image file instead of on the screen - is it possible?
- Replies: 7
- Views: 633
Re: ImageSearch: search on an image file instead of on the screen - is it possible?
My image scan class is capable of this, you can find the github here > https://github.com/Spawnova/ShinsImageScanClass here is an example on how it is used #include ShinsImageScanClass.ahk scan := new ShinsImageScanClass() ;only create this once at the top scan.SetTargetImageFile("LargeImageToSearch...
- 10 Apr 2023, 14:25
- Forum: Ask for Help (v1)
- Topic: I'm need for a digit in a name to be variable
- Replies: 3
- Views: 208
Re: I'm need for a digit in a name to be variable
You can use SetTitleMatchMode which allows for partial title matching, then you don't need to specify the number
Code: Select all
SetTitleMatchMode,2 ; partial matches allowed
v::
ControlClick, JUCE_BASE_VIEW, Analog Lab V
return
- 05 Mar 2023, 18:32
- Forum: Ask for Help (v1)
- Topic: Text background transparent
- Replies: 2
- Views: 835
Re: Text background transparent
Just for fun as well, here is an example using my Overlay class =P #singleinstance,force #include ShinsOverlayClass.ahk ;assumes you download the class file to this directory overlay := new ShinsOverlayClass(500,500,200,130,0,0,0) ;x,y,w,h,alwaysontop,vsync,clickthrough OnMessage(0x200,"WM_MOUSEMOVE...
- 05 Mar 2023, 11:33
- Forum: Scripts and Functions (v1)
- Topic: [game/class] Tower Defense example
- Replies: 11
- Views: 1457
Re: [game/class] Tower Defense example
On several of the examples though, you had the 'overlay' defined as 'clickThrough' which made it difficult to make the window active, which caused none of the hotkeys or dragging to work. Oh thanks for that, I changed around the initial params sometime after making those early examples and forgot t...
- 04 Mar 2023, 08:23
- Forum: Scripts and Functions (v1)
- Topic: [game/class] Tower Defense example
- Replies: 11
- Views: 1457
Re: [game/class] Tower Defense example
FanaticGuru I used gimp to create everything, although implementing a track editor wouldn't be too hard, but you are right I generally like to learn a bunch of stuff rather than commit to making a full experience. I never released source on the older stuff because the way it was coded was not very ...
- 03 Mar 2023, 17:44
- Forum: Scripts and Functions (v1)
- Topic: [game/class] Tower Defense example
- Replies: 11
- Views: 1457
Re: [game/class] Tower Defense example
@Spawnova : How do you obtain the vTable numbers for the D2D method interfaces? Do you look in .h files or? I would be interested in extending the overlay class with more tools. Correct! I look in the .h files to get their index and params, it is hard to add some stuff though because I want to keep...
- 03 Mar 2023, 17:19
- Forum: Ask for Help (v1)
- Topic: Reduce monitor size by adding frame/bezel
- Replies: 1
- Views: 202
Re: Reduce monitor size by adding frame/bezel
I'm not sure how you would do this with Autohotkey, they only way that I personally know is through nvidia, assuming you have a nvdia gpu you can right click the desktop choose nvidia control panel and follow this https://i.imgur.com/BWUhYwb.png there is probably a way to do it through intel or amd ...
- 02 Mar 2023, 06:23
- Forum: Scripts and Functions (v1)
- Topic: [game/class] Tower Defense example
- Replies: 11
- Views: 1457
Re: [game/class] Tower Defense example
Glad you guys find it interesting =P
Thanks for the feedback @SpeedMaster, always nice to know that it's working as intended, especially since I didn't have a windows 7 machine to ever test the class on.
Thanks for the feedback @SpeedMaster, always nice to know that it's working as intended, especially since I didn't have a windows 7 machine to ever test the class on.
- 27 Feb 2023, 05:24
- Forum: Scripts and Functions (v1)
- Topic: [game/class] Tower Defense example
- Replies: 11
- Views: 1457
[game/class] Tower Defense example
I have a class designed for creating simple games with ahk using direct2d and recently wanted to update it, so I also quickly created a tower defense example and though it would be fun to share here as well! It is not a full game but rather a small example to show class usage, as such some things un...
- 08 Nov 2022, 22:33
- Forum: Ask for Help (v1)
- Topic: Pixelsearch on background inactive window
- Replies: 23
- Views: 2949
Re: Pixelsearch on background inactive window
Yeah, check out the source for the class, every functions has documentation included, for PixelRegion it's PixelRegion(color,x1,y1,w,h,variance=0,byref returnX=0,byref returnY=0,scanDir:=0) so after variance you can specify an x and y return variable #include ShinsImageScanClass.ahk ;include the lib...
- 29 Oct 2022, 10:44
- Forum: Ask for Help (v1)
- Topic: Pixelsearch on background inactive window
- Replies: 23
- Views: 2949
Re: Pixelsearch on background inactive window
When you compile an autohotkey script into an executable it automatically includes libraries that you have #included
You will only need the executable at that point, that's only for code though, other resources like images/audio will need to be present after
You will only need the executable at that point, that's only for code though, other resources like images/audio will need to be present after
- 29 Oct 2022, 09:41
- Forum: Ask for Help (v1)
- Topic: Pixelsearch on background inactive window
- Replies: 23
- Views: 2949
Re: Pixelsearch on background inactive window
Yup it does support negative width and height, that will work
- 29 Oct 2022, 09:08
- Forum: Ask for Help (v1)
- Topic: Pixelsearch on background inactive window
- Replies: 23
- Views: 2949
Re: Pixelsearch on background inactive window
if (scan.PixelRegion(0x6F70BB,258,109,34,10,3,x,y)) Yes this is correct, it will scan the region from 258,109 > 292,119 (258+34=292),(109+10=119) Your other problem lies here scan.PixelRegion(0x6F70BB,258,109, 0 , 0 ,3) 0 width or 0 height will always result in a fail since there would be no pixels...
- 29 Oct 2022, 08:30
- Forum: Ask for Help (v1)
- Topic: Pixelsearch on background inactive window
- Replies: 23
- Views: 2949
Re: Pixelsearch on background inactive window
Those coordinates are in x1,y1,x2,y2 format, my class uses x,y,w,h so you would instead type 258,109,w,h F3:: if (scan.PixelRegion(0x6F70BB,258,109,1,1,3,x,y)) { ;x=258 y=109 w=1 h=1, increase width and height to increase search range msgbox % "pixel found at pos " x ", " y } else { msgbox % "No pix...
- 29 Oct 2022, 07:57
- Forum: Ask for Help (v1)
- Topic: Pixelsearch on background inactive window
- Replies: 23
- Views: 2949
Re: Pixelsearch on background inactive window
by default that gets the color in BGR you can use MouseGetPos, unikX, unikY PixelGetColor, unico, %unikX%, %unikY%, RGB instead your color BB 70 6F can just be swapped around to rgb as well 6F 70 BB if you are only scanning 1 pixel then use this instead f1:: if (scan.PixelPosition(0x6F70BB,258,109,3...
- 29 Oct 2022, 07:29
- Forum: Ask for Help (v1)
- Topic: Pixelsearch on background inactive window
- Replies: 23
- Views: 2949
Re: Pixelsearch on background inactive window
Oh whoops, should have been a percent sign there to use expression mode settimer,scanLoop, % (toggle ? 50 : "off") Also keep in mind my class uses coordinates as x, y, w, h not x1, y1, x2, y2 , also colors are assumed to be in RGB format here is the updated script to account for the error #include S...
- 29 Oct 2022, 06:48
- Forum: Ask for Help (v1)
- Topic: Pixelsearch on background inactive window
- Replies: 23
- Views: 2949
Re: Pixelsearch on background inactive window
It does not scan the desktop, when you supply a target title as the first parameter when creating the class it will only scan that window, regardless of whether it is visible or not (though not minimized), it will not include any portion of any other window. here is the same code but with a loop #in...