Jump to content
Sign in to follow this  
Zamp

Why won't winactivate work?

Recommended Posts

Zamp

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

Share this post


Link to post
Share on other sites
PaulIA

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.