StrokesPlus Forum
                       
StrokesPlus Forum
Home | Profile | Register | 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
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

aliasbonux

1 Posts

Posted - 02/28/2013 :  08:15:36  Show Profile  Reply with Quote
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
2538 Posts

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

Thanks!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000