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
  • December 10, 2016, 10:15:24 PM
  • 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: how does setuservar work ? [feature request ?]  (Read 4775 times)

nitrix-ud

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 516
    • View Profile
    • Donate to Member
how does setuservar work ? [feature request ?]
« on: March 27, 2009, 03:31:52 AM »
Hi,

i can't make this work...

Quote
setuservar USERVARNAME=VALUE - sets the value of a user variable (e.g. setuservar twitter.username=donationcoder)

this works perfectly : %uservar.SectionName.variablename%

but i can't set a user variable

now i think i have a feature request for you mouser !
Could you add the possibility to set a user variable from outside ?

by command-line for example :
C:\Program Files\FindAndRunRobot\FindAndRunRobot.exe -setuservar twitter.username=donationcoder

that would be great :) to be able to interact with FARR like so

Cheers, keep up the good work and keep giving us frequent releases ! (i'm waiting for the internal browser toolbar !)

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: how does setuservar work ? [feature request ?]
« Reply #1 on: March 27, 2009, 08:27:58 AM »
Here's what happened for me using a plugin to try to leverage this functionality:

Code: Javascript [Select]
  1. FARR.setStrValue("launch", "setuservar Akete.test=hi");

I then observed the following text in the User Variables pane of the Options dialog box:

Quote
[setuservar Akete]
test = hi

May be I'm doing something wrong...

FWIW, I tested with FARR 2.53.02.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,435
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: how does setuservar work ? [feature request ?]
« Reply #2 on: March 27, 2009, 12:06:33 PM »
ewe, you found a bug. will be fixed in next version.

nitrix-ud

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 516
    • View Profile
    • Donate to Member
Re: how does setuservar work ? [feature request ?]
« Reply #3 on: March 27, 2009, 01:23:13 PM »
and what about MY problem ;) ???

i'm trying to use setuservar from an alias (not a plugin) by the way...

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,435
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: how does setuservar work ? [feature request ?]
« Reply #4 on: March 27, 2009, 01:27:38 PM »
the bug that ewe found would affect setting user var from an alias.  in fact you'll notice that he basically simulated in his plugin call the effect of specifying something in an alias launch command.  after the next update you will be able to specify in your alias result: setuservar section.varname=value

your other idea about commandline invocation is reasonable.  i'll add ability to invoke var with a command to launch (which would also let you use above functionality to set user vars), and ask farr to display some results.

nitrix-ud

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 516
    • View Profile
    • Donate to Member
Re: how does setuservar work ? [feature request ?]
« Reply #5 on: March 27, 2009, 01:50:28 PM »
thanks for your answers mouser ;)

and i'm happy to hear a new version is on its way.

my feature request about command-line invocation is to silently change a FARR user variable.

like many, i work on a project basis, and when switching from one project to an other, i'd like to silently modify FARR user variable so that i can reflect that change in FARR

for instance, say i have an alias to add a note to the project i'm currently working on, i could use an up-to-date FARR user variable holding the name of that project to improve result readability
Add note to Project "Project XYZ"

that would be very handy indeed !

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,435
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: how does setuservar work ? [feature request ?]
« Reply #6 on: April 19, 2009, 04:05:15 PM »
should be fixed in new version 2.55.01, uploaded.

nitrix-ud

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 516
    • View Profile
    • Donate to Member
Re: how does setuservar work ? [feature request ?]
« Reply #7 on: June 02, 2016, 02:10:00 PM »
Hi Mouser  :D

I have some questions regarding setuservar...

1) Is it possible to set multiple values in one go using the command-line ?

this does not work
C:\Program Files\FindAndRunRobot\FindAndRunRobot.exe -launch "setuservar MyVars.var1=value1,MyVars.var2=value2"

I have a autohotkey script that sets about 10 values (folder paths used in search folders options) in FARR and I have to say it takes some times to complete since it seems I MUST use RunWait autohotkey command when setting the values to get the recachedirpaths command (that I run at the end) to work well... (otherwise it recaches a mix of good and wrong directories...)


2) Is it possible to remove a value ?? using command-line or using an other way

Thanks for your answer

I hope FARR is very much alive, since I believe it's one of the most useful piece of software in the universe  :-*


mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,435
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: how does setuservar work ? [feature request ?]
« Reply #8 on: June 02, 2016, 03:05:55 PM »
dear lord you are doing some advanced farr stuff..

as for #1, have you tried separating multiple commands with ;;; so for example:
setuservar MyVars.var1=value1;;;setuservar  MyVars.var2=value2

as for #2, i can add an eraseuservar command.



i'd love to hear what crazy stuff you are using these things for :)

nitrix-ud

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 516
    • View Profile
    • Donate to Member
Re: how does setuservar work ? [feature request ?]
« Reply #9 on: June 02, 2016, 03:31:00 PM »
fuck yeah i'm doing advanced stuff  8)

for #1, that's great mouser, your suggestion works !!!

for #2, that would be great...

i have a #3, it seems that a user variable cannot be bigger than 272 characters ? does that make sense to you ?


PS: I'm sending a quick video on your email (for your eye's only, there are some personal stuff)

nitrix-ud

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 516
    • View Profile
    • Donate to Member
Re: how does setuservar work ? [feature request ?]
« Reply #10 on: June 02, 2016, 04:14:05 PM »
Correction :

Quote
for #1, that's great mouser, your suggestion works !!!

It works but above a certain size (300 characters) the command line parameter is stripped, so it does not really work....

 :(

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,435
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: how does setuservar work ? [feature request ?]
« Reply #11 on: June 03, 2016, 04:03:46 PM »
Yeah im afraid that might be a commandline limit.. ill check.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,435
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: how does setuservar work ? [feature request ?]
« Reply #12 on: June 03, 2016, 04:04:25 PM »
Quote
PS: I'm sending a quick video on your email (for your eye's only, there are some personal stuff)
video received.. those are definitely some serious farr aliases and configurations :)

nitrix-ud

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 516
    • View Profile
    • Donate to Member
Re: how does setuservar work ? [feature request ?]
« Reply #13 on: June 03, 2016, 04:16:55 PM »
Quote
Yeah im afraid that might be a commandline limit.. ill check.

i thought commandline limit was around 8000 characters :-\
(when i pass the parameter to a simple autohotkey script, it works)

Maybe FARR is stripping the parameter string ?

Hope you can make it work, I would really like to get the speed boost !!

Quote
those are definitely some serious farr aliases and configurations
i will send you some more when i have some time

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 858
    • View Profile
    • Donate to Member
Re: how does setuservar work ? [feature request ?]
« Reply #14 on: June 07, 2016, 03:40:37 PM »
nitrix-ud, have you tried modifying the UserVars line in FindAndRunRobot.ini directly? Just an idea, haven't tried it.

nitrix-ud

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 516
    • View Profile
    • Donate to Member
Re: how does setuservar work ? [feature request ?]
« Reply #15 on: June 07, 2016, 04:50:53 PM »
Hi Nod5,

No I haven't tried.

I tried manually and it does not work, the FindAndRunRobot.ini isn't reloaded when changed (which makes sense  :))

Maybe there is a command for that i don't know ?
« Last Edit: June 07, 2016, 04:57:09 PM by nitrix-ud »