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

FARR version 2 - discuss the best way to handle 'actions'

<< < (11/16) > >>

I am now reading about regexes. It's quite powerfull, and associated with what we are discussing here, it might lead us to very good results, i think.

From what i understand, a regex like this:

--- ---(["][A-Z0-9. ]*["] ){0,1}edit( ["][A-Z0-9. ]*["]){0,1}would accept entries like this:
"jgpaiva.txt" edit OR edit "jgpaiva.txt" OR "jgpaiva.txt" edit "donationcoder.txt"
And farr already does this. (the testing box in farr's alias group editing is really useful ;) )
The inconvinience with the version that farr has now, is that there is no way to ease the entry of the file names. So, to edit something, you'd have to do:
"C:\documents and settings\joao\my documents\jgpaiva.txt" edit to edit that file.

Which doesn't make sense when you have such a great power of search already included in farr.

So, my proposition to implement this, is to have farr work like this:
You search for anything, and when you press tab, that anything is replaced internally by it's result.

Meaning, when i search for jgpaiva.txt and press tab, the line to be executed by farr would be "C:\documents and settings\joao\my documents\jgpaiva.txt" . Then, the search field searches for possible aliases, since the first thing i selected was a file.
I type edit and my group edit is selected (important: here, farr adds a space to the end of the expression to be evaluated after the word edit, or the following won't work).
Now, if i press enter, the regex is evaluated, and jgpaiva.txt is opened in the editor i had selected.
If i press tab again, my regex specifies that afted "edit " can come anything, and so, the search alows anything to be used. I search for donationcoder.txt, press enter, it's path is quotated, added to the end of the regex, the regex is evaluated and my editor is launched with both documents.

I think that the only problem with this, is that the searches wouldn't be only by the string typed, but also using the rules defined by the last regular expresion selected.
What do you think, mouser? Any problems with this solution?

PS: The regex i presented is highly incomplete, as it doesn't contain the search for only text files, nor it allows fullpaths to be specified. I only presented it like that, for the sake of understandment, since the whole regex would have about 3 or 4 lines ;)
Of course, this kind of "basic action" regexes would come with farr v2, so as the user doesn't have to configure them.

PS2: as this post was very tiring, i'm going to bed.  :tellme: :tellme: (g!, regexes are confusing :P)

to clarify what i was saying from before, i was saying we cant insist that the filename comes first,
because sometimes there is no filename, for example when you want to send an email.

there is always an action however, so it is possible to insist the user always starts out specifying an action.

or it is possible to start out allowing both, as we do now.

OK. I really think that allowing both would be better, as it works for most cases (when you are searching for a program or file). I also think that we should allow more complex actions (like filename email address or filename copy foldername, etc).

Man, this is becoming a very ambitious project, mouser!!! :)

to clarify what i was saying from before, i was saying we cant insist that the filename comes first,
because sometimes there is no filename, for example when you want to send an email.-mouser (February 04, 2006, 05:22 AM)
--- End quote ---
Essentially, wouldn't the email address or contact name be the "file" -- Without additional parameters, it's not an action, just a launch. ;)

@mouser:  This might be another discussion, but I'll start it here; you may already be doing/thinking this.

Does it make sense to extract the User Interface and Presentation from the core functions of the FARR code?  eg.  do you really care how the user asks to you execute the find_files function part of your code so long as you return an array or list of files?

It's sort of like skinning the whole UI.  The logic of FARR would become a glorified API and you could have a couple of UI's that access it: a keyboard based or a mouse based or whatever.

I'm just thinking out loud here... it's certainly not a fully baked solution.  I'm not sure it makes sense in this case since I haven't seen your code.  I can see some issues either way.



[0] Message Index

[#] Next page

[*] Previous page

Go to full version