Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

My UDFs


  • Please log in to reply
8 replies to this topic

#1 SlimShady

SlimShady

    AutoIt lover

  • Active Members
  • PipPipPipPipPipPip
  • 2,383 posts

Posted 16 July 2004 - 03:26 PM

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, 27 October 2005 - 07:14 AM.








#2 SlimShady

SlimShady

    AutoIt lover

  • Active Members
  • PipPipPipPipPipPip
  • 2,383 posts

Posted 16 July 2004 - 04:30 PM

- Added all functions to first post.

#3 magaf

magaf

    Seeker

  • Active Members
  • 40 posts

Posted 17 July 2004 - 08:13 PM

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, 17 July 2004 - 08:48 PM.


#4 SlimShady

SlimShady

    AutoIt lover

  • Active Members
  • PipPipPipPipPipPip
  • 2,383 posts

Posted 17 July 2004 - 10:39 PM

No problem.

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

#5 tutor2000

tutor2000

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 295 posts

Posted 19 July 2004 - 12:32 AM

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
Only $2.00 with Resale Rights How to Block Better for Martial Artists and NonMartial Artistshttp://kirkhamsebooks.com/MartialArts/Bloc...tterEbook_m.htm

#6 SlimShady

SlimShady

    AutoIt lover

  • Active Members
  • PipPipPipPipPipPip
  • 2,383 posts

Posted 19 July 2004 - 09:14 AM

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, 19 July 2004 - 09:15 AM.


#7 SlimShady

SlimShady

    AutoIt lover

  • Active Members
  • PipPipPipPipPipPip
  • 2,383 posts

Posted 27 October 2005 - 07:17 AM

As requested by i110gic I *kick* this topic.
I also uploaded my latest version.

#8 randallc

randallc

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,902 posts

Posted 28 October 2005 - 02:37 PM

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

#9 busysignal

busysignal

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 349 posts

Posted 29 October 2005 - 07:17 AM

- Added all functions to first post.


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

Cheers.. :graduated:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users