Jump to content

How to use WinGetActiveTitle with AutoItX


Guest stark
 Share

Recommended Posts

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.

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...