topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Thursday March 28, 2024, 10:59 am
  • Proudly celebrating 15+ 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

Last post Author Topic: how can execute a alias without hit enter key ?  (Read 19493 times)

hihihlo

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 14
    • View Profile
    • Donate to Member
how can execute a alias without hit enter key ?
« on: June 05, 2009, 12:12 AM »
example I wish type 'o' and spacebar to execute alias,
without hit enter key like goquit, gooptions can do.

Regular pattern : ^o $
result : dosearch run "cmd.exe"\n

above alias setting still can't work, how should I do ?
Best Regards.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #1 on: June 05, 2009, 02:50 AM »
first comment:
it's not normal to use dosearch and execute that command in this way -- normally you would simply have:
Regular pattern : ^o $
result : cmd.exe

but what you are trying to do is kind of interesting, and i should make it work.. i'll put it on my todo list and try to get it implemented in next couple of days, for people who want to have an alias trigger immediately without having to hit enter.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #2 on: June 05, 2009, 07:52 AM »
i've added the "dolaunch" command to FARR (not yet uploaded) that will let you trigger a result as soon as it matches, without user having to hit enter.

hihihlo

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 14
    • View Profile
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #3 on: June 05, 2009, 07:57 PM »
great news !
I look forward to the dawn of next version.
Thanks you very much !

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • View Profile
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #4 on: June 05, 2009, 09:26 PM »
i've added the "dolaunch" command to FARR (not yet uploaded) that will let you trigger a result as soon as it matches, without user having to hit enter.

All well and good, and a step in the right direction, but there remains a need to type something.
Isn't it time that you made FARR anticipate what I want it to do and then just do it?

 :tellme:



hihihlo

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 14
    • View Profile
    • Donate to Member
bug report - dolaunch
« Reply #5 on: June 22, 2009, 09:56 PM »
I encountered two bug of special alias "dolaunch", my setting is below :
regular pattern : ^kk $
result          : dolaunch "notepad.exe"

bug1: when I keyin "kk" (NOT "kk ") it will launch notepad
bug2: once launch alias kk, FARR always can't active via hotkey;
      It will launch notepad directly when press active hotkey (break key)

regardless of whether uncheck "when using hotkey to refocus window ... dont clear search text" option,
bug2 always happen.

I can only temporary solve bug2 using :
  dolaunch "notepad.exe";;;restartsearch \n
but this is unnatural and bit slow when active FARR window

Best Regards.


skajfes

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 267
    • View Profile
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #6 on: June 28, 2009, 05:46 AM »
I encountered two bug of special alias "dolaunch", my setting is below :
regular pattern : ^kk $
result          : dolaunch "notepad.exe"

bug1: when I keyin "kk" (NOT "kk ") it will launch notepad
bug2: once launch alias kk, FARR always can't active via hotkey;
      It will launch notepad directly when press active hotkey (break key)

regardless of whether uncheck "when using hotkey to refocus window ... dont clear search text" option,
bug2 always happen.

I can only temporary solve bug2 using :
  dolaunch "notepad.exe";;;restartsearch \n
but this is unnatural and bit slow when active FARR window

Best Regards.



I've created this alias
1000>>>>->dolaunch "notepad.exe">+>^kk $

and it works for me as expected. When I type in "kk " notepad is launched, and only then. When I open FARR again nothing happens, as it should be.

But, i have set up FARR to Hide when focus is lost (Settings -> Window mode/Focus), and my hotkey to launch FARR is configured to clear search text.

I think maybe the combination of these settings is causing FARR to run notepad every time.
It is impossible to make anything foolproof because fools are so ingenious.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #7 on: June 28, 2009, 06:53 AM »
that's actually an interesting clue about how farr is behaving on wake up that suggests a bug.. i'll see if i can't fix it today.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #8 on: June 28, 2009, 09:28 AM »
ok so my results dont quite match with what you appear to be saying,
But what i do see is that if you have the hotkey NOT set to clear search when triggered, then you get this behavior, which makes some sense since its seeing the kkSpace all over again each time you trigger.  i will fix.

hihihlo

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 14
    • View Profile
    • Donate to Member
another more important bug of dolaunch !!!
« Reply #9 on: June 29, 2009, 09:08 PM »
Thanks you for fix dolaunch re-launching bug.
But I found a more major bug of dolaunch !!!

alias pad :
pattern : [ ]*pad[ ]+(".*").*$
results : notepad.exe $$1

alias aa :
pattern : ^aa $
results : dolaunch pad "this is aa"

alias bb :
pattern : ^bb $
results : dosearch pad "this is bb"

when I type  ' pad "test" ',  it call notepad and pass param "test" to notepad.
when I type  'aa ',  it do nothing !!
when I type  'bb ',  it did as expected

It seem should have same behavior for dolaunch and dosearch, but it's not so.

Best Regards.

ps1: My options setting is same as skajfes' suggest
ps2: if you can't reappear above bug, attached file is my whole setting file

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #10 on: June 29, 2009, 09:38 PM »
in your example, what would you want aa to do different than the bb example?
in other words, this seems like a case for dosearch.

dolaunch is for LAUNCHING programs without hitting enter.
dosearch is for conducting simulated searches without hitting enter.

hihihlo

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 14
    • View Profile
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #11 on: June 29, 2009, 10:11 PM »
I just wish alias aa can work right,
because I have many alias like a1, a2, ...., all of them need call alias pad.

(I can only temp do a1, a2, ... by dosearch, but I wish without hitting enter key)

sorry for my poor english

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #12 on: June 29, 2009, 10:20 PM »
i'm still not understanding what dosearch does not do that you want to do with dolaunch.

hihihlo

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 14
    • View Profile
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #13 on: June 29, 2009, 10:31 PM »
alias pad :
pattern : [ ]*pad[ ]+(".*").*$
results : notepad.exe $$1

alias aa :
pattern : ^aa $
results : dolaunch pad "this is aa"

when I type  aa,  FARR won't execute notepad.exe  (so file "this is aa" won't create)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #14 on: June 29, 2009, 10:40 PM »
ok i think i understand now, you want to launch something right away when you type aa space but the thing you want to launch is defined by using another alias.  ok let me see what i can do about that.

hihihlo

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 14
    • View Profile
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #15 on: June 29, 2009, 10:52 PM »
Yes, You got it, that is what I want to do  :)

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #16 on: July 15, 2009, 03:44 AM »
Mouser, dolaunch seems to have changed in  2.70.01 & 2.71.01.
Before the alias "test" with this command "test | dolaunch htmlviewurl %FARRDIR%\MyLocalData\test.html" displayed the htlm and keept it open in FARR. Now it is briefly opened and then immediately unloaded.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #17 on: July 15, 2009, 03:53 AM »
i can see how that would have happened.. let me look into it.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,169
    • View Profile
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #19 on: July 15, 2009, 07:10 AM »
confirmed working now!  :Thmbsup:

hihihlo

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 14
    • View Profile
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #20 on: July 16, 2009, 11:26 PM »
Version 2.72.01 (post in Reply #18 on: July 15, 2009, 03:07:48 AM) still not solve question that post in Reply #13.
The version result in below bug appear again if I try to run Reply #13 :
  Using the new "dolaunch" feature resulted in FARR launching the item every time it was displayed.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #21 on: July 17, 2009, 01:00 AM »
hihihlo, i've fixed it in my current version not yet uploaded, will be in next upload.
but you'll also have to change your aa alias to:
alias aa :
pattern : ^aa $
results : dolaunch restartsearch pad "this is aa"\n

hihihlo

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 14
    • View Profile
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #22 on: July 17, 2009, 01:36 AM »
Greatest news !!  thank you very much !!  :up:

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #23 on: July 17, 2009, 06:42 PM »
hihihlo, can you try this version and see if it works for you:
https://www.donation...AndRunRobotSetup.exe

ps.
remember to change your alias to say dolaunch restartsearch as i showed in my previous post.

hihihlo

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 14
    • View Profile
    • Donate to Member
Re: how can execute a alias without hit enter key ?
« Reply #24 on: July 20, 2009, 02:55 AM »
It not work, I found two bug :

1. Although it change text in input-box immediate,
    I must hit enter key still (seem "\n" no effect)

2. reference "Reply #13", 
    if my alias name is "aa", then this item launch when I type "aa" (seem regular pattern no effect)
    if my alias name is "aTest", then this item launch when I type "aa "