Code: Select all
*** starting new session ***
[ERROR:] object:<Toggle: Autohide> function:<Alias22>
<[string "function Alias22()..."]:8: attempt to call global 'makeAutohideLabel' (a nil value)>
[ERROR:] object:<Show Colors> function:<Action6>
<[string "function Action6()..."]:2: attempt to call global 'showColors' (a nil value)>
[ERROR:] object:<WindowResizeEvent> function:<handleWindowResizeEvent>
<attempt to call a nil value>
Code: Select all
if (isAutohideOn) then
turnAutohideOff()
else
isAutohideOn = true
enableAlias("Autohide")
enableTrigger("Autohide")
makeAutohideLabel()
end
Code: Select all
function makeAutohideLabel()
local w, h = getMainWindowSize()
if (not isAutohideLabelMade) then
createLabel("lblAutohide", 0, 0, 0, 0, 1)
setLabelClickCallback("lblAutohide", "turnAutohideOff")
setBackgroundColor("lblAutohide", 0, 0, 255, 150) -- r, g, b, trans
echo("lblAutohide", [[<p><b><center><font size="14" color ="red">Autohide On</font></center></b></p>]])
isAutohideLabelMade = true
end
-- Just incase I've resized the program window
resizeWindow("lblAutohide", 200, 35) -- w, h
moveWindow("lblAutohide", w - 215, 0) -- x, y
showWindow("lblAutohide")
end
function turnAutohideOff()
disableTrigger("Autohide")
disableAlias("Autohide")
hideWindow("lblAutohide")
isAutohideOn = false
end