Adr15145 Posted December 20, 2018 Posted December 20, 2018 Okay, I am trying to program a bot that can detect the state of the active window and then switch it to something else, so for example, if the window is maximized, I want the bot to restore it and vice versa, if it is not maximized, I want it to maximize the window. I've tried WinGetState("","") I've tried If WinGetState("","") = 32 then… Not sure if I'm using that one right but I've tried it and, I've programmed other bots to do things specifically when detecting certain Windows but I can't figure out how to do that, any help? I'm not even asking anyone to do it for me, just tell me if I'm using the right commands, if I'm on the right track also, not entirely sure how BitAND works so that might actually be the key I'm just not sure how it works. Also, I don't understand why, if there is a WinGetTitle("{ACTIVE}") command, why isn't there a WinGetState("{ACTIVE}") Command.
jdelaney Posted December 20, 2018 Posted December 20, 2018 (edited) BitAnd...put in your wingetstate and the state you want to check. if the return is greater than zero, then your window has the state. get the integer def for each win state in helpfile: Wingetstate I believe you are supposed to include "[active]"...and it will work for all the win* functions...read helpfile for wingethandle,there is a link to how to identify windows in that one Edited December 20, 2018 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Nine Posted December 21, 2018 Posted December 21, 2018 1 hour ago, Adr15145 said: Okay, I am trying to program a bot What kind of bot you are trying to make for what kind of game ? That would help us to understand your challenges “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
mikell Posted December 21, 2018 Posted December 21, 2018 18 hours ago, Nine said: What kind of bot you are trying to make for what kind of game ? #Include <Array.au3> Local $array[3][2] = [ _ ["bot", "program to automate something"], _ ["AutoIt", "intended to build a " & $array[0][0]], _ ["BitAnd(" & $array[0][0] & ", game) = 0", "not inconsistent"] _ ] _ArrayDisplay($array)
jdelaney Posted December 21, 2018 Posted December 21, 2018 Good example of bitand not containing a state IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now