|
lanux128
|
 |
« on: July 17, 2008, 01:15:39 AM » |
|
New Update:thanks to the efforts of herojoker, this alias has become more flexible with the separators. now the queries can be separated by arrows with arbitrary length (>, ->, -->, --->, etc.), semi-colon and "lines" with arbitrary positive length >= 2 (--, ---, etc.). also added is single location search as well as support for .dcupdate files where you can update future versions via DCUpdater. if you had already downloaded the previous version. please delete the old alias in '\AliasGroups\MyCustom' and extract the new zip contents into '\AliasGroups\Installed' instead. P.S. the icon is from the openPhone theme. 
|
|
|
« Last Edit: September 21, 2008, 10:54:17 PM by lanux128 »
|
Logged
|
|
|
|
|
mouser
|
 |
« Reply #1 on: July 17, 2008, 02:35:24 AM » |
|
nice 
|
|
|
|
|
Logged
|
|
|
|
|
jgpaiva
|
 |
« Reply #2 on: July 17, 2008, 03:23:11 AM » |
|
I think that using the space as separator can be annoying if you have a town with a space in its name  Why don't you use the collon instead? (':') [edit] lanux: you left the icon path there,but it isn't included in the default install of farr. I also found out that using an alias with a non-existing icon results in strange happenings  [/edit]
|
|
|
|
« Last Edit: July 17, 2008, 03:27:07 AM by jgpaiva »
|
Logged
|
|
|
|
|
|
mouser
|
 |
« Reply #3 on: July 17, 2008, 03:55:55 AM » |
|
smart idea jgpaiva. and it would be nice to have 2 aliases, so that one triggers on a regex with only 1 location, and the other with the : triggers directions between 2 areas. regarding icons: ideally this would be packaged in a zip with alias and icon files 
|
|
|
|
|
Logged
|
|
|
|
|
lanux128
|
 |
« Reply #4 on: July 17, 2008, 06:53:45 AM » |
|
yikes! you're right, jgpaiva. now one can't get directions from new york to new jersey.  but since colon requires pressing the Shift key, i'd just go with the semi-colon. i've made the changes, please try the alias and regarding the icon i'll make the alias pack with the icon included in a day or two.
|
|
|
|
|
Logged
|
|
|
|
|
jgpaiva
|
 |
« Reply #5 on: July 17, 2008, 06:55:05 AM » |
|
but since colon requires pressing the Shift key, i'd just go with the semi-colon.
The semi-colon also involves shift key here  hihi
|
|
|
|
|
Logged
|
|
|
|
|
CWuestefeld
|
 |
« Reply #6 on: July 17, 2008, 08:09:24 AM » |
|
That's pretty cool. Thanks, lanux128. 
|
|
|
|
|
Logged
|
|
|
|
|
tomos
|
 |
« Reply #7 on: July 17, 2008, 08:31:13 AM » |
|
The semi-colon also involves shift key here  hihi same here  this one is great Lanux  never did like getting going with googlemaps
|
|
|
|
|
Logged
|
|
|
|
|
|
|
tomos
|
 |
« Reply #9 on: September 11, 2008, 03:03:21 PM » |
|
I hadnt really used googlemaps for a while I see they've much improved their printing options or I mean the quality, visually & the mini-maps relating to each step work much better, but I really just wanted to say thanks again for this - it make the initial diving in there so much easier 
|
|
|
|
|
Logged
|
|
|
|
|
herojoker
|
 |
« Reply #10 on: September 11, 2008, 05:55:27 PM » |
|
Use (?:;) to let $$1 and $$2 contain the two locations. Perhaps " -> " or ">" (without the "") are a good separators, too? Here is a relatively robust regex:
^route \s*(.+?)\s*(?:(?:\-\>)|(?:\>))\s*(.+?)\s*$
It matches route a -> b and route a > b with arbitrary many spaces between route, the first location, the arrow, the second location and the end of the line. Use $$1 and $$2 to access the locations!
|
|
|
|
« Last Edit: September 11, 2008, 06:21:35 PM by herojoker »
|
Logged
|
|
|
|
|
lanux128
|
 |
« Reply #11 on: September 12, 2008, 01:48:09 AM » |
|
thanks herojoker. i'm planning to add Google Maps' search location item in addition to the current 'direction' alias. maybe i'll use your regex to beef up the 'direction' search. 
|
|
|
|
|
Logged
|
|
|
|
|
herojoker
|
 |
« Reply #12 on: September 12, 2008, 07:15:09 AM » |
|
The following version does the same but is more compact: ^route \s*(.+?)\s*(?:\-?\>)\s*(.+?)\s*$
|
|
|
|
|
Logged
|
|
|
|
|
lanux128
|
 |
« Reply #13 on: September 12, 2008, 06:09:34 PM » |
|
hmm.. i was about to go with the one below so that either ->, > or ; can be the separator. so how can i fit this in the compact version?
^route \s*(.+?)\s*(?:(?:\-\>)|(?:\>)|(?:\;))\s*(.+?)\s*$
|
|
|
|
|
Logged
|
|
|
|
|
herojoker
|
 |
« Reply #14 on: September 12, 2008, 08:32:07 PM » |
|
^route \s*(.+?)\s*(?:(?:\-?\>)|(?:;))\s*(.+?)\s*$ should do it (but I have not tested it so much).
|
|
|
|
|
Logged
|
|
|
|
|
herojoker
|
 |
« Reply #15 on: September 21, 2008, 01:06:54 PM » |
|
I've added more separators: ^route \s*(.+?)\s*(?:(?:\-*\>)|,|\-{2,})\s*(.+?)\s*$
This supports arrows with arbitrary length (>, ->, -->, --->, etc.), comma and "lines" with arbitrary positive length >= 2 (--, ---, etc.). Remember, that the first complete separator in the input is used.
\- may be replaced with - but this version is safer because in some constellations - can become part of a modifier.
|
|
|
|
« Last Edit: September 21, 2008, 09:33:20 PM by herojoker »
|
Logged
|
|
|
|
|
lanux128
|
 |
« Reply #16 on: September 21, 2008, 08:49:04 PM » |
|
@herojoker: thanks again, i'm trying to add the .dcupdate function to this alias and then i'll modify the alias to use your regex, with semi-colon as well. 
|
|
|
|
|
Logged
|
|
|
|
|
herojoker
|
 |
« Reply #17 on: September 21, 2008, 09:32:53 PM » |
|
Cool 8) With semicolon and (because I think the aforementioned "- issue" is not critical) without the \ before -: ^route \s*(.+?)\s*(?:(?:-*\>)|-{2,}|;|,)\s*(.+?)\s*$
|
|
|
|
|
Logged
|
|
|
|
|
lanux128
|
 |
« Reply #18 on: September 21, 2008, 09:40:37 PM » |
|
thanks but i think we have to leave out the comma because we need it for places like Paris, Texas.
|
|
|
|
|
Logged
|
|
|
|
|
herojoker
|
 |
« Reply #19 on: September 22, 2008, 07:14:51 AM » |
|
Good point! ^route \s*(.+?)\s*(?:(?:-*\>)|-{2,}|;)\s*(.+?)\s*$
|
|
|
|
|
Logged
|
|
|
|
|