Jump to content

After Activating Window Nothing Works

Recommended Posts

Newb here. First thanks everyone in the forums. I was able to automate one of my daily tasks and I'm working on another.


I'm trying to get AutoIT to click on a New button in the tool bar of this application.


>>>> Window <<<<
Title:  Report Builder
Class:  Afx:400000:8:10003:0:6e0d33
Position:   205, 344
Size:   1325, 625
Style:  0x14CF0000
ExStyle:    0x00000100
Handle: 0x0023070C

>>>> Control <<<<
Class:  ToolbarWindow32
Instance:   1
ClassnameNN:    ToolbarWindow321
Advanced (Class):   [CLASS:ToolbarWindow32; INSTANCE:1]
ID: 59392
Text:   Report Builder
Position:   -2, 0
Size:   144, 32
ControlClick Coords:    19, 16
Style:  0x5400004E
ExStyle:    0x00000000
Handle: 0x00450734

>>>> Mouse <<<<
Position:   25, 67
Cursor ID:  0
Color:  0xFFFFFF

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
For Help, press F1
Report Builder
Report Builder

>>>> Hidden Text <<<<

Here is what I've tried to get it to work.

With a MouseClick:

WinWait("Report Builder")
WinActivate("Report Builder")
MouseClick("primary", 25, 67, 1, 20)

Report Builder Window will be focused on but the Mouse doesn't ever move.


I've also tried it with a control click just to see if something would happen.

WinWait("Report Builder")
WinActivate("Report Builder")
ControlClick("Report Builder","","[CLASS:ToolbarWindow32; INSTANCE:1]")

I attempted to use the recorder but after recording, nothing showed up in the output.

Any Suggestions?

Link to post
Share on other sites

Have you tried using Hotkeys? 

I don't have this program, However, you can give this a try to create a new report. 

ControlSend("Report Builder", "", "",("^n"))

Just noticed you said that the mouse did no ove when you tried MouseClick()

Do you get a message box that says "test" when you run this?

WinWait("Report Builder")
WinActivate("Report Builder")
MouseClick("primary", 25, 67, 1, 20)

If no your Winwait() is not finding anything. 

Edited by SkysLastChance

Life's simple. You make choices and you don't look back.

Link to post
Share on other sites

Thank you Skys,

The ControlSend didn't work


I ran that test and the msgbox popped up behind the Report Viewer window, When I clicked OK to dismiss the msgbox, the curser moved to the top of the screen and clicked. Not in the window. 

Link to post
Share on other sites

I don't suppose the Report Building is running with admin rights is it?  If it is, and the script is not, it may not be permitted to interact with it using Control* functions.  I suppose it could also possibly be an x86 versus x64 issue.  

Having said that, I can't see why automating the mouse movement and clicking isn't working. Control* functions are definitely the way to go though (more reliable) if you can get it to work.

Maybe the _GUICtrlToolbar_ClickButton function is a good option too.  *see the help file example.

Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...