Hello,
I want to look at all windows that are currently opened. Loop through all of them and those with a specific name they are to be reposition on the screen.
The idea is to create some kind of dashboard for people to execute their tasks. I am taking into account that people never worked with a MAC. Therefore do not know of to open/reposition/minimise/close a window.
The idea is when going through the loop if a window with a specific name appears, make it active and re-position it.
Here is what I’ve been trying to work with. At the moment the window name I am interested are : 101PNV01, SAUVEGARDE and MPEGfiles. The dashboard will be made of about 8 different windows.
- One FileMaker Pro application window
- Two SAFARI windows
- Five FINDER windows
At the moment, for some reason all windows name are equal to “101PNV01”
tell application "System Events"
set theProcesses to application processes whose visible is true
repeat with theProcess from 1 to count theProcesses
tell process theProcess
repeat with x from 1 to (count windows)
tell application "Finder"
activate
tell the front window to set toolbar visible to false
if name of front window is equal to "101PNV01" then
display dialog "101PNV01"
set bounds of front window to {953, 23, 1280, 401}
else if name of front window is equal to "SAUVEGARDE" then
display dialog "SAUVEGARDE"
set bounds of front window to {952, 401, 1280, 796}
else if name of front window is equal to "MPEGfiles" then
display dialog "MPEGfiles"
set bounds of front window to {952, 301, 1280, 547} -- MPEGfiles
end if
end tell
end repeat
end tell
end repeat
end tell
I get to see all opened windows when I run this command alone
tell application "System Events" to get the properties of every window of (every process whose visible is true)
Thanks!
Daniel