DarkAqua Posted October 7, 2014 Share Posted October 7, 2014 I was working trying to get a script that would use WinList() to create and display an array of windows with the tile defined by REGEXPTITLE such as Google Chrome. Example: #include <Array.au3> $list = WinList("[REGEXPTITLE:(?i)(.*Google*)]") _ArrayDisplay($list) I have with the code above made an array listing all windows with the title google which works great but my question is that, is it possible to use a variable in place of the Google in the above code? I have tried the below codes but am unable to get it to work. The array always comes back empty. The first two i have tried with a quotation around Google but still revive an empty array. #include <Array.au3> $wintitle = Google $list = WinList("[REGEXPTITLE:(?i)(.*$Wintitle*)]") _ArrayDisplay($list) #include <Array.au3> $wintitle = Google $list = WinList('"[REGEXPTITLE:(?i)(.*' & $Wintitle & '*)]"') _ArrayDisplay($list) #include <Array.au3> $wintitle = "[REGEXPTITLE:(?i)(.*Google*)]" $list = WinList($wintitle) _ArrayDisplay($list) #include <Array.au3> $app = Google $wintitle = '"[REGEXPTITLE:(?i)(.*' & $app & '*)]"' $list = WinList($wintitle) _ArrayDisplay($list) Link to comment Share on other sites More sharing options...
JohnOne Posted October 8, 2014 Share Posted October 8, 2014 $wintitle = "[REGEXPTITLE:(?i)(.*" & $app & ")]" AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now