Jump to content
Sign in to follow this  
Guest stark

How to use WinGetActiveTitle with AutoItX

Recommended Posts

Guest stark

I'm having trouble getting the WinGetActiveTitle function to work using the ActiveX Object. Here's my code.

testvar=WinGetActiveTitle()

wscript.echo testvar

I get a type mismatch error.

Share this post


Link to post
Share on other sites
Jos

try this one:

Option Explicit

Dim oShell

Dim oAutoIt

Dim testvar

Set oAutoIt = WScript.CreateObject("AutoItX.Control")

testvar=oAutoIt.WinGetActiveTitle()

wscript.echo testvar

WScript.Quit


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
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.