It is currently April 30th, 2024, 8:50 pm

Help Creating a Drop Down Menu

Get help with creating, editing & fixing problems with skins
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Help Creating a Drop Down Menu

Post by eclectic-tech »

Hootistigglebits wrote: April 14th, 2024, 5:28 am electric-tech, that worked. When I select a different search engine the bar quickly fades out and then back in again. How do I force it to not fade in and out like that?

I just noticed an issue. If I click on the history of any search bar it defaults to searching that item in google. How do I make the history open up to the correct search engine?
It fades because you are unloading one skin variant and loading a completely new skin.

I used the code posted by RicardoTM. The search history is stored separately in each search skins and shows a different history for me. It seems you are using different code, so post what you are using, and we can test it.

@RicardoTM
I should have said the context menu colors are controlled by Windows (not necessarily by a specific theme)
Nice find... I had forgotten about that dark mode post by ozone, it is undocumented but was working last time I tried.
RicardoTM
Posts: 271
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: Help Creating a Drop Down Menu

Post by RicardoTM »

eclectic-tech wrote: April 14th, 2024, 12:21 pm @RicardoTM
I should have said the context menu colors are controlled by Windows (not necessarily by a specific theme)
Nice find... I had forgotten about that dark mode post by ozone, it is undocumented but was working last time I tried.
Ah got you. I thought I was missing something.

I noticed the history thing as well btw. I didn't check what was the cause tho. But my guess is it's related to this measure on the searchBarTemplate.ini file:

Code: Select all

[RecallSearch]
Measure=Calc
Formula=0
IfCondition=#recallSearch#=1
IfTrueAction=["https://www.google.com/search?q=#query#"][!SetVariable recallSearch 0][!Update]
DynamicVariables=1
I can't test right know but the url should be replaced with [GetURL] measure.

Try replacing ["https://www.google.com/search?q=#query#"] with ["[GetURL]"]

Edit:

Alright, I tested it and indeed that's the fix.

By the way, I recommend you adding this variables to the [variables] section on searchBarTemplate.ini as well to get rid of some errors on the log:

Code: Select all

showHistory=0
RecallSearch=0
RunSearch=0
Last edited by RicardoTM on April 14th, 2024, 6:47 pm, edited 1 time in total.
User avatar
balala
Rainmeter Sage
Posts: 16190
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help Creating a Drop Down Menu

Post by balala »

RicardoTM wrote: April 14th, 2024, 3:48 pm

Code: Select all

[RecallSearch]
Measure=Calc
Formula=0
IfCondition=#recallSearch#=1
IfTrueAction=["https://www.google.com/search?q=#query#"][!SetVariable recallSearch 0][!Update]
DynamicVariables=1
I'm a little bit late here and I realize this is taken from the original post, however you probably are right. Using a IfTrueAction=["https://www.google.com/search?q=#query#"][!SetVariable recallSearch 0][!Update] option, the set URL (in this case https://www.google.com/search?q=#query#) is opening in the default web browser whenever the recallSearch variable is set to 1. Perfectly works, but it definitely is a weird approach.
User avatar
Yincognito
Rainmeter Sage
Posts: 7185
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Help Creating a Drop Down Menu

Post by Yincognito »

Hootistigglebits wrote: April 13th, 2024, 6:46 pm How do I change the look of the context menu so that it matches the search bar?
As others already mentioned, besides the linked plugin that allows a dark mode context menu, you can't have full visual control over its appearance in RicardoTM's solution, since context menus are controlled by Windows itself. Such a full visual control is only possible in my solution (which is visible in the screenshot you posted in that reply), since the "menu" there is drawn by the Rainmeter skin. Obviously, like I said, RicardoTM's solution (further improved by himself, eclectic-tech and balala) is easier for you, which is why I recommended it as well.
Hootistigglebits wrote: April 14th, 2024, 5:28 am When I select a different search engine the bar quickly fades out and then back in again. How do I force it to not fade in and out like that?
Actually, you can eliminate fading in such a case if you set the fade duration accordingly, by using zero !FadeDuration bangs on the "current" and "next" variants, and place them BEFORE you activate the "next" variant in your mouse actions:
https://docs.rainmeter.net/manual/bangs/#Skin

Not sure if the change is temporary or not in such a case, but if it isn't and you want to keep fading when initially loading these variants (but get rid of it when switching between them afterwards, as described), you can use similar !FadeDuration bangs to non-zero values, but this time AFTER you activate the "next" variant in your mouse actions. In other words, getting rid of fading on the variants you switch between, switch as usual, then "reset" their fading back to what they were.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
Hootistigglebits
Posts: 7
Joined: April 3rd, 2024, 1:00 am

Re: Help Creating a Drop Down Menu

Post by Hootistigglebits »

Thanks everyone especially Ricardo, your last post fixed the history issue.
RicardoTM
Posts: 271
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: Help Creating a Drop Down Menu

Post by RicardoTM »

Hootistigglebits wrote: April 14th, 2024, 9:28 pm Thanks everyone especially Ricardo, your last post fixed the history issue.
No problem.
Yincognito wrote: April 11th, 2024, 11:48 pm For the sake of completeness
Here's a newer version with all new changes + things I added:
CyberSearch_1.2.rmskin
This version includes:
  • Search Bar Selection Context Menu
  • Scroll through search bars action.
  • Ability to disable Recent searches drop down.
  • Ability to disable ToolTips.
  • Ability to enter fade duration.
  • Fixed History always using Google.
  • Fixed Errors on the log.
Controls:
  • Double Click on Icon - Change Color Mode
  • Right Click - Search Bar Selection Menu
  • Ctrl + Right Click - Skin Menu
  • Scroll - Scroll Through Search Bars
ezgif.com-video-to-gif-converter (11).gif
To add search bars:
  • Duplicate any search bar file.
  • Change its name to YourNewBar.ini
  • Open the file and change engineNumber to engineNumber=4 and engineName to your new bar name.
  • Add a new icon to @resources folder and add that icon name to engineIcon=#@#YourNewIconName.filetype
  • Modify engineURLQuery variable as needed.
  • Open searchBarTemplate.ini and change totalEngines=3 to 4 and add a new Engine4=newEngineName Variable.
  • Scroll up and add ContextTitle4=[#Engine4] and ContextAction4=[!ActivateConfig "CyberSearch" "[#Engine4].ini"] to the [Rainmeter] section.
  • Refresh the skin (Ctrl + Right Click > Refresh Skin)
You do not have the required permissions to view the files attached to this post.
Last edited by RicardoTM on April 15th, 2024, 2:50 pm, edited 1 time in total.
User avatar
Yincognito
Rainmeter Sage
Posts: 7185
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Help Creating a Drop Down Menu

Post by Yincognito »

Hootistigglebits wrote: April 14th, 2024, 9:28 pm Thanks everyone especially Ricardo, your last post fixed the history issue.
And his following post probably didn't leave any issue whatsoever - you get a feel good sensation just by looking at his preview (he certainly knows how to present such things, just like eclectic-tech). :D
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth