It is currently April 27th, 2024, 5:46 pm

Windows 8/Inputtext.dll bug

Report bugs with the Rainmeter application and suggest features.
User avatar
UnforgivenRevival
Posts: 310
Joined: June 7th, 2012, 2:25 am
Location: Philadelphia, PA

Windows 8/Inputtext.dll bug

Post by UnforgivenRevival »

Seems that with windows 8, The inputtext.dll plugin goes wacky when using it with a search engine. No matter what internet search skin I use, If the search query has more than one word in it, and is using the inputtext.dll plugin, It opens each word in a seperate internet tab/page.

Simple example:

Enter "Rainmeter is the coolest!" (without quotes)into the skin.

First page link says(without quotes) "https://www.google.com/search?q=Rainmeter"
Second page link says(without quotes) "is/"
Third page says(without quotes) "the/"
Fourth page says(without quotes) "coolest%21"

I have tried re-installing the skins, setting different browsers as default, Along with different versions of Rainmeter, and seems to only have the problem in Windows 8. Never had this problem when I have my Windows 7 hard drive plugged in and booted from.

Windows 8 Pro with Media Center x64
Currently installed version of Rainmeter: 2.4.0 r1678 64-bit

Can anyone else confirm this happening? :headbang:
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Windows 8/Inputtext.dll bug

Post by poiru »

Is the skin using quotes around the URL? The following works fine here on Win8 Pro:
["http://www.google.com/search?q=$UserInput$"]
User avatar
UnforgivenRevival
Posts: 310
Joined: June 7th, 2012, 2:25 am
Location: Philadelphia, PA

Re: Windows 8/Inputtext.dll bug

Post by UnforgivenRevival »

poiru wrote:Is the skin using quotes around the URL? The following works fine here on Win8 Pro:
["http://www.google.com/search?q=$UserInput$"]

Yes, There originally was quotes around it all, And even tried removing them to see what happens. here is the code to one of the skins. Still unsure what is going on.
[Rainmeter]
Author=Xyrfo and fediaFedia
Update=500000
DynamicWindowSize=1
MouseActionCursor=0
MiddleMouseUpAction=!DeactivateConfig
MouseLeaveAction=!Execute [!HideMeter context][!HideMeter T1][!HideMeter T2][!HideMeter T3][!HideMeter T4][!HideMeter T5][!HideMeter T6][!Redraw]

[Metadata]
Version=5.0
Information=GoogleSearch TextItem
License=Creative Commons Attribution-NonCommercial-NoDerivs 3.0

[Variables]
@include=#ROOTCONFIGPATH#Common\Variables\Languages\lang.inc
@include2=uservariables.inc
@include3=#ROOTCONFIGPATH#Common\color\color.inc
Height=30
;End of added Metadata
ColorT=255

[bg3i]
Meter=Image
SolidColor=#textcolor2#,1
W=#searchwidth#
H=30
X=0
MouseOverAction=!Execute [!ShowMeter MeterSettings][!Redraw]
MouseLeaveAction=!Execute [!HideMeter MeterSettings][!Redraw]

[left]
Meter=Image
ImageName=left.png
X=20
ImageTint=0,0,0,200
Hidden=#DisableRoundedEdges#

[bg3]
Meter=Image
SolidColor=0,0,0,200
W=#searchwidth#
H=#Height#
X=(#Height#+5)
Meter=Image
ImageName=right.png
X=R
ImageTint=0,0,0,200
Hidden=#DisableRoundedEdges#

[arrow]
Meter=Image
ImageName=arrow.png
X=-30r
ImageTint=255,255,255,200
LeftMouseUpAction=!Execute [!ShowMeter context][!ShowMeter T1][!ShowMeter T2][!ShowMeter T3][!ShowMeter T4][!ShowMeter T5][!ShowMeter T6][!Redraw]

[context]
Meter=Image
X=-50r
Y=30
SolidColor=0,0,0,200
SolidColor2=0,0,0,130
GradientAngle=90
W=80
H=115
Hidden=1

[faviconB]
Meter=Image
SolidColor=255,255,255,1
W=1
H=16
X=45
Y=8

[favicon]
Meter=Image
ImageName=#CURRENTPATH#favicon\#searchengineT#.png
W=20
H=16
X=45
Y=7
Hidden=#HideFavicon#

[Text]
Meter=String
FontFace=#FontTypeWP#
X=R
Y=0
Text="#searchengineT# #search#"
FontColor=255,255,255,200
FontSize=(#Height#/2)
W=(#searchwidth#-30)
H=(#Height#-4)
AntiAlias=1
LeftMouseUpAction=!CommandMeasure Input "ExecuteBatch 1"

[Input]
Measure=Plugin
Plugin=InputText.dll
X=35
Y=0
W=#searchwidth#
H=#Height#
SolidColor=0,0,0,200
FontColor=255,255,255,200
FontSize=15
FontFace=#FontTypeWP#
AntiAlias=1
FocusDismiss=1
Command1=!Execute ["#searchengine#$UserInput$"] DefaultValue=""

[MeterSettings]
Meter=Button
ButtonImage=settingsd.png
X=6
Y=0
ButtonCommand=!Execute ["#ROOTCONFIGPATH#Common\Config\config.exe" text "#CURRENTCONFIG#" "#SETTINGSPATH#"]
Hidden=1

[styl]
Y=19r
FontColor=220,220,220,200
FontSize=10
FontFace=#FontTypeWP#
X=(#searchwidth#-38)
StringAlign=LEFT
AntiAlias=1

[T1]
Meter=String
MeterStyle=styl
Y=30
Text=Google
Hidden=1
LeftMouseUpAction=!Execute [!WriteKeyValue Variables SearchengineT Google "#ROOTCONFIGPATH#TextItems\GoogleSearch\USerVariables.inc"][!WriteKeyValue Variables Searchengine http://www.google.com/search?q= "#ROOTCONFIGPATH#TextItems\GoogleSearch\USerVariables.inc"][!Refresh #CURRENTCONFIG#]

[T2]
Meter=String
MeterStyle=styl
Text=Bing
Hidden=1
LeftMouseUpAction=!Execute [!WriteKeyValue Variables SearchengineT Bing "#ROOTCONFIGPATH#TextItems\GoogleSearch\USerVariables.inc"][!WriteKeyValue Variables Searchengine http://www.bing.com/search?q= "#ROOTCONFIGPATH#TextItems\GoogleSearch\USerVariables.inc"][!Refresh #CURRENTCONFIG#]

[T3]
Meter=String
MeterStyle=styl
Text=Wikipedia
Hidden=1
LeftMouseUpAction=!Execute [!WriteKeyValue Variables SearchengineT Wikipedia "#ROOTCONFIGPATH#TextItems\GoogleSearch\USerVariables.inc"][!WriteKeyValue Variables Searchengine http://en.wikipedia.org/w/index.php?title=Special%3ASearch&searcH= "#ROOTCONFIGPATH#TextItems\GoogleSearch\USerVariables.inc"][!Refresh #CURRENTCONFIG#]

[T4]
Meter=String
MeterStyle=styl
Text=Wolfram
Hidden=1
LeftMouseUpAction=!Execute [!WriteKeyValue Variables SearchengineT WolframAlpha "#ROOTCONFIGPATH#TextItems\GoogleSearch\USerVariables.inc"][!WriteKeyValue Variables Searchengine http://www.wolframalpha.com/input/?i= "#ROOTCONFIGPATH#TextItems\GoogleSearch\USerVariables.inc"][!Refresh #CURRENTCONFIG#]

[T5]
Meter=String
MeterStyle=styl
Text=Yahoo
Hidden=1
LeftMouseUpAction=!Execute [!WriteKeyValue Variables SearchengineT Yahoo! "#ROOTCONFIGPATH#TextItems\GoogleSearch\USerVariables.inc"][!WriteKeyValue Variables Searchengine http://www.yahoo.com/search?q= "#ROOTCONFIGPATH#TextItems\GoogleSearch\USerVariables.inc"][!Refresh #CURRENTCONFIG#]

[T6]
Meter=String
MeterStyle=styl
Text=DuckGo
Hidden=1
LeftMouseUpAction=!Execute [!WriteKeyValue Variables SearchengineT DuckDuckGo "#ROOTCONFIGPATH#TextItems\GoogleSearch\USerVariables.inc"][!WriteKeyValue Variables Searchengine http://duckduckgo.com/?q= "#ROOTCONFIGPATH#TextItems\GoogleSearch\USerVariables.inc"][!Refresh #CURRENTCONFIG#]

EDIT: Tried to enter the link in the meter manually instead of using a variable, With the same results. Opens every word in a new page.
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Windows 8/Inputtext.dll bug

Post by Kaelri »

It definitely sounds like the quotes around the URL are being lost somewhere along the way. You might be able to preserve them by using "magic quotes":

Code: Select all

Command1=[""" "#searchengine#$UserInput$" """] DefaultValue=""
If you can't find a solution, you could also try using a script to convert the spaces into %20 before sending the URL:

Code: Select all

Command1=[!CommandMeasure Script "SendURL([[#searchengine#$UserInput$]])"] DefaultValue=""

Code: Select all

function SendURL(Address)
    Address = Address:gsub(' ', '%%20')
    SKIN:Bang(('["%s"]'):format(Address))
end
User avatar
UnforgivenRevival
Posts: 310
Joined: June 7th, 2012, 2:25 am
Location: Philadelphia, PA

Re: Windows 8/Inputtext.dll bug

Post by UnforgivenRevival »

Kaelri wrote:It definitely sounds like the quotes around the URL are being lost somewhere along the way. You might be able to preserve them by using "magic quotes":

Code: Select all

Command1=[""" "#searchengine#$UserInput$" """] DefaultValue=""
If you can't find a solution, you could also try using a script to convert the spaces into %20 before sending the URL:

Code: Select all

Command1=[!CommandMeasure Script "SendURL([[#searchengine#$UserInput$]])"] DefaultValue=""

Code: Select all

function SendURL(Address)
    Address = Address:gsub(' ', '%%20')
    SKIN:Bang(('["%s"]'):format(Address))
end

Thanks Kaelri, That LUA code seems to work without a problem. Still unsure of the cause of the problem, But this solution works better than before. :D