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


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     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  

×