Jump to content
Sign in to follow this  

Win7 AutoIT Bug - BlockInput from Au3 VS .exe?

Recommended Posts

I've been racking my brain on this one, but I'm guessing I have hit something wonky. Running Windows 7 (admin), AutoIT 3.4.1. The following code will work differently depending on if i run it thorugh F5/Go or if i compile it and run the .exe. The problem is that the first Right click will not work, but the second, just after will work wonderfully. I'm not able to tell if the first left click is clicking. If the blockinput is removed, everything works fine in both au3 and exe execution.

What gives?

BlockInput (1)

WinActivate("Sharing Station", "")
WinSetState("Sharing Station", "", @SW_RESTORE)
WinWaitActive("Sharing Station")

$winpos = WinGetPos("Sharing Station", "")

mouseclick("right", $winpos[0] + 98, $winpos[1] + 160, 1, 3)
mouseclick("left", $winpos[0] + 118, $winpos[1] + 170, 1, 3)


mouseclick("right", $winpos[0] + 98, $winpos[1] + 180, 1, 3)
mouseclick("left", $winpos[0] + 118, $winpos[1] + 190, 1, 3)




UPDATE: Nevermind...figured out that there was some sort of sub window running that was popping up hidden when the main window was being restored. just adding a mouseclick on the title bar of the visable window before doing my clicking was enough to fully activate the correct window! The app whos window is in question, is an older app that really needs to be updated...

Edited by bsim

Share this post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...