GZE Posted July 12, 2005 Posted July 12, 2005 (edited) Hello, I would like to activate a window of which the title contains the word (active)" and which ends with the word Pro/ENGINEER. Al the other words in the title can be anything. How do I Activate this window? The AU3Info.exe info is listed below. If wildcards where possible something like: WinActivate("*(Active)*Pro/ENGINEER") WinWaitActive("*(Active)*Pro/ENGINEER") would solve my problem. But this doesnt seem to be the case. Kind regards GZE WinActivate("*(Active)*Pro/ENGINEER") WinWaitActive("*(Active)*Pro/ENGINEER") Press CTRL-ALT-F to pause the display. >>>>>>>>>>>> Window Details <<<<<<<<<<<<< Title: EO-049-094-007 (Active) C:\Ptc\models\Workdir_Concrete\EO-049-094_Laatste versie in work\EO-049-094-007.DRW.393 - Pro/ENGINEER Class: Dialog Size: X: 0 Y: 0 W: 1701 H: 1147 >>>>>>>>>>> Mouse Details <<<<<<<<<<< Screen: X: 1069 Y: 12 Cursor ID: 2 >>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<< RGB: Hex: 0x6E8FC0 Dec: 7245760 >>>>>>>>>>> Control Under Mouse <<<<<<<<<<< Size: Control ID: ClassNameNN: Text: >>>>>>>>>>> Status Bar Text <<<<<<<<<<< >>>>>>>>>>> Visible Window Text <<<<<<<<<<< Pro/ENGINEER >>>>>>>>>>> Hidden Window Text <<<<<<<<<<< Edited July 12, 2005 by GZE
buzz44 Posted July 12, 2005 Posted July 12, 2005 (edited) $Windows = WinList() For $I = 1 to $Windows[0][0] If StringInStr($Windows[$I][0], "(active)") And StringInStr($Windows[$I][0], "Pro/ENGINEER") Then WinActivate($Windows[$I][0]) EndIf Next Edited July 12, 2005 by Burrup qq
GZE Posted July 12, 2005 Author Posted July 12, 2005 (edited) $Windows = WinList() For $I = 1 to $Windows[0][0] If StringInStr($Windows[$I][0], "(active)") And StringInStr($Windows[$I][0], "Pro/ENGINEER") Then WinActivate($Windows[$I][0]) EndIf Next<{POST_SNAPBACK}>HelloThis workarround works great...thnx al lot.A WinActivate in which you could use wildcards would be more straightforwardnot?grtz,GZE Edited July 12, 2005 by GZE
WHRobin566 Posted July 12, 2005 Posted July 12, 2005 (edited) or opt('wintitlematchmode', 2) winactivate("(Active)") or if that don't work then opt('wintitlematchmode', 2) $title = wingettitle("(Active)") winactivate($title) Edited July 12, 2005 by WHRobin566 Witch Hunter Robin
buzz44 Posted July 12, 2005 Posted July 12, 2005 (edited) @WHRobin566 First won't work because there may be other window's that have "(active)" in the title but don't have "Pro/ENGINEER". The second however, modified, will work. Opt('WinTitleMatchMode', 2) $Title = WinGetTitle("(Active)") If StringInStr($Title, "Pro/ENGINEER") Then WinActivate($Title) ;Or Opt('WinTitleMatchMode', 2) $Title = WinGetTitle("Pro/ENGINEER") If StringInStr($Title, "(Active)") Then WinActivate($Title) Edited July 12, 2005 by Burrup qq
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