Jump to content

How to use WinGetActiveTitle with AutoItX


Recommended Posts

Posted

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.

  • Developers
Posted

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.
  :)

  • Recently Browsing   0 members

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