Error 403 from Google Calendar? Upgrade to the new Google Calendar support. See here for details. close
Welcome, Guest
Please Login or Register.    Lost Password?

Switching Calendars
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: Switching Calendars
#14747
Re:Switching Calendars 3 Years, 9 Months ago  
I think this code would make what you want. The programming language used by Rainlendar is Lua. This code cycles between 4 values (0 to 3) and with each value hides/shows differents windows.
But I'm not sure what will happen on each restart of the application.

Code:


ShowOnlyOneWindow = 0

function Hotkey_Change_Window_View()      
  ShowOnlyOneWindow = (ShowOnlyOneWindow + 1) % 4
  if ShowOnlyOneWindow == 0 then
    Rainlendar_HideWindow("Day View")
    Rainlendar_HideWindow("Sidebar") 
    Rainlendar_HideWindow("Week View")   
  elseif ShowOnlyOneWindow == 1 then
    Rainlendar_ShowWindow("Day View")  
    Rainlendar_HideWindow("Sidebar")  
    Rainlendar_HideWindow("Week View")  
  elseif ShowOnlyOneWindow == 2 then
    Rainlendar_HideWindow("Day View")  
    Rainlendar_ShowWindow("Sidebar")
    Rainlendar_HideWindow("Week View")  
  else
    Rainlendar_HideWindow("Day View")  
    Rainlendar_HideWindow("Sidebar")
    Rainlendar_ShowWindow("Week View")  
  end
end

Jorge_Luis
Platinum Boarder
Posts: 795
graphgraph
User Offline Click here to see the profile of this user
Gender: Male My Rainlendar Skins Location: Argentina Birthday: 03/15
The administrator has disabled public write access.
 
#14748
Re:Switching Calendars 3 Years, 9 Months ago  
Very nice
It works as expected

The only thing is that:


elseif ShowOnlyOneWindow == 2 then
Rainlendar_HideWindow("Day View")
Rainlendar_ShowWindow("Sidebar")
Rainlendar_HideWindow("Week View")
else
Rainlendar_HideWindow("Day View")
Rainlendar_HideWindow("Sidebar")
Rainlendar_ShowWindow("Week View")

These are reversed
But that's a matter of a quick change

Also I've tested the restart of rainlendar2, and:
    Rainlendar must load a bit now, like 1 sec
    Rainlendar displays the calendar you had before you terminated it.


Thanks for all the help
Inferno
Don't Press Your Luck <^>
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: Netherlands Birthday: 06/24
The administrator has disabled public write access.
First things first:
I'm Dutch, so sorry for my bad english.
 
Go to topPage: 12
get the latest posts directly to your desktop