Jump to content

Activate Window


Recommended Posts

You know what, never mind.  I don't need or want to see it:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_SaveSource=y
#AutoIt3Wrapper_Res_Language=1033
#AutoIt3Wrapper_Add_Constants=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.15.0 (Beta)
 Author:         myName

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here
$win = WinWait ( "[CLASS:Chrome_WidgetWin_1]" )
WinActivate ( $win )
WinWaitActive ( $win )

 

Link to comment
Share on other sites

Ok. I wasn't sure how the WinWait and WinActivate worked

 

All I had was this:

Example()
Func Example()
    WinActivate(Chrome)
EndFunc
 
Thanks. Do you have a code snippet that explains/shows how to simulate a mouse Click the (left button) at a set of cords?
Link to comment
Share on other sites

Then, use the below function, which will perform a left click at the coordinates you obtained from the Window info tool.  The below code uses the values seen in the picture of previous post.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_SaveSource=y
#AutoIt3Wrapper_Res_Language=1033
#AutoIt3Wrapper_Add_Constants=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.15.0 (Beta)
 Author:         myName

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here
MouseClick ( "left", 841, 202 )

 

Link to comment
Share on other sites

Also, a word to the wise.  I don't know what it is you are trying to get your script to do, but be aware that, if the application/window which you are trying to have your script interact with is elevated (run with admin credentials), the script will also need to be compiled to run with admin permissions.

Link to comment
Share on other sites

1 minute ago, Ikillu762 said:

Obviously my next problem is going to be how to figure out a way to script an image-on screen- check/validate+locate

Well not obvious to me.  I am not sure what it is you are trying to do.  If you shared some details, I might be able to help.

Link to comment
Share on other sites

1 minute ago, Ikillu762 said:

Since I have no way of reading packets that I can't seem to find, I am trying to include an image check to ensure that a portion of the web-page is where it should be

Yeah, you are going about this the wrong way then.  You need to be using the Internet explorer functions to write the script, as web browsers don't function the same as native applications.

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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