Welcome Guest.   Make a donation to an author on the site October 25, 2014, 06:58:40 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Your Support Funds this Site: View the Supporter Yearbook.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Alias: Google Maps Directions  (Read 16616 times)
lanux128
Global Moderator
*****
Posts: 6,109



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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.




* gmaps.zip (59.47 KB - downloaded 699 times.)
« Last Edit: September 21, 2008, 10:54:17 PM by lanux128 » Logged

mouser
First Author
Administrator
*****
Posts: 33,590



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: July 17, 2008, 02:35:24 AM »

nice  thumbs up
Logged
jgpaiva
Global Moderator
*****
Posts: 4,710



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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 smiley
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 smiley [/edit]
« Last Edit: July 17, 2008, 03:27:07 AM by jgpaiva » Logged

mouser
First Author
Administrator
*****
Posts: 33,590



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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 smiley
Logged
lanux128
Global Moderator
*****
Posts: 6,109



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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. Grin 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
Global Moderator
*****
Posts: 4,710



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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 tongue hihi
Logged

CWuestefeld
Supporting Member
**
Posts: 939



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #6 on: July 17, 2008, 08:09:24 AM »

That's pretty cool. Thanks, lanux128.  Thmbsup
Logged



tomos
Charter Member
***
Posts: 8,612



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #7 on: July 17, 2008, 08:31:13 AM »

The semi-colon also involves shift key here tongue hihi
same here Grin
this one is great Lanux Thmbsup
never did like getting going with googlemaps
Logged

Tom
lanux128
Global Moderator
*****
Posts: 6,109



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #8 on: July 17, 2008, 08:18:58 PM »

i'm glad that it's useful to you guys but i'm not sure how to make the separator key customisable. however if you want to tweak it yourself, just change the semi-colon in regex pattern section to a key you find easier to access. Wink

Logged

tomos
Charter Member
***
Posts: 8,612



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« 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 thumbs up

Logged

Tom
herojoker
Participant
*
Posts: 124


View Profile Give some DonationCredits to this forum member
« 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
Global Moderator
*****
Posts: 6,109



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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. Thmbsup
Logged

herojoker
Participant
*
Posts: 124


View Profile Give some DonationCredits to this forum member
« 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
Global Moderator
*****
Posts: 6,109



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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
Participant
*
Posts: 124


View Profile Give some DonationCredits to this forum member
« 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
Participant
*
Posts: 124


View Profile Give some DonationCredits to this forum member
« 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
Global Moderator
*****
Posts: 6,109



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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. Wink
Logged

herojoker
Participant
*
Posts: 124


View Profile Give some DonationCredits to this forum member
« 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
Global Moderator
*****
Posts: 6,109



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« 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
Participant
*
Posts: 124


View Profile Give some DonationCredits to this forum member
« Reply #19 on: September 22, 2008, 07:14:51 AM »

Good point!
^route \s*(.+?)\s*(?:(?:-*\>)|-{2,}|;)\s*(.+?)\s*$
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.041s | Server load: 0 ]