Hi. I'm trying to make a script that toggles all windows but the I give as a first param.
| Code: |
function Statica_ToggleWindowsButGiven(strWindow)
local visible = false
listWindows = Rainlendar_GetWindows()
for key, win in pairs(listWindows) do
if strWindow~=win and Rainlendar_IsWindowVisible(win) then
visible = true
break
end
end
--visible = false
--[[]]
if visible then
for key, win in pairs(listWindows) do
if strWindow~=win then
Rainlendar_HideWindow(win)
end
end
else
for key, win in pairs(listWindows) do
if strWindow~=win then
Rainlendar_ShowWindow(win)
end
end
end
--[[
if visible then
Hotkey_Hide_Windows()
else
Hotkey_Show_Windows()
end
Rainlendar_ShowWindow("Clock and Management")
]]
end
|
I think the problem might be because Rainlendar_GetWindows() doesn't work as I would expect (don't return names of windows). Is there some reference for functions like that? Is there a function that would output something to the debug log?