DCCD Posted January 28, 2011 Share Posted January 28, 2011 As you can see, there's $var1 in my scr.au3 and the same in .INI file, both works but which one is faster, I bet on the one inside .au3 file!. So i tried to get the ini var delay in milliseconds "See Example Below", but there's no delay! So i need your help to know which one is faster in milliseconds. .au3 $var1 = "create and assign" .ini [1] var1=create and assign get the delay in milliseconds. IniWrite(@ScriptDir&"\myfile.ini", "section2", "key", @ComputerName) ; ; $start=@MSEC $var = IniRead(@ScriptDir&"\myfile.ini", "section2", "key", "NotFound") $End=@MSEC MsgBox(4096, "Result", 'Start: '&$start&'ms '&@CRLF&'End: '&$End&'ms'&@CRLF&@CRLF&'key='&$var) [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group Link to comment Share on other sites More sharing options...
water Posted January 28, 2011 Share Posted January 28, 2011 (edited) Use something like: IniWrite(@ScriptDir & "\myfile.ini", "section2", "key", @ComputerName) $start = TimerInit() $var = IniRead(@ScriptDir & "\myfile.ini", "section2", "key", "NotFound") $Duration = TimerDiff($start) MsgBox(4096, "Result", 'Duration: ' & $Duration & @CRLF & 'key=' & $var)I get 0.107 milliseconds. What you use in your script depends on what you want to achieve. An ini file can be changed easily - so you don't have to change your script. Edited January 28, 2011 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
DCCD Posted January 28, 2011 Author Share Posted January 28, 2011 (edited) thanks a lot, i get this, both look fast in microseconds! ini var = 0.100571441342405 au3 $var = 0.00866031856004045 . Edited January 28, 2011 by DCCD [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group 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