It is currently April 28th, 2024, 11:44 am

[Solved] Help with devlopment

Get help with creating, editing & fixing problems with skins
Mods
Posts: 19
Joined: August 14th, 2012, 7:13 am

[Solved] Help with devlopment

Post by Mods »

I wont go into too much detail what I'm creating but here's a basic run down.

There is a input box (Where it says "Resolve..." and below that there is a prefex like in the picture below.
Image

Now what i want to do is when the input has been inputted and I press enter it will use my site + the input to search my site for the parameter then display it in the output.

Ive followed this tutorial and managed to get it working but I'm not sure how to make it so I can use the input box because the input is not static...

http://rainmeter.net/cms/Tips-WebParserPrimer

If anyone could help me that would be great.
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Help with devlopment

Post by Kaelri »

Since you haven't posted your code, I'm going to assume that your site has some kind of URL with a search parameter, like this:

Code: Select all

http://www.yoursite.com/search?q=terms
If this is the case, you can assign the search terms to a variable:

Code: Select all

[Variables]
SearchTerms=whatever

[WebParserMeasure]
Measure=Plugin
Plugin=WebParser
Url=http://www.yoursite.com/search?q=#SearchTerms#
...
Then, use the InputText command to change this variable in the file, then refresh the skin so that WebParser can use the new URL.

Code: Select all

Command1=[!WriteKeyValue Variables SearchTerms "$UserInput$"][!Refresh]
(See more about using InputText here if you're not familiar with it.)
Mods
Posts: 19
Joined: August 14th, 2012, 7:13 am

Re: Help with devlopment

Post by Mods »

Kaelri wrote:Since you haven't posted your code, I'm going to assume that your site has some kind of URL with a search parameter, like this:

Code: Select all

http://www.yoursite.com/search?q=terms
If this is the case, you can assign the search terms to a variable:

Code: Select all

[Variables]
SearchTerms=whatever

[WebParserMeasure]
Measure=Plugin
Plugin=WebParser
Url=http://www.yoursite.com/search?q=#SearchTerms#
...
Then, use the InputText command to change this variable in the file, then refresh the skin so that WebParser can use the new URL.

Code: Select all

Command1=[!WriteKeyValue Variables SearchTerms "$UserInput$"][!Refresh]
(See more about using InputText here if you're not familiar with it.)

Thank you very much for this, but for some reason its not displaying the value :(
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Help with devlopment

Post by Kaelri »

Well, without the code, we're never going to know what "some reason" might be. ;)
Mods
Posts: 19
Joined: August 14th, 2012, 7:13 am

Re: Help with devlopment

Post by Mods »

Kaelri wrote:Well, without the code, we're never going to know what "some reason" might be. ;)
what code do you need? The website + what ive done with rainmeter already?
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Help with devlopment

Post by Kaelri »

The complete code from your skin .INI file would be best.
Mods
Posts: 19
Joined: August 14th, 2012, 7:13 am

Re: Help with devlopment

Post by Mods »

Kaelri wrote:The complete code from your skin .INI file would be best.
Honeslty I'm not very good at this but this is all I could come up with.
Last edited by Mods on August 14th, 2012, 8:38 pm, edited 1 time in total.
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Help with devlopment

Post by Kaelri »

Try the InputText command as:

Code: Select all

Command1=[!WriteKeyValue Variables SearchTerms "$UserInput$" "#CURRENTPATH##CURRENTFILE#"][!Refresh]
Mods
Posts: 19
Joined: August 14th, 2012, 7:13 am

Re: Help with devlopment

Post by Mods »

Kaelri wrote:Try the InputText command as:

Code: Select all

Command1=[!WriteKeyValue Variables SearchTerms "$UserInput$" "#CURRENTPATH##CURRENTFILE#"][!Refresh]
Nothing... I know its working to some point because when I press enter it refreshes my rainmeter...
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Help with devlopment

Post by Kaelri »

Well, I can confirm that it does update the #SearchTerms# variable with the user's text input. What happens from there, I can't really help with without a valid "key" in the URL. All I can suggest is to check your log for errors; use the Debug option on WebParser to check if you're getting the right data; and/or use RainRegExp to make sure your regular expression is correct.