Along the lines of RainRGB, this addon allows the user to choose a file, using the Windows "open file" dialog, then sends a !WriteKeyValue command using the file path as the new value. It also refreshes all skins when finished. Great for letting your users customize images and icons, app launcher locations, note files, and the like.
The Type parameter specifies whether a "File" or "Folder" is to be selected.
The DefaultValue parameter should specify the complete file path of the current or default file. The addon uses this information to determine where the Open File dialog should start.
The Pieces parameter specifies the parts of the file or folder address to return: the drive (D), path (P), name (N) and/or extension (E). If a folder is being chosen, the extension will be blank. The default value is "DPNE" (all parts).
The Debug parameter gives you more detailed feedback about how RainFile is running. Default is "0"; set to "1" to enable.
As with everything I touch, RainFile is licensed as Creative Commons BY-NC-SA 3.0, so feel free to redistribute this with your skins. To do this, add RainFile to your skin's @Resources folder, in:
SkinName\@Resources\Addons\RainFile\RainFile.exe
Then, in your skins, you can run RainFile from that location. For example:
0.9.6 4 July, 2012 Replaced "NameOnly" with "Pieces".
0.9.5 26 June, 2012 Added "NameOnly" parameter.
0.9.4 24 June, 2012 Various improvements by Jeff Morley.
0.9.3 31 August, 2011 Fixed error that occurred when Rainmeter and target file were on separate drives.
0.9.2 21 July, 2011 Script now quits before executing when dialog is canceled by user.
0.9.1 21 July, 2011 Added option to select folders, in addition to files.
0.9.0 20 July, 2011 Original.
You do not have the required permissions to view the files attached to this post.
3. I notice one thing:
when I choose a pic, it show me this --> pic=C:\documents....\Rainmeter\Skins\RainFile\pork.png
Open again, but now I don't choose one and click cancel (or the X top right) --> the variable pic is empty and show nothing --> pic=
I don't know, but it would be better when it save the last correct input and don't become empty !
Rainmeter - You are only limited by your imagination and creativity.
I've played with it for about an hour and have ran into no problems.Works like a charm.nicely done.I would have one request,if it is possible, could refresh config specification be added,as jsmorely did in RainRGB.
My preference would be to specify the entire bang myself. Gives the use even more options.
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 . . .
Not bad, but theres quite a bit you can add to it.
In general, it would be nice to have the tool set a variable (E.G. FileBrowseComplete) to 1 when file browsing is completed, and if the browse window was closed, then have it set it to -1.
For the "FileBrowse" function, these features can be added:
Title - Title text of the Dialog GUI.
SectionName/KeyName/FileSpec - See !SetVariable in the Rainmeter Documentation
InitDir - Initial directory selected in the GUI file tree.
FileFilter - File type single filter such as "All (*.*)" or "Text files (*.txt)" or multiple filter groups such as "All (*.*)|Text files (*.txt)"
Options [optional] -
1 = File Must Exist (if user types a filename)
2 = Path Must Exist (if user types a path, ending with a backslash)
4 = Allow MultiSelect
8 = Prompt to Create New File (if does not exist)
Note: Dialog Options: To use more than one option, add the required values together.
DefaultName [optional] - Suggested file name for the user to open.
For the FolderBrowse Function, these features can be added:
Title - Title text of the Dialog GUI.
SectionName/KeyName/FileSpec - See !WriteKeyValue in the Rainmeter Documentation
InitDir - Initial directory selected in the GUI file tree.
FileFilter - File type single filter such as "All (*.*)" or "Text files (*.txt)" or multiple filter groups such as "All (*.*)|Text files (*.txt)"
Options [optional] -
1 = File Must Exist (if user types a filename)
2 = Path Must Exist (if user types a path, ending with a backslash)
4 = Allow MultiSelect
8 = Prompt to Create New File (if does not exist)
Note: Dialog Options: To use more than one option, add the required values together.
Be VERY specific with what you ask for.
The more specific you are, the higher the quality of support you receive.
Do not just copy and paste what I put in examples and come back saying it doesn't work.
It does work, but I purposely left blanks that you need to fill for your specific needs.
I have them included in my file browse / folder browse tools if you wish to just alter it to your needs. Of course mine aren't as clean as your's as there's 4 different executables, one for each function: FileBrowse SetVariable/WriteKey and FolderBrowse SetVariable/Writekey. I could rewrite them all into one, but i just don't have the time to do so with school :/
It would be much easier to do with a func call and then pass the variables, and if something is missing, it just defaults.
Be VERY specific with what you ask for.
The more specific you are, the higher the quality of support you receive.
Do not just copy and paste what I put in examples and come back saying it doesn't work.
It does work, but I purposely left blanks that you need to fill for your specific needs.