Rogue5099 Posted April 3, 2014 Share Posted April 3, 2014 I am checking a current version from an .ini file uploaded to a cloud. Right now I am downloading the file doing an INIRead then deleting the file. InetGet("link", @TempDir & "\ProgramVersionCheck.ini", 3) $NewVersion = IniRead(@TempDir & "\ProgramVersionCheck.ini", "ProgramName", "version", "") FileDelete(@TempDir & "\ProgramVersionCheck.ini") So instead of downloading the file I wanted to use _INetGetSource() to avoid writing a temp file. This is what I get: [ProgramName1] version=x.x.x.x [ProgramName2] version=x.x.x.x What I've coded so far to read ProgramName1's version is below and it works: #include <Inet.au3> $Source = _INetGetSource('link') $New = StringTrimLeft($Source, StringInStr($Source, "=")) $NewVersion = StringStripWS(StringStripCR(StringTrimRight($New, StringLen($New) - StringInStr($New, "[") + 1)), 8) Wondering if there would be a better way accomplish this than all the string edits or if this is an effective way. My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
JohnOne Posted April 3, 2014 Share Posted April 3, 2014 InetRead() and '?do=embed' frameborder='0' data-embedContent>> AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
guinness Posted April 3, 2014 Share Posted April 3, 2014 (edited) There is an Ini Virtual by AZJIO. Edited April 3, 2014 by guinness 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 Link to comment Share on other sites More sharing options...
DXRW4E Posted April 3, 2014 Share Posted April 3, 2014 (edited) will have to be more faster, because it works (Handle Mod) completely ByRef ; $INI_OPEN_FILEQUEUE (268435456) - Open INI file from Memory\Variable, $sFilePath must contain String Text Data of INI file $hIniFile = _IniOpenFileEx(@DesktopDir & "\Test.ini") ;ect ect ect ;or $hIniFile = _IniOpenFileEx($sData, $INI_OPEN_FILEQUEUE) ;ect ect ect ;Or direct mode, without load ini or using handles ; $sSectionName - The name of the section containing the Key\Value, This parameter can be NULL (use the $NULL_REF to set NULL this parameter) ; If $sSectionName is NULL, $hIniFile must be contain Section String\Key\Value\Data ;; _IniDeleteEx($hIniFile, $sSectionName, $sKeyName) _IniDeleteEx($sData, $NULL_REF, $sKeyName) ;$NULL_REF = NULL ;; _IniReadEx($hIniFile, $sSectionName, $sKeyName) _IniDeleteEx($sData, $NULL_REF, $sKeyName) ;$NULL_REF = NULL ;; _IniReadSectionEx($hIniFile, $sSectionName, $sKeyName) _IniReadSectionEx($sData, $NULL_REF, $sKeyName) ;$NULL_REF = NULL ;; _IniWriteEx($hIniFile, $sSectionName, $sKeyName, $sValue) _IniWriteEx($sData, $NULL_REF, $sKeyName, $sValue) ;$NULL_REF = NULL ;;ect ect ect So for all other functions Ciao. Edited April 3, 2014 by DXRW4E Link to comment Share on other sites More sharing options...
guinness Posted April 4, 2014 Share Posted April 4, 2014 I forgot about your UDF DXRW4E. Sorry. 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 Link to comment Share on other sites More sharing options...
DXRW4E Posted April 4, 2014 Share Posted April 4, 2014 Hi guinness, is everything OK , I just wanted to point out above that as a process handle mode (Thanks to the latest release of AutoIt, such as the Array access on expression) is more faster, and will have to interpret more good the scenarios regard HT VT LF FF CR NULL ect ect Ciao. Link to comment Share on other sites More sharing options...
Rogue5099 Posted April 4, 2014 Author Share Posted April 4, 2014 >_IniString worked great for my application. Thanks for all the input. I'll check out DXRW4E's UDF and see if it is faster. My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
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