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
 General Discussion
 General Discussion
 how to activate and let it appear on the front
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

spp

3 Posts

Posted - 04/08/2013 :  15:01:37  Show Profile
hi

a chrome window was minimized and so is on the task bar. how can i activate it and let it appear on the front by s+? perhaps we can use the name of the exe file name: chrome.exe?


=====
local iHandle = acFindWindowByTitleRegex("code.*")
if iHandle > 0 then
acActivateWindow(iHandle,0,0)
else
acSendKeys("{DELAY=50}@r")
acDelay(400)
acSendKeys("{DELAY=50}notepad~")
end
=====
this above example code is related to it? i thought this code will activate a window whose title's name is code*. but i doesn't on my computer (win8 64bit).

can you advise me?

best regards

Rob

USA
2615 Posts

Posted - 04/16/2013 :  23:00:17  Show Profile  Visit Rob's Homepage
This should work.
local iHandle = acFindWindowByTitleRegex("code.*") 
if iHandle > 0 then
   acActivateWindow(iHandle,0,0)
end
What is the exact and full title of the window?

Bring the Chrome window to the front (focus/active) and run this script:
acMessageBox(acGetWindowTitle(acGetForegroundWindow()),"Title")
The pattern you have would match "code something - Google Chrome", but not "My code - Google Chrome" since it doesn't start with "code". Something like acFindWindowByTitleRegex(".*code.*") as the pattern would match "code" anywhere in the title; however, note that the pattern is case-sensitive. ".*code.*" would not match "My Code - Google Chrome", but would match "Lowercase code - Google Chrome".

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