Jump to content

Recommended Posts

Posted

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.

Posted (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 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.
Posted
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)

:P

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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