Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 449

Help Creating a Drop Down Menu

$
0
0
I am using the CyberSearch skin found here:
https://www.deviantart.com/cybergen49/art/CyberSearch-for-Rainmeter-826087442

I currently have 5 search bars on my desktop. 2 searches two different places of a local intranet website, 2 opens the Everything app to search the network via explorer, and 1 is for google. I think it would be much cleaner to just have one search bar with a drop down menu on the left side which when clicked allows me choose between the 5 search bars while still retaining search history for each individual search option. Any clue on how I'd go about doing this? The first code is the main file for the skin and the second is for the google search bar settings.

Code:

# This is the template that will be imported by all the parent search bar skins.# Editing this template will effect all search bars equally.[Variables]backgroundLight=ffffffbackground2Light=eeeeeebackground3Light=ddddddtextC1Light=000000textC2Light=aaaaaabackgroundDark=222222background2Dark=333333background3Dark=444444textC1Dark=fffffftextC2Dark=777777[SwitchColourMode]Measure=StringString=#switchMode#.#mode#IfMatch=1.LightIfMatchAction=[!WriteKeyValue Variables mode "Dark"][!Refresh]IfMatch2=1.DarkIfMatchAction2=[!WriteKeyValue Variables mode "Light"][!Refresh]DynamicVariables=1[GetURL]Measure=StringString=#engineURLQuery#Substitute="{q}":"#query#"DynamicVariables=1[RunSearch]Measure=CalcFormula=0IfCondition=#runSearch#=1IfTrueAction=["[GetURL]"][!SetVariable runSearch 0][!SetVariable updateHistory 1][!Update]DynamicVariables=1[RecallSearch]Measure=CalcFormula=0IfCondition=#recallSearch#=1IfTrueAction=["https://www.google.com/search?q=#query#"][!SetVariable recallSearch 0][!Update]DynamicVariables=1[ShowHistory]Measure=CalcFormula=1IfCondition=#showHistory#=1IfTrueAction=[!ShowMeterGroup history][!Update]IfFalseAction=[!HideMeterGroup history][!Update]DynamicVariables=1[UpdateHistory]Measure=StringString=#updateHistory#IfMatch=1IfMatchAction=[!SetVariable history5 "#history4#"][!SetVariable history4 "#history3#"][!SetVariable history3 "#history2#"][!SetVariable history2 "#history1#"][!SetVariable history1 "#query#"][!SetVariable starterHistory 0][!SetVariable writeHistory 1][!SetVariable updateHistory 0][!Update]DynamicVariables=1[WriteHistory]Measure=StringString=#writeHistory#IfMatch=1IfMatchAction=[!WriteKeyValue Variables history1 "#history1#"][!WriteKeyValue Variables history2 "#history2#"][!WriteKeyValue Variables history3 "#history3#"][!WriteKeyValue Variables history4 "#history4#"][!WriteKeyValue Variables history5 "#history5#"][!WriteKeyValue Variables starterHistory 0][!SetVariable writeHistory 0][!Update]DynamicVariables=1[CheckStarterHistory]Measure=StringString=#starterHistory#IfMatch=1IfMatchAction=[!SetOption RecentSearchesHeading Text "Popular searches"][!Update][Background]Meter=ShapeGroup=historyShape=Rectangle 0,0,370,215,20,20 | Fill Color [#background2[#mode]] | StrokeWidth 0Hidden=1DynamicVariables=1[SearchBar]Meter=ShapeShape=Rectangle 0,0,370,40,20,20 | Fill Color [#background[#mode]] | StrokeWidth 0DynamicVariables=1[TextClickArea]Meter=ShapeShape=Rectangle [DefaultText:X],0,[DefaultText:W],[SearchBar:H] | Fill Color 00000001 | StrokeWidth 0DynamicVariables=1MouseActionCursorName=TextLeftMouseUpAction=[!SetVariable showHistory 1][!CommandMeasure SearchInput "ExecuteBatch ALL"][!Update][EngineLogo]Meter=ImageImageName="#engineIcon#"X=12Y=8W=24H=24SolidColor=00000001TooltipText=Double click me to change the colour mode!#CRLF#(It could take a few seconds)MouseActionCursor=0LeftMouseDoubleClickAction=[!SetVariable switchMode 1][!Update][DefaultText]Meter=String#Text=#query#Text=Type here to search #engineName#X=45Y=20W=([SearchBar:W]-[DefaultText:X]-20)FontFace=Segoe UIFontSize=11FontColor=[#textC2[#mode]]StringAlign=LeftCenterAntiAlias=1ClipString=1DynamicVariables=1[SearchInput]Measure=PluginPlugin=InputTextFocusDismiss=1X=([DefaultText:X]-3)Y=[DefaultText:Y]W=[DefaultText:W]H=25SolidColor=[#background[#mode]]FontFace=Segoe UIFontSize=11FontColor=[#textC1[#mode]]StringAlign=LeftCenterAntiAlias=1ClipString=1DynamicVariables=1OnDismissAction=[!SetVariable showHistory 0][!Update]Command1=[!SetVariable query "$UserInput$"][!SetVariable runSearch 1][!SetVariable showHistory 0][!Update][RecentSearchesHeading]Meter=StringGroup=historyText=Recent searchesX=15Y=50W=([SearchBar:W]-[DefaultText:X]-20)FontFace=Segoe UIFontSize=10FontColor=[#textC1[#mode]]InlineSetting=Weight | 700StringAlign=LeftTopAntiAlias=1ClipString=1DynamicVariables=1Hidden=1[InstructionHeading]Meter=StringGroup=historyText=Press Enter to searchX=355Y=50W=([SearchBar:W]-[DefaultText:X]-20)FontFace=Segoe UIFontSize=10FontColor=[#textC2[#mode]]InlineSetting=Weight | 700StringAlign=RightTopAntiAlias=1ClipString=1DynamicVariables=1Hidden=1[History1]Meter=StringGroup=historyText=#history1#X=15Y=4RW=320Padding=10,4,10,4SolidColor=00000001FontFace=Segoe UIFontSize=10FontColor=[#textC1[#mode]]StringAlign=LeftTopAntiAlias=1ClipString=1DynamicVariables=1MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor "[#background3[#mode]]"][!Update]MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor "[#background2[#mode]]"][!Update]LeftMouseUpAction=[!SetVariable query "#history1#"][!SetVariable recallSearch 1][!Update]Hidden=1[History2]Meter=StringMeterStyle=History1Text=#history2#Y=0RSolidColor=00000001MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor "[#background3[#mode]]"][!Update]MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor "[#background2[#mode]]"][!Update]LeftMouseUpAction=[!SetVariable query "#history2#"][!SetVariable recallSearch 1][!Update][History3]Meter=StringMeterStyle=History1Text=#history3#Y=0RSolidColor=00000001MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor "[#background3[#mode]]"][!Update]MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor "[#background2[#mode]]"][!Update]LeftMouseUpAction=[!SetVariable query "#history3#"][!SetVariable recallSearch 1][!Update][History4]Meter=StringMeterStyle=History1Text=#history4#Y=0RSolidColor=00000001MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor "[#background3[#mode]]"][!Update]MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor "[#background2[#mode]]"][!Update]LeftMouseUpAction=[!SetVariable query "#history4#"][!SetVariable recallSearch 1][!Update][History5]Meter=StringMeterStyle=History1Text=#history5#Y=0RSolidColor=00000001MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor "[#background3[#mode]]"][!Update]MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor "[#background2[#mode]]"][!Update]LeftMouseUpAction=[!SetVariable query "#history5#"][!SetVariable recallSearch 1][!Update]1

Code:

[Rainmeter]Update=-1AccurateText=1RightMouseUpAction=[!SkinCustomMenu]ContextTitle=EditContextAction=["#CONFIGEDITOR#" "#CURRENTPATH##CURRENTFILE#"]ContextTitle2=-ContextAction2=[]ContextTitle3=Reload skinContextAction3=[!Refresh]ContextTitle4=Unload SkinContextAction4=[!DeactivateConfig]ContextTitle5=-ContextAction5=[]ContextTitle6=Standard context menuContextAction6=[!SkinMenu][Metadata]Name=Search BarAuthor=CyberOfficialInformation=A straightforward search bar with search history. Customizable to your website of choice.Version=1.0License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0[Variables]# Search settingsengineName=GoogleengineIcon=#@#google.png# "{q}" (without quotes) will be replaced with the user's input.engineURLQuery=https://www.google.com/search?q={q}# History storagehistory1=fdsgfdhistory2=ddhistory3=hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhgggggggggggggggggghistory4=disney plushistory5=hurricane dorianstarterHistory=0# Color mode: Type "Light" or "Dark" (without quotation marks) after mode=mode=Dark# Search bar template import# Don't change anything after this line!@include=#@#searchBarTemplate.ini

Statistics: Posted by Hootistigglebits — Yesterday, 9:06 pm — Replies 4 — Views 129



Viewing all articles
Browse latest Browse all 449

Trending Articles