It is currently October 18th, 2019, 7:13 am

UserInput Default value not working

Help with creating, editing & fixing problems with skins
DanDaBear
Posts: 19
Joined: February 23rd, 2018, 3:12 am

UserInput Default value not working

DanDaBear » April 27th, 2019, 6:29 am

Hi, I am working on a Settings skin for my text launchers. I have it mostly done but I want the default value of UserInput to show what is currently in the variable for the apps location so it can be edited. They look like this:

Progs4App=["%ProgramFiles(x86)%\Notepad++\notepad++.exe"]

I also have a String meter to show the variable before user clicks to open UserInput and that works fine. (see image below)

Settings1.png
All that shows in the UserInput box is a bracket.

I've tried magic quotes, single quotes and double quotes and nothing works!

I think it's the brackets causing the problem but without them, even though it
shows in the default value of UserInput the apps won't run!
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 8852
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: UserInput Default value not working

balala » April 27th, 2019, 7:37 am

Could you please post the code you have so far?
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3575
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: UserInput Default value not working

eclectic-tech » April 27th, 2019, 1:42 pm

Seeing the code will help...

If the height of your input measure is not large enough, your default value will be there, but not show in the input box.
Try increasing the height of the input measure or reducing the font size used in that measure until the default value is visible.
DanDaBear
Posts: 19
Joined: February 23rd, 2018, 3:12 am

Re: UserInput Default value not working

DanDaBear » April 27th, 2019, 9:33 pm

Hi Balala and eclectic-tech,

The Height is not the problem nor the width, as the first app, Progs1App, works fine (Notepad has no quotes or brackets) and all the
text labels come up fine in UserInput box. If you look at the image, you can see that in Progs2App, the first bracket shows with UserInput but nothing more. (I did increase both height and width to be sure)

The same variables show fine in the Text meter, which is what is showing before clicking with mouse, just not in UserInput.

I have attached the entire thing as an .rmskin, as there are Include files for variables and stuff.
I am using the latest Rainmeter, Rainmeter 4.3.0.3298 (64-bit) (see version info in spoiler)
Language: English (1033)
Build time: 2019-03-18 11:00:34
Commit Hash: 3593c281
Windows 10 Home 1803 64-bit (build 17134) - English (1033)
Path: E:\Rainmeter\
SkinPath: C:\Users\dantm\Documents\Rainmeter\Skins\
SettingsPath: C:\Users\dantm\AppData\Roaming\Rainmeter\
IniFile: C:\Users\dantm\AppData\Roaming\Rainmeter\Rainmeter.ini
Thank you for your time and effort.
InfoLaunchBar_1.0.rmskin
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3575
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: UserInput Default value not working

eclectic-tech » April 28th, 2019, 1:19 am

Remove all of the brackets and quotation marks from the variable values in the included file 'ProgrammingHVars.inc'.
You do not need to have anything but the complete path to the program executable and the desired name.
Example:

Code: Select all

Progs3App=E:\SteamLibrary\steamapps\common\GameMaker Studio 2 Desktop\GameMakerStudio.exe
Progs3Name=Gamemaker Studio 2
With the brackets/quotes removed, I can see all of the default values for apps and names in the settings skin before and after clicking to modify.

You need to change the LeftMouseUpAction in [ProgsStyle] section in the 'ProgrammingH.inc' file to properly launch the current clicked app:

Code: Select all

LeftMouseUpAction=["[#[#CURRENTSECTION]App]"][!HideMeterGroup Progs][!ZPos "0"][!UpdateMeter *][!Redraw]
If you have the correct paths to the executables, your apps should launch; tested with Notepad, Notepad++.exe, and SciTE.exe variables and all of them displayed and launched when clicked.

After entering a new app path in the 'ProgSettings.ini' skin, I am getting a Win10 query to select a program to open the inputted app... this may be due to having the same mouse actions on both the string and background for the input.
Not sure how to avoid this, I just ignore the Win10 request. :???:
DanDaBear
Posts: 19
Joined: February 23rd, 2018, 3:12 am

Re: UserInput Default value not working

DanDaBear » April 28th, 2019, 1:47 am

Thank you SO much, eclectic-tech! It works! :thumbup:

I have been tearing my hair out to get this to work, and as usual it was something simple.
Now I just have to fix the other seven menu include files!

I am getting a Win10 query to select a program to open the inputted app...

Yeah, I'll have to work on that. I'll remove the mouse actions from all but one thing and see if that works.

Thank you again. :bow:

And thank you Balala for your consideration!
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3575
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: UserInput Default value not working

eclectic-tech » April 29th, 2019, 2:21 pm

Happy to help! :welcome: