l3ill Posted October 25, 2013 Posted October 25, 2013 Only works in Beta... #Include <APIConstants.au3> #Include <WinAPIEx.au3> Opt('MustDeclareVars', 1) Global $ID = _WinAPI_GetUserGeoID() ConsoleWrite('ID: 0x' & Hex($ID) & @CR) ConsoleWrite('Latitude: ' & _WinAPI_GetGeoInfo($ID, $GEO_LATITUDE) & @CR) ConsoleWrite('Longitude: ' & _WinAPI_GetGeoInfo($ID, $GEO_LONGITUDE) & @CR) ConsoleWrite('Name: ' & _WinAPI_GetGeoInfo($ID, $GEO_FRIENDLYNAME) & @CR) ConsoleWrite('ISO code: ' & _WinAPI_GetGeoInfo($ID, $GEO_ISO3) & @CR) Gives me: ID: 0x0000005E Latitude: 51.202 Longitude: 10.382 Name: Germany ISO code: DEU My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
guinness Posted October 25, 2013 Posted October 25, 2013 billo, Change to this Hex($ID, 2) and then the list makes a bit more sense.Table of Geographical Locations UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018
l3ill Posted October 25, 2013 Posted October 25, 2013 Yep, that trimmed 'er right down to <readable> Thanks! My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
guinness Posted October 25, 2013 Posted October 25, 2013 No problem. It's kind of pointless, but just removes the 0 padding for easier reading. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018
tonycst Posted November 6, 2013 Posted November 6, 2013 Only works in Beta... #Include <APIConstants.au3> #Include <WinAPIEx.au3> Opt('MustDeclareVars', 1) Global $ID = _WinAPI_GetUserGeoID() ConsoleWrite('ID: 0x' & Hex($ID) & @CR) ConsoleWrite('Latitude: ' & _WinAPI_GetGeoInfo($ID, $GEO_LATITUDE) & @CR) ConsoleWrite('Longitude: ' & _WinAPI_GetGeoInfo($ID, $GEO_LONGITUDE) & @CR) ConsoleWrite('Name: ' & _WinAPI_GetGeoInfo($ID, $GEO_FRIENDLYNAME) & @CR) ConsoleWrite('ISO code: ' & _WinAPI_GetGeoInfo($ID, $GEO_ISO3) & @CR) Gives me: ID: 0x0000005E Latitude: 51.202 Longitude: 10.382 Name: Germany ISO code: DEU How ? It gives me ERROR: can't open include file <APIConstants.au3> AutoIt Version: 3.3.9.22 (Beta)
l3ill Posted November 6, 2013 Posted November 6, 2013 You have to downlaod & copy it into your Include folder manually.. include file <APIConstants.au3> My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
Moderators Melba23 Posted November 6, 2013 Moderators Posted November 6, 2013 billo, You have to downlaod & copy it into your Include folder manuallyRubbish - it is present in ...AutoIt3BetaInclude and auto-includes all the more specific API include files. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
l3ill Posted November 6, 2013 Posted November 6, 2013 oops... Thought I recalled having to get it myself. my bad. My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
tonycst Posted November 6, 2013 Posted November 6, 2013 So do i have it or what ? Why do i get this error then ?
l3ill Posted November 6, 2013 Posted November 6, 2013 Are you running in beta mode ? ALT + F5 My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
tonycst Posted November 7, 2013 Posted November 7, 2013 (edited) who knew i h ad to run it differently. Thanks. Its all good but i am not in Kansas as console 39.45, -98.908 suggests, i am in Washington. How do i get correct data ? Edited November 7, 2013 by tonycst
l3ill Posted November 7, 2013 Posted November 7, 2013 (edited) That is a different story altogether. Mine was a couple a hundred km's off as well. Have to get one of the dev's to answer that. Edited November 7, 2013 by billo My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
tonycst Posted November 7, 2013 Posted November 7, 2013 I had complitely different computer execute this code #Include <APIConstants.au3> #Include <WinAPIEx.au3> _GetCoordinates() Func _GetCoordinates() ; Script Start - Add your code below here Global $ID = _WinAPI_GetUserGeoID() ;ConsoleWrite('ID: 0x' & Hex($ID) & @CR) ;ConsoleWrite('Latitude: ' & _WinAPI_GetGeoInfo($ID, $GEO_LATITUDE) & @CR) ;ConsoleWrite('Longitude: ' & _WinAPI_GetGeoInfo($ID, $GEO_LONGITUDE) & @CR) ;ConsoleWrite('Name: ' & _WinAPI_GetGeoInfo($ID, $GEO_FRIENDLYNAME) & @CR) ;ConsoleWrite('ISO code: ' & _WinAPI_GetGeoInfo($ID, $GEO_ISO3) & @CR) ;https://www.google.com/#q=39.45%2C-98.908 IniWrite (@Scriptdir & "\Settings.ini","Email Settings","Body",'Click the link to show most recent reported location.<br>PLEASE NOTE that the location reported can be incorrect.<br>Reported location is based on the network your device is connected.<br>If your device is connected to home network, its likely to give out correct information,<br>otherwise if connection is comminng from some Company or Corporation, it may be shown as far away as another state or country.<br>This is because Location is based on IP address device is connected to.<br><br><br>https://www.google.com/#q='&_WinAPI_GetGeoInfo($ID, $GEO_LATITUDE) & '%2C' & _WinAPI_GetGeoInfo($ID, $GEO_LONGITUDE)) ;Body is written in HTML code, so what ever i make in the htmp editor i will be able to send EndFunc Both returned same oordinates as the one i am on right now. 2 computers 2 locations returned same thing in Kansas state
trancexx Posted November 7, 2013 Posted November 7, 2013 That' because the function will probably return coordinates of the ISP's station through which you connect to internet, not your computer. ♡♡♡ . eMyvnE
tonycst Posted November 7, 2013 Posted November 7, 2013 (edited) Thats what i was hoping for. But i am home right now and i get same coordinates that i got from work miles away and on a corporate network. I had another computer ran script from another location on same ISP but different IP address and he returned same data as well. ID: 0x000000F4 Latitude: 39.45 Longitude: -98.908 Name: United States ISO code: USA So i assume its the ISP address not my location at all ? If all 3 computers used COMCAST, then they all point to same coordinates ? Edited November 7, 2013 by tonycst
trancexx Posted November 7, 2013 Posted November 7, 2013 Very likely. There's a good side of that when you think. In case some terrorists not liking the great US of A decide to crash a plain or two at the coordinates you just gave, you'll be safe. Lucky you. ♡♡♡ . eMyvnE
water Posted November 7, 2013 Posted November 7, 2013 LOL. In my case it is very likely that the terrorists are going to bomb a place in Australia My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
l3ill Posted November 7, 2013 Posted November 7, 2013 Why would the terrorists not like the USA. They send them money and weapons... Not completely off topic... Geo-political. My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
Rafaelinio Posted November 7, 2013 Posted November 7, 2013 well the way i'd do it is $os = @OSLang Switch $os Case "0409" $os = "This country code is ........." Case Else $os = "Uknown Country!" EndSwitch MsgBox(0,"Test", $os) and just finish out the country codes...
guinness Posted November 7, 2013 Posted November 7, 2013 Rafaelinio,but as is shown this information can be extracted via using certain Win32 API calls. No need to manually do it. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now