Welcome Guest.   Make a donation to an author on the site July 31, 2014, 02:30:48 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2014! Download dozens of custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Environment variables in 'Pattern Scoring'?  (Read 2155 times)
lujomu
Member
**
Posts: 36

View Profile Give some DonationCredits to this forum member
« 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?
Logged
mouser
First Author
Administrator
*****
Posts: 33,184



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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.
Logged
lujomu
Member
**
Posts: 36

View Profile Give some DonationCredits to this forum member
« 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! Wink
Logged
mouser
First Author
Administrator
*****
Posts: 33,184



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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.
Logged
lujomu
Member
**
Posts: 36

View Profile Give some DonationCredits to this forum member
« 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.
Logged
mouser
First Author
Administrator
*****
Posts: 33,184



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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.
Logged
lujomu
Member
**
Posts: 36

View Profile Give some DonationCredits to this forum member
« 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! Wink
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.03s | Server load: 0 ]