ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE. Software > Find And Run Robot

Aliases calling aliases


I am trying to create an alias that will execute commands in console and display output in FARR.
I am trying to reuse the builtin runcap alias for that.

I have an alias defined like this:

--- ---1000>>>Flush DNS>->Flush DNS cache | restartsearch runcap ipconfig /flushdns>+>flush

With this alias I have to press enter twice to actually execute the alias, and the search string changes after the first enter. Also the alias is not working without regex pattern.
I am trying to eliminate the second enter press and the search string change. I tried using dosearch instead of restartsearch but then the alias doesn't trigger (it just changes the search string to the alias name)

Also is it possible to this but to run the alias with admin privileges? When I try /runasadmin switch it just passes it to the runcap alias that in turn passes it to the ipconfig command and that just fails.

Probably I am missing something obvious  :tellme:

I think that frontslash may trip up runcap. The command works if you take the commands from the runcap alias and use them directly in a new alias:

--- ---showmemo ;;;appcapappendmemo ipconfig /flushdns

Does this help, from help file:
restartsearch STRING_TO_SEARCH_FOR - restarts a new search by replacing editbox text (use \s at end of line to add a space after the new search string).  Use \n at the end to simulate the pressing of Enter after the search is conducted (useful especially for plugins triggers).
dosearch STRING TO SEARCH FOR - doesnt change the editbox but causes FARR to display results as if user had typed the string.  very useful in conjunction with regular expression patterns.
--- End quote ---

It sounds like you want to use restartstearch and combine it with a \n at the end.

Thanks, \n eliminated the second enter which is good enough.
I also wanted to reuse runcap alias, and not copy it (as a dev i like to live by the DRY principle :) )

Is there a way to do restartsearch with /runasadmin switch?

What I want to do is execute a bat script on my machine that requires admin privileges, and also capture the output using runcap alias.


[0] Message Index

Go to full version