nitro322 Posted September 9, 2005 Posted September 9, 2005 How can I determine the age of a compiled script? I want to, for example, display a message prompting users to download the newest version of it's more than one month old. I posted a while back asking about compile-time variables (http://www.autoitscript.com/forum/index.php?showtopic=11569), which could be used for this purpose as well, but that doesn't appear to be supported. Are there any other suggestions for this? Thanks. http://www.legroom.net/
Valuater Posted September 9, 2005 Posted September 9, 2005 with this $t = FileGetTime(@Windowsdir & "\Notepad.exe", 1) If Not @error Then $yyyymd = $t[0] & "/" & $t[1] & "/" & $t[2] MsgBox(0, "Creation date of notepad.exe", $yyyymd) EndIf check help for more info 8)
seandisanti Posted September 9, 2005 Posted September 9, 2005 How can I determine the age of a compiled script? I want to, for example, display a message prompting users to download the newest version of it's more than one month old.I posted a while back asking about compile-time variables (http://www.autoitscript.com/forum/index.php?showtopic=11569), which could be used for this purpose as well, but that doesn't appear to be supported.Are there any other suggestions for this? Thanks.<{POST_SNAPBACK}>there's always the obvious choice of hardcoding in a 'birthdate' to the script...Global $birthday = 9 Global $birthmonth = 9 Global $birthyear=2005 Func ExpirationCheck() ;check if current date is more than 30 days after the birthdate using macros ;and react if it is, or continue if it's not EndFunc
therks Posted September 9, 2005 Posted September 9, 2005 with this$t = FileGetTime(@Windowsdir & "\Notepad.exe", 1) If Not @error Then $yyyymd = $t[0] & "/" & $t[1] & "/" & $t[2] MsgBox(0, "Creation date of notepad.exe", $yyyymd) EndIfcheck help for more info8)<{POST_SNAPBACK}>Heh, I never thought of that.Alternatively, you could use FileGetTime(@ScriptFullPath). My AutoIt Stuff | My Github
nitro322 Posted September 12, 2005 Author Posted September 12, 2005 I thought about using FileGetTime(), but I'm not sure of it's reliability. What if the file gets copied? What if it's renamed? Will the modified date guaranteed to remain constant? http://www.legroom.net/
/dev/null Posted September 12, 2005 Posted September 12, 2005 I thought about using FileGetTime(), but I'm not sure of it's reliability. What if the file gets copied? What if it's renamed? Will the modified date guaranteed to remain constant?FileGetTime() on the executable is no good idea. Use the method described by cameronsdad in post #3.CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
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