Hi guys,
I'm planning on making an old laptop I have to kind of a bot station.
I built a few bots based on ahk using the chrome.ahk library.
I need to reinstall windows in the laptop so I figured I'd ask- is there any windows version that works better with ahk? Cause for me it doesn't matter what version I install.
The bot focuses on detecting pixel in a specific coordinate on the screen if it matters.
If I'm at it so I would like to ask another question-
As part of the bot's cycle I need to detect if a certain dynamic div has appeared in a webpage and if it did- I need it to do a certain action asap. So I need to be alerted that the div appeared (by class name) immediately.
Right now I'm doing it kind of dumb- infinite loop checking if the class name exists if it does, do X, if it doesn't the loop restarts.
Is there a better way I'm not familiar of?
Thank for reading! I would really appreciate help
Which windows version is the best for ahk and pixelgetcolor in particular?
Re: Which windows version is the best for ahk and pixelgetcolor in particular?
- if u wanna be lazy about it, windows7 with DWM disabled or any other pre-vista version. otherwise, use modern pixel retrieval methods
- monitor the parent element of where the div is meant to appear with a MutationObserver
Re: Which windows version is the best for ahk and pixelgetcolor in particular?
Hi!
First of all thank you very much for answering.
Regarding the first answer, what difference will disabled dwm have? And why is it lazy?
Haha I'm sorry if it was a joke, my english isn't the best.
And I'll defentely try what you suggested in the second answer, so thanks again.
Have a great day
Re: Which windows version is the best for ahk and pixelgetcolor in particular?
read
https://docs.microsoft.com/en-us/windows/win32/learnwin32/the-desktop-window-manager
https://docs.microsoft.com/en-us/windows/win32/dwm/dwm-overview
the cost of 1 GetPixelColor call is the time taken for dwm to composite ur entire screen(the larger the resolution, the worse it gets), whereas pre-vista(and win7 with dwm disabled) can access the pixel directly. if u dont use GetPixelColor, then none of this matters. but then u have to write ur own code
https://docs.microsoft.com/en-us/windows/win32/learnwin32/the-desktop-window-manager
https://docs.microsoft.com/en-us/windows/win32/dwm/dwm-overview
the cost of 1 GetPixelColor call is the time taken for dwm to composite ur entire screen(the larger the resolution, the worse it gets), whereas pre-vista(and win7 with dwm disabled) can access the pixel directly. if u dont use GetPixelColor, then none of this matters. but then u have to write ur own code