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
 close all windows of an application
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

aliasbonux

1 Posts

Posted - 02/28/2013 :  08:15:36  Show Profile
Only tested on windows 7

local exe_name = acGetExecutableName(acGetOwnerWindowByPoint(gsx, gsy),0,0)
-- get all windows and search for exe_name
acGetAllWindows(1)
for num, handle in pairs(sp_all_windows) do	
  -- close all application for exe_name
  local exe = acGetExecutableName(handle,0,0)
  if exe == exe_name then
    acCloseApplication(handle, nil, nil) 
  end
end

Edited by - aliasbonux on 02/28/2013 08:35:34

Rob

USA
2615 Posts

Posted - 02/28/2013 :  08:55:41  Show Profile  Visit Rob's Homepage
Added to sample scripts: http://www.strokesplus.com/scripts/23

Thanks!
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