ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Find And Run Robot

Alias help needed

(1/3) > >>

fjorge:
Hi,

I want to do the following:

I use a program that can be launched with a parameter. The possible values for this parameter are all files in a folder, but without the extension. For example, lets say I have the c:\Parameters folder with the following files:

1st-Parameter.ini
2nd-Parameter.ini
...
Nth-Parameter.ini

And I want to launch the program as:

Program.exe /config 2nd-Parameter

How can I do this with FRR, the way that I type: Program[SPACE] and then I get the list of all files in the C:\Parameters, but then if I type 2, the options are reduced to 2nd-Parameter?

Its kinda hard to explain, so I hope someone understands my problem and can help.

Regards,
Fran

mouser:
there is a much easier way to do what you want using aliases, *assuming* that you dont actually *need* to have each of the parameters as a file name as you describe.

the method would be to create a new alias, lets call it fjapp

the contents of fjapp alias would look like this:

c:\program files\fjappdir\fjapp.exe param1
c:\program files\fjappdir\fjapp.exe param2
c:\program files\fjappdir\fjapp.exe param3
c:\program files\fjappdir\fjapp.exe param4
c:\program files\fjappdir\fjapp.exe param5

that's it.

now when you want to launch it with the third parameter you could just type into farr: "fjapp 3" and hit enter.

--

if you wanted to get fancier you could give nice labels like:

launch fjapp with parameter 1 (cats) | c:\program files\fjappdir\fjapp.exe param1 blah blah -cats
launch fjapp with parameter 2 (mice) | c:\program files\fjappdir\fjapp.exe param2 "more stuff"
launch fjapp with parameter 3 (doodads) | c:\program files\fjappdir\fjapp.exe param3 "other parameters"
launch fjapp with parameter 4 (ice cream) | c:\program files\fjappdir\fjapp.exe param4 "etc","etc"
launch fjapp with parameter 5 (zebras) | c:\program files\fjappdir\fjapp.exe param5 -a -q

etc.

mouser:
now if you really NEED to have is search a folder for the parameters in the way you are saying, maybe you could explain a little more.. i'm not sure there is really a way to do it yet but there might be a trick to do it, or it might be worth adding a feature for it.

fjorge:
Hi,

Thanks for your reply. The thing is the following:

Just imagine you would like to to have an alias called 'np' that opens a file with, let's say notepad. But you want to restrict the files that you can open with this alias to the ones stored in a certain folder. And imagine that in order to open a file with notepad you were not allowed to pass filename.ext as parameter, but only filename. And additionally, you would like the file list to be dinamically updated while you write the first letters of the file you want to open. For example, as you type np[SPACE] you see the list of all files; if you then press 'a', you see only files that start with 'a'.

Could this be achieved somehow?

Fran

mouser:
Yes, i believe you could do it using a couple of alias tricks, most notably the "dosearch" alias trick .. it's just a bit weird.. weird enough to wonder if it might be wiser to write a little javascript plugin for farr to do it instead.  Maybe if you could elaborate on the actual use you have in mind and other cases that might use same approach it would crystalize the issue?

Navigation

[0] Message Index

[#] Next page

Go to full version