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
 Feature Updates
 New Features
 [ADDED] Two ProcessID Related Actions
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Rob

USA
2615 Posts

Posted - 04/20/2012 :  11:20:29  Show Profile  Visit Rob's Homepage
Added in 1.8.4

acGetProcessIDFromPattern(filepattern) - This can be used to determine if a process is running by name and/or regular expression pattern.
acGetWindowFromProcessID(processID) - This is used to find the first top-level window associated with a process ID

Rob

USA
2615 Posts

Posted - 04/20/2012 :  12:12:36  Show Profile  Visit Rob's Homepage
Example Lua script utilizing both:

local pID = acGetProcessIDFromPattern("note.*exe")
if pID > 0 then
    acMaximizeOrRestoreWindow(acGetWindowFromProcessID(pID),0,0)
end

This looks for this first running process that matches "note.*exe" (notepad.exe, notes.exe, etc.) and maximizes or restores the first top-level window found that belongs to the process. If no match was found, nothing happens.
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