Jump to content

Recommended Posts

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

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

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

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
On 7/16/2004 at 6:26 PM, SlimShady said:

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

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

 

Now I know that sounds weird... but the link is dead. And my #include <ControlSendPlus.au3> ends with error:
can’t open include file <ControlSendPlus.au3>.

Checked a couple of topics none helped. The reason - because ControlSend every now and then makes the first 2 letters/symbols lines read from a file capital. And since I am sending them to a search box - it all becomes useless 😞 It's a name a.ant....=A>ant.....

PLS assist.

 

Thanks in advance, 

 

PS:The last time I used this was more than 10 years ago. I can't believe it's still the same and it works.... almost :D

Share this post


Link to post
Share on other sites

With what do you suggest to change ControlSendPlus or how to send my ControlSend my FileReadLine accurately? The even weirder is that when I put MsgBox. It's always read correctly, but when ControlSending it - it gets the above described situation.

And about those 16 years and missing author since 2011 - 2004 there's AutoIt v3 and the last minor update is like 2 years ago.... Here the time has stopped :D:D:D

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...