Jump to content

How to get GEO LOCATION ?


tonycst
 Share

Recommended Posts

My laptop has location device. Kinda like GPS i guess.

Is there a way to retrieve coordinates from that device or location provided is the location of the network laptop connected to ?

Wanted to add a feature to my laptop security app i work on. It prompts for pass and takes pictures if you get it wrong, then it emails you those pictures.

It be very cool if it would email geo location as well since application is activated only its online.

Any lead would be helpful.

Thanks

Link to comment
Share on other sites

Script they have there works rather strange.

#include <WinAPILocale.au3>
#include <APILocaleConstants.au3>
Opt('MustDeclareVars', 1)
Local $ID = _WinAPI_GetUserGeoID()

ConsoleWrite('ID:        0x' & Hex($ID) & @CRLF)
ConsoleWrite('Latitude:  ' & _WinAPI_GetGeoInfo($ID, $GEO_LATITUDE) & @CRLF)
ConsoleWrite('Longitude: ' & _WinAPI_GetGeoInfo($ID, $GEO_LONGITUDE) & @CRLF)
ConsoleWrite('Name:      ' & _WinAPI_GetGeoInfo($ID, $GEO_FRIENDLYNAME) & @CRLF)
ConsoleWrite('ISO code:  ' & _WinAPI_GetGeoInfo($ID, $GEO_ISO3) & @CRLF)

This code gives me exact same coordinates on 3 different computers connected to 3 different IP address located in 3 different places BUT perhaps all 3 are connected to same ISP COMCAST. Atleast 2 of them are 100% for sure connected to COMCAST, not so sure about third one.

So am not sure if this code gives me ISP coordinates and not my location provided by Built-In location device on my laptop.

I came accross http://archive.msdn.microsoft.com/mag201112HTML5/Release/ProjectReleases.aspx?ReleaseId=5791

I assume its WinAPI related that i have little to no knowledge how it works or how to utilize it.

Perhaps maybe i need to start looking into gathering information from a device its self ? If so, how would i go about doing it ?

Edited by tonycst
Link to comment
Share on other sites

  • 2 weeks later...

i guess ill bump this after 10 days.

I have 0 knowledge on winapi use with autoit, i dont even know how to create message box using winapi.

Link you gave me leads to IP location, thats now what i need. Laptop has built in location device, its not IP or internet related, its similar to GPS.

Link to comment
Share on other sites

It's too bad you dont have AutoIt installed. The help file that comes with it is full of answers to questions like:

 

 i dont even know how to create message box using winapi.

 

Not really a question but.... :ermm:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...