It is currently June 29th, 2022, 9:46 pm

Proof of Concept: Dynamic Menus for Rainmeter {OBSOLETE}

Tips and Tricks from the Rainmeter Community
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4778
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Proof of Concept: Dynamic Menus for Rainmeter {OBSOLETE}

Post by eclectic-tech »

EDIT: (2013/06/12) You are welcome to use this concept... but a FileView Plugin was created by Brian that does this and more.
You can view the plugin info here...


Proof of Concept: Dynamic Menus/Meters

Edits:
11-29 Attached Brian's List skin (no cmd window using VBS/BATCH)... THANKS BRIAN!

11-30 Attached a second example skin; DynamicMenu using NirCmd... THANKS FRAGRANT.MONKEY!

12-5 DynamicMenu3.rmskin (Updated 12-5-2012) ...
Sort option expanded AND unique setting for each menu:
  • Sortorder:
    N By name (alphabetic)
    S By size (smallest first)
    E By extension (alphabetic)
    D By date/time (oldest first)
    G Group directories first
    - Prefix to reverse order



I looked through the forum posts for anything on dynamic menus and could only find discussion and wishes.
So I am posting a possible way to obtain "dynamic menus" in Rainmeter.
Apologies if I missed something.

Would you like to be able to create a Rainmeter menu of executable items
that can be updated without having to change any code?


FEATURES
  • - Turn Any Directory List(s) Into Rainmeter Menus or Launchers
    - Gives "Windows Explorer Enabled" Drag'n Drop capability!!
    - Able to change the menu contents in Windows Explorer, and have skin update itself with a single bang
    - Unlimited number of "folder menus" with up to 99 links in each (but who needs unlimited links??)
    - WebParsed text files created in the @Resources folder create indexes for ANY meter
    - SIDE NOTE: Need help hiding the DOS command window... Anyone know an easy fix?
HOW?
Using DOS commands and the WebParser Plugin, it is possible to create lists of any folder, parse it,
and generate string indexes to use in meters. You can add or delete files in the folder using Explorer,
and with one bang, update the Rainmeter view. I use similar code in the I-Radio station list, which led to this idea.

Using the DIR DOS command (with some parameters), we can read the directory of a folder and
create/overwrite the information from a folder into a text file that can be WebParsed.
The contents can be up to 99 (WebParser limit) Windows executable files.
Once we have the list text file, we can parse it into string indexes for any meters.

CREATING LISTS
There are 2 ways to create and parse lists:
1. One large folder (99 max items ~ Look at my I-Radio skin to see code differences) or
2. An unlimited number of folders with items in each (still 99 max items, but unlimited folders).

This example skin uses scheme 2; a number of files in each folders and rotates menu "pages" by changing
the folder location (changes the #ListNumber# variable).

For this example, I limited the number of items to 8 in each "menu".
And created 8 list folders; so 64 links are available in 1 small skin.

Example bang to create 1 list:
LeftMouseDoubleClickAction=[%COMSPEC% /c DIR /b /o:n "#RootConfigPath#@Resources\List_0\*.*"
>"#RootConfigPath#@Resources\Lists\zzzDir0List.txt"]


I am reading the directory of a folder I created previously in the @Resources\ folder named "List_0";
there are 7 items in that folder. This can be repeated as many times as needed (8 in my example)
to create the directory and lists used by the WebParser (you need to change the "List_0" portion
to the next folder name "List_1", "List_2" etc. in the additional bangs (see the code below).

Still with me???

Breaking down the bang portions (What we are doing):
  • Run a DOS cmd.exe window: %COMSPEC%
    Tell it to close when finished: /c
    Setting options to read the specified directory: DIR /b /o:n
    ... note: /b = basic list ~ no headers/footers ... /o:n = order list by name
    Directory to read: "#RootConfigPath#@Resources\List_0\*.*"
    Sending the output of the DIR command: >
    ... note: > = overwrite the file ... >> = append to the file (not used in this scenario)
    File to create: "#RootConfigPath#@Resources\Lists\zzzDir0List.txt"
Notice I created a separate "Lists" folder and saved the directory lists to that folder; this
keeps the menu folder "clean"; remember everything in the "List_#" folders will be parsed and show in the skin.

Now we have a simple text file listing each of the items on individual lines.
The text file (zzzDir0List.txt) in folder "Lists" looks like this:
  • Calculator.lnk
    CCleaner.lnk
    My Computer.lnk
    My Desktop.lnk
    My Documents.lnk
    My Recent Documents.lnk
    Skins.lnk
Notice directory has NO HEADER and NO FOOTER, just the name of the files. (Gotta love DOS!)

PARSING THE LISTS
All we need to do now, is use the WebParser to read the "Lists" folder text files and create indexes.

The RegExp is looking for everything on 1 line as an index, we can use the RegExp '\n' (new line)
and '\r' (carriage return) to create a look-ahead to handle any number of items (up to 99)
and save it as a variable named GET. The look-ahead prevents formula failure if the number of items change.

The look-ahead variable would be: Get=(?(?=\n)\n(.*)\r.*)

And the RegExp: RegExp=(?siU)(.*)\r.*#GET##GET##GET##GET##GET##GET##Get#
#Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get#
#Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get#
#Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get#
#Get##Get##Get##Get##Get##Get##Get#


That's (almost) All Folk!

A couple of final notes before letting you "burst my bubble"!

SO HOW DOES THIS GIVE YOU DRAG 'N DROP?
I created a middle-mouse action on each indexed meter that opens the current list's folder
in Windows Explorer. Now you can add/delete items in that folder using the power of Windows Explorer.

UPDATING
Middle-click the "Page UP" arrow to update the lists.
This will open/close "several" UGLY command windows and update all of the directory lists.
** I NEED HELP HIDING THIS ACTION **
I tried Brian's VBS Wscript suggestion, but must have missed something, because it didn't work for me...


YOU NEED TO EDIT THE "LIST_#" FOLDERS IN THIS SKIN AND UPDATE TO HAVE ALL OF THE LINKS WORK.
Whatever you put in the folders will show in the skin; I use a substitute to remove the
common extensions (.exe, .com, .bat, .lnk, .url) so the item Titles look cleaner.
You could expand this, but in some cases, I want to know the extension...

TESTED ON WIN XP SP3
ON NEWER WINDOWS VERSIONS YOU MAY NEED TO MAKE CHANGES(?).

Enough talk! Here is the code for the included variable.inc file and the main Lists.ini
You will need to download the attached a sample List_1.0.rmskin to actually "see" the formatted menu,
but formatting is always up to you!.

Go ahead and try to "break" something.

Are we having fun yet?
Eclectic-Tech http:eclectic-tech.deviantart.com

Some code to look at:

File: @Resources\Options\Variables.inc

Code: Select all

[Variables]
ListNumber=5
SubExt=".exe":"",".com":"",".bat":"",".lnk":"",".url":""
;=======================================================================================
;---PANEL SETTINGS
;=======================================================================================
TextColor=255,255,255
TextAlpha=255
BorderColor=0,0,0
BorderAlpha=245
LineClr=0,0,0
LineAlpha=255
PositionBarWidth=4
PositionBarColor=255,255,255
PositionBarAlpha=128
;=======================================================================================
;  		--  SIDEBAR OPTIONS
;=======================================================================================
SBBorder=10
SBPanelWidth=200
;=======================================================================================
;  		-- FONTS AND TEXT COLOR OPTIONS
;=======================================================================================
FontName=Trebuchet MS
FontHeight=8
File: Rainmeter\Skins\Lists\Lists.ini

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
Group=ChangelingSidebar | EnigmaSidebar
MouseOverAction=[!ShowMeter Highlight]
MouseLeaveAction=[!HideMeter Highlight]

;!!!NOTE: You Must have Rainmeter 2.5.0 beta r1696 (Nov 18 2012) installed for scroll to work
; Update available at: http://rainmeter.net/cms/

; [ Variables ] ===========================================

[Variables]
@include=#@#Options\Variables.inc
TotalPages=[mList_1TotalPages]
Get=(?(?=\n)\n(.*)\r.*)

; [ Measures ] =============================================

[mLists]
Measure=Plugin
Plugin=Plugin\WebParser.dll
UpDateDivider=-1
URL="File://#@#Lists\zzzDir#ListNumber#List.txt"
RegExp=(?siU)(.*)\r.*#GET##GET##GET##GET##GET##GET##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get##Get#
StringIndex=1

[mListItem1]
Measure=Plugin
Plugin=Plugin\WebParser.dll
URL=[mLists]
StringIndex=1

[mListItem2]
Measure=Plugin
Plugin=Plugin\WebParser.dll
URL=[mLists]
StringIndex=2

[mListItem3]
Measure=Plugin
Plugin=Plugin\WebParser.dll
URL=[mLists]
StringIndex=3

[mListItem4]
Measure=Plugin
Plugin=Plugin\WebParser.dll
URL=[mLists]
StringIndex=4

[mListItem5]
Measure=Plugin
Plugin=Plugin\WebParser.dll
URL=[mLists]
StringIndex=5

[mListItem6]
Measure=Plugin
Plugin=Plugin\WebParser.dll
URL=[mLists]
StringIndex=6

[mListItem7]
Measure=Plugin
Plugin=Plugin\WebParser.dll
URL=[mLists]
StringIndex=7

[mListItem8]
Measure=Plugin
Plugin=Plugin\WebParser.dll
URL=[mLists]
StringIndex=8

[mListItem1Title]
Measure=Plugin
Plugin=Plugin\WebParser.dll
URL=[mLists]
StringIndex=1
Substitute=#SubExt#

[mListItem2Title]
Measure=Plugin
Plugin=Plugin\WebParser.dll
URL=[mLists]
StringIndex=2
Substitute=#SubExt#

[mListItem3Title]
Measure=Plugin
Plugin=Plugin\WebParser.dll
URL=[mLists]
StringIndex=3
Substitute=#SubExt#

[mListItem4Title]
Measure=Plugin
Plugin=Plugin\WebParser.dll
URL=[mLists]
StringIndex=4
Substitute=#SubExt#

[mListItem5Title]
Measure=Plugin
Plugin=Plugin\WebParser.dll
URL=[mLists]
StringIndex=5
Substitute=#SubExt#

[mListItem6Title]
Measure=Plugin
Plugin=Plugin\WebParser.dll
URL=[mLists]
StringIndex=6
Substitute=#SubExt#

[mListItem7Title]
Measure=Plugin
Plugin=Plugin\WebParser.dll
URL=[mLists]
StringIndex=7
Substitute=#SubExt#

[mListItem8Title]
Measure=Plugin
Plugin=Plugin\WebParser.dll
URL=[mLists]
StringIndex=8
Substitute=#SubExt#

[mListFileCount]
Measure=Plugin
Plugin=Plugin\FolderInfo
Folder=#@#Lists
InfoType=FileCount

[mListNumber]
Measure=Calc
Formula=Trunc(mListFileCount)
IfAboveValue=0
IfAboveAction=[!SetVariable TotalPages ([mListFileCount]-1)]
DynamicVariables=1

[mPageUp]
Measure=Calc
Formula=(#ListNumber#-1<0)? #TotalPages#:(#ListNumber#-1)
DynamicVariables=1

[mPageDn]
Measure=Calc
Formula=(#ListNumber#+1>#TotalPages#)? 0:(#ListNumber#+1)
DynamicVariables=1

[mPagePositionPercent]
Measure=Calc
Formula=((#ListNumber#/#TotalPages#)*100)
MaxValue=100
DynamicVariables=1

; [ Styles ] =====================================

[Style1]
X=(#SBBorder#+2)
Y=15r
W=165
H=15
ClipString=1
StringAlign=LEFT
StringStyle=NORMAL
StringEffect=NONE
FontFace=#FontName#
FontSize=#Fontheight#
FontColor=#TextColor#,#TextAlpha#
FontEffectColor=#BorderColor#,#BorderAlpha#
SolidColor=0,0,0,1

[Style2]
X=(#SBBorder#+2)
Y=15r
W=165
H=15
ClipString=1
StringAlign=LEFT
StringStyle=BOLDITALIC
StringEffect=NONE
FontFace=#FontName#
FontSize=#Fontheight#
FontColor=#TextColor#,#TextAlpha#
FontEffectColor=#BorderColor#,#BorderAlpha#
SolidColor=0,0,0,64

[StyleBar]
FontSize=8
FontFace=#FontName#
FontColor=#BorderColor#,99
AntiAlias=1
ClipString=1

[StyleBarHi]
FontSize=8
FontFace=#FontName#
FontColor=#BorderColor#,255
AntiAlias=1
ClipString=1

; [ Meters ] =====================================

[Highlight]
Meter=Image
X=#SBBorder#
Y=0
W=(#SBPanelWidth#-#SBBorder#*2)
H=126
AntiAlias=1
SolidColor=0,0,0,32
Hidden=1

[BodyBack-Top]
Meter=Image
X=0
Y=0
W=#SBPanelWidth#
H=126
MouseScrollUpAction=[Play #@#Sounds\page-flip-2.wav][!WriteKeyValue Variables ListNumber [mPageUp] "#@#Options\Variables.inc"][!Refresh]
MouseScrollDownAction=[Play #@#Sounds\page-flip-2.wav][!WriteKeyValue Variables ListNumber [mPageDn] "#@#Options\Variables.inc"][!Refresh]
AntiAlias=0
DynamicVariables=1
Hidden=0

[DividerLine0]
Meter=Image
SolidColor=#LineClr#,#LineAlpha#
X=#SBBorder#
Y=0
W=(#SBPanelWidth#-#SBBorder#*2)
H=1
DynamicVariables=1
Group=Nav

[PageUp]
Meter=IMAGE
X=(#SBPanelWidth#-#SBBorder#*2)
Y=r
W=10
H=10
ImageName=#@#\Images\up
LeftMouseUpAction=[Play #@#Sounds\page-flip-2.wav][!WriteKeyValue Variables ListNumber [mPageUp] "#@#Options\Variables.inc"][!Refresh]
MiddleMouseUpAction=[Play #@#Sounds\2setsof4.wav][%COMSPEC% /c DIR /b /o:n "#RootConfigPath#@Resources\List_0\*.*">"#RootConfigPath#@Resources\Lists\zzzDir0List.txt"][%COMSPEC% /c DIR /b /o:n "#RootConfigPath#@Resources\List_1\*.*">"#RootConfigPath#@Resources\Lists\zzzDir1List.txt"][%COMSPEC% /c DIR /b /o:n "#RootConfigPath#@Resources\List_2\*.*">"#RootConfigPath#@Resources\Lists\zzzDir2List.txt"][%COMSPEC% /c DIR /b /o:n "#RootConfigPath#@Resources\List_3\*.*">"#RootConfigPath#@Resources\Lists\zzzDir3List.txt"][%COMSPEC% /c DIR /b /o:n "#RootConfigPath#@Resources\List_4\*.*">"#RootConfigPath#@Resources\Lists\zzzDir4List.txt"][%COMSPEC% /c DIR /b /o:n "#RootConfigPath#@Resources\List_5\*.*">"#RootConfigPath#@Resources\Lists\zzzDir5List.txt"][%COMSPEC% /c DIR /b /o:n "#RootConfigPath#@Resources\List_6\*.*">"#RootConfigPath#@Resources\Lists\zzzDir6List.txt"][%COMSPEC% /c DIR /b /o:n "#RootConfigPath#@Resources\List_7\*.*">"#RootConfigPath#@Resources\Lists\zzzDir7List.txt"][!Refresh]
ToolTipText=Middle-click to Update
DynamicVariables=1
Group=Nav

[PagePosition]
Meter=BAR
MeasureName=mPagePositionPercent
X=((#SBPanelWidth#-#SBBorder#*2+3)+(2-#PositionBarWidth#/2))
Y=-1R
W=#PositionBarWidth#
H=110
BarOrientation=VERTICAL
BarColor=#PositionBarColor#,#PositionBarAlpha#
Flip=1
DynamicVariables=1
Group=Nav

[PageDown]
Meter=IMAGE
X=(#SBPanelWidth#-#SBBorder#*2)
Y=116
W=10
H=10
ImageName=#@#Images\down
LeftMouseUpAction=[Play #@#Sounds\page-flip-2.wav][!WriteKeyValue Variables ListNumber [mPageDn] "#@#Options\Variables.inc"][!Refresh]
DynamicVariables=1
Group=Nav

[FileName1]
Meter=STRING
MeterStyle=Style1
MeasureName=mListItem1Title
Y=3
LeftMouseUpAction=["#@#List_#ListNumber#\[mListItem1]"][!SetOptionGroup Nav MeterStyle Style1][!SetOption FileName1 MeterStyle Style2][!Redraw]
MiddleMouseUpAction=["%windir%\explorer.exe" /e,#@#List_#ListNumber#]
DynamicVariables=1
Group=Nav

[FileName2]
Meter=STRING
MeterStyle=Style1
MeasureName=mListItem2Title
LeftMouseUpAction=["#@#List_#ListNumber#\[mListItem2]"][!SetOptionGroup Nav MeterStyle Style1][!SetOption FileName2 MeterStyle Style2][!Redraw]
MiddleMouseUpAction=["%windir%\explorer.exe" /e,#@#List_#ListNumber#]
DynamicVariables=1
Group=Nav

[FileName3]
Meter=STRING
MeterStyle=Style1
MeasureName=mListItem3Title
LeftMouseUpAction=["#@#List_#ListNumber#\[mListItem3]"][!SetOptionGroup Nav MeterStyle Style1][!SetOption FileName3 MeterStyle Style2][!Redraw]
MiddleMouseUpAction=["%windir%\explorer.exe" /e,#@#List_#ListNumber#]
DynamicVariables=1
Group=Nav

[FileName4]
Meter=STRING
MeterStyle=Style1
MeasureName=mListItem4Title
LeftMouseUpAction=["#@#List_#ListNumber#\[mListItem4]"][!SetOptionGroup Nav MeterStyle Style1][!SetOption FileName4 MeterStyle Style2][!Redraw]
MiddleMouseUpAction=["%windir%\explorer.exe" /e,#@#List_#ListNumber#]
DynamicVariables=1
Group=Nav

[FileName5]
Meter=STRING
MeterStyle=Style1
MeasureName=mListItem5Title
LeftMouseUpAction=["#@#List_#ListNumber#\[mListItem5]"][!SetOptionGroup Nav MeterStyle Style1][!SetOption FileName5 MeterStyle Style2][!Redraw]
MiddleMouseUpAction=["%windir%\explorer.exe" /e,#@#List_#ListNumber#]
DynamicVariables=1
Group=Nav

[FileName6]
Meter=STRING
MeterStyle=Style1
MeasureName=mListItem6Title
LeftMouseUpAction=["#@#List_#ListNumber#\[mListItem6]"][!SetOptionGroup Nav MeterStyle Style1][!SetOption FileName6 MeterStyle Style2][!Redraw]
MiddleMouseUpAction=["%windir%\explorer.exe" /e,#@#List_#ListNumber#]
DynamicVariables=1
Group=Nav

[FileName7]
Meter=STRING
MeterStyle=Style1
MeasureName=mListItem7Title
LeftMouseUpAction=["#@#List_#ListNumber#\[mListItem7]"][!SetOptionGroup Nav MeterStyle Style1][!SetOption FileName7 MeterStyle Style2][!Redraw]
MiddleMouseUpAction=["%windir%\explorer.exe" /e,#@#List_#ListNumber#]
DynamicVariables=1
Group=Nav

[FileName8]
Meter=STRING
MeterStyle=Style1
MeasureName=mListItem8Title
LeftMouseUpAction=["#@#List_#ListNumber#\[mListItem8]"][!SetOptionGroup Nav MeterStyle Style1][!SetOption FileName8 MeterStyle Style2][!Redraw]
MiddleMouseUpAction=["%windir%\explorer.exe" /e,#@#List_#ListNumber#]
DynamicVariables=1
Group=Nav

[DividerLine1]
Meter=Image
SolidColor=#LineClr#,#LineAlpha#
X=#SBBorder#
Y=125
W=(#SBPanelWidth#-#SBBorder#*2)
H=1
DynamicVariables=1

[MetaData]
Author=Eclectic-Tech (http://eclectic-tech.deviantart.com)
Version=0.1
License=Creative Commons Attribution-Noncommercial-Share Alike 3.0 
Description=Lists v1.0 (Proof of Concept)
DynamicMenu Skin
dynamicmenus1.png
Attachments:
(Sample RMSKINs)
Lists.rmskin
DynamicMenu3.rmskin (Updated 12-5-2012) ...
Sort option expanded AND unique setting for each menu!
You do not have the required permissions to view the files attached to this post.
Last edited by eclectic-tech on June 13th, 2013, 3:57 am, edited 6 times in total.
User avatar
fragrant.monkey
Posts: 51
Joined: September 18th, 2010, 1:03 am

Re: Proof of Concept: Dynamic Menus for Rainmeter

Post by fragrant.monkey »

Quite an elegant solution... !!!

regarding hiding of the console window, perhaps you might consider using the incredibly powerful Nircmd utility.
http://www.nirsoft.net/utils/nircmd.html

Specifically:

execmd [command]

Executes a command of Command-Prompt (Console Window) without displaying anything on the screen.
fragrant.monkey :: deviantArt: aka snuffleupagus | coding: ThemeSaver for RocketDock | musician: Madera Dulce
User avatar
Brian
Developer
Posts: 2422
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Proof of Concept: Dynamic Menus for Rainmeter

Post by Brian »

Here is an example of how to get rid of the ugly command window:
Lists_NoCmdWindow_ .rmskin

I created a folder in @Resources called "VBS". There should be two files - one called List.vbs, and the other called List.bat.

I changed your middle click to run the .vbs script. The script runs the batch file (without a command window) that in turn runs each "DIR" command.

Enjoy!

-Brian
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4778
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Proof of Concept: Dynamic Menus for Rainmeter

Post by eclectic-tech »

Thanks to both of you for the help!

I keep forgetting about nircmd :uhuh: ... it adds lots of abilities!

I'll try them both (and make myself a note, so I remember these tips) :???:

Thanks again for the help.
CybOrSpasm
Posts: 146
Joined: January 8th, 2011, 7:12 pm
Location: Tennessee

Re: Proof of Concept: Dynamic Menus for Rainmeter

Post by CybOrSpasm »

LOL! You guys make it look so easy! };]

I have been trying for a week to do something similar, but here I was trying to use a calc with IfAboveValue/Actions etc and still not getting it to work. And here eclectic-tech writes one simple line: Formula=(#Page#-1<0)? 8:(#Page#-1) and poof, works perfectly. <shakin' head> Makes me want to bop all you code monkeys over the head with a slide rule! };]

Anyways, brilliantly done gang, and thanks for sharing your code (though I am still hoping for filelist.dll one of these days! I mean after all, looks like Samurize had one that supported thumbnails(?)) };]
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4778
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Proof of Concept: Dynamic Menus for Rainmeter

Post by eclectic-tech »

@CyborSpasm "Samurize!" :o
I spent "hours" getting to that point :D

UPDATES
Thanks to fragrant.monkey and Brian, I was able to overcome the flashing DOS boxes THANKS!
I ended up using NirCmd because I am using variables for the paths to menus and it seemed easier (for me!)

I created another example skin "DynamicMenu" which shows 3 separate menus DOCS, WALLPAPER, and RADIO with a menubar. The main difference is it "reads" locations on your computer, not list created in the skin. It also allows you to set the menu name and the path to the files.
Image
The DOCS menu uses system variables as the path; Vista and above need to enter the config utility (by right-clicking the menu bar) and change Menu1Path to %USERPROFILE%\Documents (actually just remove "My ").

WALLPAPER reads the path to my wallpapers (use the config to change to your path).

Radio reads a folder I created in the skin (same as first example skin).

This skin demonstrates how to integrate user settings into the menus, and letting the end user have some control of his menus.

I made a few improvements to the code, and I added comments describing what I am doing on most measures and meters.

File added to first post: DynamicMenu_1.0

Thanks again fragrant.monkey & Brian! :great:

Edit: corrected "/" to "\" in %UserProfile% path
Last edited by eclectic-tech on November 30th, 2012, 4:01 am, edited 1 time in total.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Proof of Concept: Dynamic Menus for Rainmeter

Post by smurfier »

CybOrSpasm wrote:Formula=(#Page#-1<0)? 8:(#Page#-1)
I believe this should work as well:
Formula=(#Page#-1+9)%9
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
CybOrSpasm
Posts: 146
Joined: January 8th, 2011, 7:12 pm
Location: Tennessee

Re: Proof of Concept: Dynamic Menus for Rainmeter

Post by CybOrSpasm »

smurfier wrote: I believe this should work as well:
Formula=(#Page#-1+9)%9
LOL! Oh great, now we got smart-ass code monkeys in here! Coming in here with your syntaxs and your non-linear chaos theory calculus! Need to get this place fumigated!

I don't suppose reversing that (to scroll in the other direction), is as easy as Formula=(#Page#+1-9)%9 is it?

damn code monkey...};]
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4778
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Proof of Concept: Dynamic Menus for Rainmeter

Post by eclectic-tech »

@CybOrSpasm

BEWARE of "SHORT BLUE" people with mathematics skills! :lol:

They are always finding other ways to get things done! :sly:
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Proof of Concept: Dynamic Menus for Rainmeter

Post by smurfier »

CybOrSpasm wrote: I don't suppose reversing that (to scroll in the other direction), is as easy as Formula=(#Page#+1-9)%9 is it?

damn code monkey...};]
Formula=#Page#%9+1

*cough* *cough*
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .