Advertisement
Corvust

Cyclic Menu

Jul 19th, 2018
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; =====================================================================
  2.  
  3. ; Skin Actions
  4.  
  5. ; MouseScrollActions
  6.     ; By scrolling on the skin, different groups of icons are loaded.
  7.  
  8. ; =====================================================================
  9.  
  10. [Rainmeter]
  11.  
  12. MouseScrollUpAction=[!SetOption Counter_CurrentGroup Formula "((Counter_CurrentGroup+#NoGroup#)%(#NoGroup#+1))"][!UnPauseMeasure Counter_CurrentGroup][!UpdateMeasure Counter_CurrentGroup][!Update]
  13.  
  14. MouseScrollDownAction=[!SetOption Counter_CurrentGroup Formula "((Counter_CurrentGroup+1)%(#NoGroup#+1))"][!UnPauseMeasure Counter_CurrentGroup][!UpdateMeasure Counter_CurrentGroup][!Update]
  15.  
  16. ; ============================================================================================
  17.  
  18. ; [Variables]
  19. ; Declaring relevant variables
  20.  
  21. ; ============================================================================================
  22.  
  23. [Variables]
  24. NoGroup=5
  25.  
  26. ; =====================================================================
  27.  
  28. ; [Counter_CurrentGroup]
  29.     ; Keeps track of the group of icons that should be displayed currently.
  30.     ; Cycles between 1,2,3,etc. and #NoGroup#,
  31.     ; at values of 1,2,3,etc. the respective groups of icons are displayed,
  32.     ; at value of 0, the tracker updates immediately and jumps to the next valid value (1,2,3,etc.).
  33.     ; Formula is elected via MouseActions in [Rainmeter].
  34.  
  35. ; =====================================================================
  36.  
  37. [Counter_CurrentGroup]
  38. Measure=Calc
  39. OnUpdateAction=[!PauseMeasure Counter_CurrentGroup]
  40. Paused=1
  41.  
  42. RegExpSubstitute=1
  43. Substitute="^(\d{0,})$":"Group\1"
  44. ; This substitute means to:
  45.     ; Phrase the Value of [Counter_CurrentGroup] as '\1' (so 1,2,3,4, etc.)
  46.     ; Then put 'Group' in front of '\1' (so Group1, Group2, Group3, etc.)
  47.  
  48. IfConditionMode=1
  49. IfCondition=(Counter_CurrentGroup=0)
  50. IfTrueAction=[!UpdateMeasure Counter_CurrentGroup]
  51. ; Skips the value of 0
  52. OnChangeAction=[!HideMeterGroup GroupAll][!ShowMeterGroup [Counter_CurrentGroup]][!UpdateMeterGroup [Counter_CurrentGroup]]
  53. ; Whenever possible, this measure attempts to set the variables CurrentGroup to the substituted value of this measure, and shows the respective group of slates
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement