Sign in to follow this  
Followers 0
CodyBarrett

Version UDF

1 post in this topic

#1 ·  Posted (edited)

lol i got bored.. so i made this ( i actually have been thinking of how to do it) but i couldn't get {F5} to run the func... so yeah what i wanted was whenever i tested the script i was currently on.. it would add +1 to the version #... but i could't do that... well.. i was to lazy to do that so i made this

#NoTrayIcon
#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.0.0
 Author:         Cody Barrett

 Script Function:
    Makes Version numbers for apps.. and records them

#ce ----------------------------------------------------------------------------
HotKeySet ('!^v', '_New_Version_')
HotKeySet ('!^n', '_New_Prog_')
HotKeySet ('!^{ESC}', '_Exit_')
Dim $hWnd, $i, $a
_New_Prog_ ()
While 1
    Sleep (100)
WEnd
Func _New_Prog_ ()
    $i=1
    $hWnd=InputBox ('New Program?', 'Please type in the name of the new program to set version updates for.')
    $hWnd&='.txt'
    If FileExists ($hWnd) Then
        $i=FileRead ($hWnd)
        $a=1
        Do
            $a+=1
            $i=StringRight ($i, $a)
        Until StringRight ($i, 1)='#'
        $i+=1
    Else
        _New_Version_ ()
    EndIf   
EndFunc
Func _New_Version_ ()
    MsgBox (0,'UPDATED','New Version Updated! #' & $i)
    $i+=1
    FileWrite (@ScriptDir & '\' & $hWnd, @CRLF & @CRLF & 'Version Updated...' & @CRLF & '   Version #' & $i)
EndFunc
Func _Exit_ ()
    Exit
EndFunc

lmao its not very pretty.. but it DOES make a .txt with the version #s in it... all i have to do is remember to look into that txt file ;)

yeah haha... now im bored again... gonna go to the drawing board ^_^

EDIT

last known version# couldn't be loaded.. now it can (just have to know the txt name)

Edited by CodyBarrett

Share this post


Link to post
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
Sign in to follow this  
Followers 0