Website Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • August 31, 2015, 01:49:29 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Environment variables in 'Pattern Scoring'?  (Read 2417 times)

lujomu

  • Member
  • Joined in 2008
  • **
  • gravatar avatar
  • Posts: 40
    • View Profile
    • Donate to Member
Environment variables in 'Pattern Scoring'?
« on: November 11, 2010, 02:05:26 PM »
I'd like to promote certain search results that contain an specific environment variable.

I thought the easiest way would be to add this variable in the 'Pattern Scoring' section, e.g. '*%var%*'. Apparently this doesn't work.

Is there another way to achieve this?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 34,933
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: Environment variables in 'Pattern Scoring'?
« Reply #1 on: November 11, 2010, 06:39:42 PM »
hmm.. i might be able to fix that easily, or maybe not.. can you give me a more specific example of how you would use it?
are you trying to use %var% to favor files in a certain DIRECTORY? if so, you definitely CAN use environmental variables in search directory list, and that would be a more efficient way to set a bonus score for files in a certain directory.

lujomu

  • Member
  • Joined in 2008
  • **
  • gravatar avatar
  • Posts: 40
    • View Profile
    • Donate to Member
Re: Environment variables in 'Pattern Scoring'?
« Reply #2 on: November 12, 2010, 05:25:22 AM »
What I'd like to achieve is, that on 64-bit systems the 64-bit applications are on top of the search results.

On all 64-bit machines I use, there is the environment variable %OsArch%, which is set 'x64' and the program links look like e.g. 'Blender 2.55 (x64).lnk' and 'Blender 2.55 (x32).lnk'. So with a 'Pattern Scoring' like '*(%OsArch%)*.lnk' the x64-links would be first on 64-bit systems.

I thought there might be a simple way to do this. But if there isn't, I can very well live without it! ;)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 34,933
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: Environment variables in 'Pattern Scoring'?
« Reply #3 on: November 12, 2010, 08:10:39 AM »
sounds like a smart idea.. though because 64 bit programs wont run on a 32 bit operating system, it sounds like you could just ALWAYS boost x64 pattern in all cases and get the benefit.

lujomu

  • Member
  • Joined in 2008
  • **
  • gravatar avatar
  • Posts: 40
    • View Profile
    • Donate to Member
Re: Environment variables in 'Pattern Scoring'?
« Reply #4 on: November 12, 2010, 09:19:02 AM »
But the point is, I have both versions (x64 and x32) of the programs on the usb flash drive.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 34,933
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: Environment variables in 'Pattern Scoring'?
« Reply #5 on: November 12, 2010, 09:29:01 AM »
ah i see.. well let me look into making it expand variables in scoring patterns -- the difficulty is really just a matter of having to do some caching since you obviously wouldn't want it having to repeatedly query the environment variable each time it searches.

lujomu

  • Member
  • Joined in 2008
  • **
  • gravatar avatar
  • Posts: 40
    • View Profile
    • Donate to Member
Re: Environment variables in 'Pattern Scoring'?
« Reply #6 on: November 12, 2010, 10:08:43 AM »
[...] you obviously wouldn't want it having to repeatedly query the environment variable each time it searches.
No, surely not!

But please, if it is a hassle, just leave it be. I'm sure you have more important things to do than fulfilling a feature request of a single user! ;)