Jump to content

WinWaitActive / WinActivate


Recommended Posts

Hi all, I'm trying to make a few scripts that use winwaitactive, winactivate.

The problem I have is some works and anothers not. I see the autoit is running in the taskbar, but doesn't respond to the windows.

Thank you

========================== NetMeeting =======================================

BlockInput(1)

; Run the NetMeeting

Run("C:\Program Files\NetMeeting\conf.exe")

; Wait for the wizard of the NetMeeting become active - it is titled "NetMeeting" on English systems

WinActivate("NetMeeting") <=== The problem is here

WinWaitActive("NetMeeting")

; Now that the NetMeeting window is active type your Settings

Opt("SendKeyDelay", 50)

Send("^{TAB}")

; Enter information about yourself for use with NetMeeting.

WinWaitActive("NetMeeting")

$var = "firstname"

send($var)

Send(@TAB)

$var = "lastname"

send($var)

Send(@TAB)

$var = "firstname.lastname

send($var)

Send("@domain.com")

Send(@TAB)

Send("My Company")

Send("^{TAB}")

; A directory server lists people you can call using NetMeeting.

WinWaitActive("NetMeeting")

Send("^{TAB}")

; Specify the speed of your connection to the network you will be using...

WinWaitActive("NetMeeting")

Send("L")

Send("^{TAB}")

; Put or not a shortcut to NetMeeting on my desktop and my Quick Launch Bar.

WinWaitActive("NetMeeting")

Send("{-}")

Send(@TAB)

Send("{-}")

Send("^{TAB}")

; Audio Tunning Wizard. This wizard will help you tune your audio settings.

WinWaitActive("Audio Tuning Wizard")

Send("^{TAB}")

; Audio Tunning Wizard. Testing your speakers.

WinWaitActive("Audio Tuning Wizard")

ControlClick("Audio Tuning Wizard", "&Test", 1001)

WinWaitNotActive("Audio Tuning Wizard", "", 03)

Send("^{TAB}")

; Audio Tunning Wizard. The wizard will make sure that the microphone is working...

WinWaitActive("Audio Tuning Wizard")

Send("^{TAB}")

; Audio Tunning Wizard. You have tuned your settings.

WinWaitActive("Audio Tuning Wizard")

Send("^{TAB}")

; Audio Tunning Wizard. The wizard will make sure that the microphone is working...

WinWaitActive("Audio Tuning Wizard")

Send("^{TAB}")

; NetMeeting is configured.

WinWaitActive("Audio Tuning Wizard")

Send("{ENTER}")

; Now wait to close before continuing

WinWaitActive("NetMeeting")

WinClose("NetMeeting", "")

; Finished!

BlockInput(0)

Link to comment
Share on other sites

HINT:

WinWait("ReallyLongWindowTitle")
WinActivate("ReallyLongWindowTitle")
WinWaitActive("ReallyLongWindowTitle")oÝ÷ ÙƧm殶­sbvåvBgV÷Cµ&VÆÇÆöæuvæF÷uFFÆRgV÷C²¥vä7FfFRgV÷C¶Æ7BgV÷C²¥våvD7FfRgV÷C¶Æ7BgV÷C²
Yes, thanks for that reminder - but only with

AutoItSetOption("WinTitleMatchMode", 4)

or

Opt("WinTitleMatchMode", 4)

...I think...

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Hi RSamel,

This is what i use in ALL my winwiat scripts and seems to work without fail.

Run(@ComSpec & " /c " & 'ncpa.cpl', "C:\WINDOWS\system32\dllcache", @SW_HIDE)
sleep (1000)

WinWait ( 'Network Connections' )
if NOT WinActive ( 'Network Connections', '' ) then
    WinActivate ( 'Network Connections' )
endif
WinWaitActive ( 'Network Connections' )
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...