This App is No Longer Maintained. Visit the Replacement at StrokesPlus.net

StrokesPlus Forum
                       
StrokesPlus Forum
Home | Profile | Active Topics
Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Lua Scripts
 General Action Scripts
 Find a window by title and activate
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Rob

USA
2615 Posts

Posted - 12/19/2011 :  09:44:37  Show Profile  Visit Rob's Homepage
This script will find the first window with the title "Release" and activate it. As you'll notice, the first action supports regular expressions, so passing in "Rel.*se" would match as well.

local iHandle = acFindWindowByTitleRegex("Release")
acActivateWindow(iHandle,0,0)

Rob

USA
2615 Posts

Posted - 12/23/2011 :  07:53:52  Show Profile  Visit Rob's Homepage
A conditional variation. If No window is matched, send WIN+R, type "notepad" and send the enter key.


local iHandle = acFindWindowByTitleRegex("Rel.*se")
if iHandle > 0 then
acActivateWindow(iHandle,0,0)
else
acSendKeys("{DELAY=50}@r")
acDelay(400)
acSendKeys("{DELAY=50}notepad~")
end
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000