Jump to content

Why won't winactivate work?


Zamp
 Share

Recommended Posts

This is my script

#include <Misc.au3>

$dll = DllOpen("user32.dll")

While 1
    Sleep (100)
    If _IsPressed("77", $dll) Then
        WinActivate("AC Tool 5.4.0 - C:\Program Files\AC Tool\MS - Bot.mac")
;MouseClick("left", 664, 520)
        ExitLoop
    EndIf
WEnd
DllClose($dll)

I run the script, press F8, but nothing happens. I made sure that I have the right title for the window, but it still doesn't work.

Edit: I just tried it on Firefox, and it works, but it doesn't work for the program I need it to work with. I've used the AutoIt v3 Active Window program to get the title of the program, and it still doesn't work.

Edited by Zamp
Link to comment
Share on other sites

What does FireFox have to do with anything? Run this and then fix the bug in your WinActivate call:

#include <Misc.au3>

$dll = DllOpen("user32.dll")

While 1
  Sleep (100)
  If _IsPressed("77", $dll) Then
    MsgBox(0, "Status", "You pressed the F8 key")
    ExitLoop
  EndIf
WEnd
DllClose($dll)
Auto3Lib: A library of over 1200 functions for AutoIt
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...