Sign in to follow this  
Followers 0

My UDFs

9 posts in this topic

Posted (edited)

All my UDFs are in one file. Download the file below:

http://www.autoitscript.com/fileman/users/SlimShady/MyUDFs.au3

Here are all the UDFs I created.

StringTrim($String, $start, $end, $StartOccur, $EndOccur)

PercentFrom($percent, $value)

TimeDiff($time, $min, $Dir)

GlobalVarsRead($VarName, $Section = 'Other')

GlobalVarsDelete($VarName = '', $Section = 'Other')

GlobalVarsWrite($VarName, $VarValue = '', $Section = '', $File = '')

ControlReadLine($window, $Text = '', $control = 1, $LineNum = 1)

ControlAddLine($window, $Text, $control, $Line)

ReplaceLine($File, $LineNum, $NewLine)

ReadLine($File, $LineNum)

SubString($String, $start, $end, $StartOccur, $EndOccur)

FileReadAll($File)

SaveFile($File, $Text)

_FileLineDelete($fileName, $lineNum); $lineNum >= 1

_FileLineInsert($fileName, $lineNum, $line, $end = @crlf); $lineNum >= 1

CreateURLShortcut($File, $URL)

ReadURLShortcut($File)

CountSubs(ByRef $Text, $Subs, $Opt = 0)

Txt2Arr($Str, $SepChar)

ParseFilename($File)

Assoc($Filename)

CurrentMonth($num, $lang)

CurrentTime()

CurrentDay($num, $lang)

ControlSendPlus($Title, $Text, $className, $String, $flag)

GetLines($File, $SubString)

ParseTag($Line, $Tag, $mode = 0)

ArrName2Arr($mode, $var, $char, $Arr)

FileOpenDialogEx($Title, $filter, $Opt, $Filename)

GetDir($Filename)

AddToArray($Arr, $value)

ConvWeekDay($sOldWeekDay, $mode = 0)

DelFromArray($Arr, $Loc)

Alphabetize($array)

Swap(ByRef $v1, ByRef $v2)

MergeToArray(ByRef $Arr1, ByRef $Arr2)

BinarySearch($Arr, $target)

IsFolder($Path)

FileReadToArray($File, ByRef $TmpVal)

_Sleep($Delay)

StringStripLF(ByRef $Str)

FileCountLines($File)

_INIWrite($gINIFile, $gINISection, $gINIKey, $gINIKeyValue)

_INIRead($gINIFile, $gINISection, $gINIKey, $gINIKeyValue_default = "")

_INIDelete($gINIFile, $gINISection, $gINIKey = "")

_Calc($Expr, $Del = 0)

_Execute($LineofCode, $Wait = True, $rUsername = "", $rDomain = "", $rPassword = "", $rOpts = 1)

CalcTime($Action)

GetFolder($sFilename)

GetParent($sFilename)

GetFilename($sFilename)

ParseString($Cmd, $Del = 0)

GetPath($Str)

SynchroCopy($File1, $File2)

NewFileCopy($File1, $File2)

FileNewer($SourceFile, $DestFile)

AutoItHandle()

_DIR($Folder = "", $Opts = "")

IsVisible($handle)

_Debug($msg = '', $ShowWin = False, $Prefix = True)

Pause()

_GUICtrlCreateMyDummy()

_GUICtrlSendToMyDummy($hWnd, $idDummy, $sData = "")

_GUICtrlReadMyDummy($hWnd, $idDummy)

Edited by SlimShady

Share this post


Link to post
Share on other sites



Posted

- Added all functions to first post.

Share this post


Link to post
Share on other sites

Posted (edited)

thx for sharing it, ive found a problem with FileDeleteLine - it wont delete the line if its the last line (any other line it will)

edit: i saw whats the problem and i dont think deleting the last line is possible without using an array (or a temp file) which.. some1 thinks otherwise?

Edited by magaf

Share this post


Link to post
Share on other sites

Posted

No problem.

Updated FileDeleteLine.

- Added some checks so it deletes any line you want.

Share this post


Link to post
Share on other sites

Posted

No problem.

Updated FileDeleteLine.

- Added some checks so it deletes any line you want.

Since someone brought up beta vs official release;

What ver do I need to run your udf's

Thanks by the way

Rick

Share this post


Link to post
Share on other sites

Posted (edited)

It depends on which function you want to use.

See the descriptions in the file.

If you see requirements: none you can use the current version.

Else use the latest beta.

Jon told us that v3.0.102 will be soon released officially.

Edited by SlimShady

Share this post


Link to post
Share on other sites

Posted

As requested by i110gic I *kick* this topic.

I also uploaded my latest version.

Share this post


Link to post
Share on other sites

Posted

Hi,

These look to be good work to me!

Are some of them already in the main "Official" UDF list?

Would they benefit by checking if file opens for large files (100Mb etc) and having the option to use DOS processing in that case? [see a FileDeleteLine and findstrDos in my signature for instance]?

Best, Randall

Share this post


Link to post
Share on other sites

Posted

- Added all functions to first post.

@SlimShady, Wow! :o You B) ! Nice set of tools thanks for the post!

Cheers.. :graduated:

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

  • Recently Browsing   0 members

    No registered users viewing this page.