Sign in to follow this  
Followers 0
denno

Excluding drives from backup script

17 posts in this topic

Hello,

I've got a full or partial backup script here with Auotit. It runs smooth everyday using snapshot. But everyday I get an error message per mail saying that drive F cannot be backup'd. This is simply because F is or was a removable drive. How can I specifically exclude F from my backup script?

Regards

Dennis

Share this post


Link to post
Share on other sites



Hi denno,

As jguinch said, it would be easier with the code, nevertheless , check the DriveGetDrive, as you can include only the fixed drives.

Cheers.


Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Share this post


Link to post
Share on other sites

Regular expression?

#include <MsgBoxConstants.au3>
If StringRegExp($sFilePath, "^(?:D|F):") Then MsgBox($MB_SYSTEMMODAL, "", "Excluded")

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

Thanks Guiness, I'll try that

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Basically it's excluding the D and F drive, so if you just want F change (?: D|F) to F or if you want to exclude C, D and F then use (?:C|D|F). Understand?

Note: I need the space between the colon and D in this post as it translates to :D otherwise.

Edited by guinness

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I'll guess I'll post the code as I don't exactly know where to enter the regular expression in order to test it.

Global Const $fc_nooverwrite = 0
Global Const $fc_overwrite = 1
Global Const $ft_modified = 0
Global Const $ft_created = 1
Global Const $ft_accessed = 2
Global Const $fo_read = 0
Global Const $fo_append = 1
Global Const $fo_overwrite = 2
Global Const $fo_binary = 16
Global Const $fo_unicode = 32
Global Const $fo_utf16_le = 32
Global Const $fo_utf16_be = 64
Global Const $fo_utf8 = 128
Global Const $fo_utf8_nobom = 256
Global Const $eof = -1
Global Const $fd_filemustexist = 1
Global Const $fd_pathmustexist = 2
Global Const $fd_multiselect = 4
Global Const $fd_promptcreatenew = 8
Global Const $fd_promptoverwrite = 16
Global Const $create_new = 1
Global Const $create_always = 2
Global Const $open_existing = 3
Global Const $open_always = 4
Global Const $truncate_existing = 5
Global Const $invalid_set_file_pointer = -1
Global Const $file_begin = 0
Global Const $file_current = 1
Global Const $file_end = 2
Global Const $file_attribute_readonly = 1
Global Const $file_attribute_hidden = 2
Global Const $file_attribute_system = 4
Global Const $file_attribute_directory = 16
Global Const $file_attribute_archive = 32
Global Const $file_attribute_device = 64
Global Const $file_attribute_normal = 128
Global Const $file_attribute_temporary = 256
Global Const $file_attribute_sparse_file = 512
Global Const $file_attribute_reparse_point = 1024
Global Const $file_attribute_compressed = 2048
Global Const $file_attribute_offline = 4096
Global Const $file_attribute_not_content_indexed = 8192
Global Const $file_attribute_encrypted = 16384
Global Const $file_share_read = 1
Global Const $file_share_write = 2
Global Const $file_share_delete = 4
Global Const $generic_all = 268435456
Global Const $generic_execute = 536870912
Global Const $generic_write = 1073741824
Global Const $generic_read = -2147483648

Func _filecountlines($sfilepath)
Local $hfile = FileOpen($sfilepath, $fo_read)
If $hfile = -1 Then Return SetError(1, 0, 0)
Local $sfilecontent = StringStripWS(FileRead($hfile), 2)
FileClose($hfile)
Local $atmp
If StringInStr($sfilecontent, @LF) Then
$atmp = StringSplit(StringStripCR($sfilecontent), @LF)
ElseIf StringInStr($sfilecontent, @CR) Then
$atmp = StringSplit($sfilecontent, @CR)
Else
If StringLen($sfilecontent) Then
Return 1
Else
Return SetError(2, 0, 0)
EndIf
EndIf
Return $atmp[0]
EndFunc

Func _filecreate($sfilepath)
Local $hopenfile = FileOpen($sfilepath, $fo_overwrite)
If $hopenfile = -1 Then Return SetError(1, 0, 0)
Local $hwritefile = FileWrite($hopenfile, "")
FileClose($hopenfile)
If $hwritefile = -1 Then Return SetError(2, 0, 0)
Return 1
EndFunc

Func _filelisttoarray($spath, $sfilter = "*", $iflag = 0)
Local $hsearch, $sfile, $sfilelist, $sdelim = "|"
$spath = StringRegExpReplace($spath, "[\\/]+\z", "") & "\"
If NOT FileExists($spath) Then Return SetError(1, 1, "")
If StringRegExp($sfilter, "[\\/:><\|]|(?s)\A\s*\z") Then Return SetError(2, 2, "")
If NOT ($iflag = 0 OR $iflag = 1 OR $iflag = 2) Then Return SetError(3, 3, "")
$hsearch = FileFindFirstFile($spath & $sfilter)
If @error Then Return SetError(4, 4, "")
While 1
$sfile = FileFindNextFile($hsearch)
If @error Then ExitLoop
If ($iflag + @extended = 2) Then ContinueLoop
$sfilelist &= $sdelim & $sfile
WEnd
FileClose($hsearch)
If NOT $sfilelist Then Return SetError(4, 4, "")
Return StringSplit(StringTrimLeft($sfilelist, 1), "|")
EndFunc

Func _fileprint($s_file, $i_show = @SW_HIDE)
Local $a_ret = DllCall("shell32.dll", "int", "ShellExecuteW", "hwnd", 0, "wstr", "print", "wstr", $s_file, "wstr", "", "wstr", "", "int", $i_show)
If @error Then Return SetError(@error, @extended, 0)
If $a_ret[0] <= 32 Then Return SetError(10, $a_ret[0], 0)
Return 1
EndFunc

Func _filereadtoarray($sfilepath, ByRef $aarray)
Local $hfile = FileOpen($sfilepath, $fo_read)
If $hfile = -1 Then Return SetError(1, 0, 0)
Local $afile = FileRead($hfile, FileGetSize($sfilepath))
If StringRight($afile, 1) = @LF Then $afile = StringTrimRight($afile, 1)
If StringRight($afile, 1) = @CR Then $afile = StringTrimRight($afile, 1)
FileClose($hfile)
If StringInStr($afile, @LF) Then
$aarray = StringSplit(StringStripCR($afile), @LF)
ElseIf StringInStr($afile, @CR) Then
$aarray = StringSplit($afile, @CR)
Else
If StringLen($afile) Then
Dim $aarray[2] = [1, $afile]
Else
Return SetError(2, 0, 0)
EndIf
EndIf
Return 1
EndFunc

Func _filewritefromarray($file, $a_array, $i_base = 0, $i_ubound = 0, $s_delim = "|")
If NOT IsArray($a_array) Then Return SetError(2, 0, 0)
Local $idims = UBound($a_array, 0)
If $idims > 2 Then Return SetError(4, 0, 0)
Local $last = UBound($a_array) - 1
If $i_ubound < 1 OR $i_ubound > $last Then $i_ubound = $last
If $i_base < 0 OR $i_base > $last Then $i_base = 0
Local $hfile
If IsString($file) Then
$hfile = FileOpen($file, $fo_overwrite)
Else
$hfile = $file
EndIf
If $hfile = -1 Then Return SetError(1, 0, 0)
Local $errorsav = 0
Switch $idims
Case 1
For $x = $i_base To $i_ubound
If FileWrite($hfile, $a_array[$x] & @CRLF) = 0 Then
$errorsav = 3
ExitLoop
EndIf
Next
Case 2
Local $s_temp
For $x = $i_base To $i_ubound
$s_temp = $a_array[$x][0]
For $y = 1 To $idims
$s_temp &= $s_delim & $a_array[$x][$y]
Next
If FileWrite($hfile, $s_temp & @CRLF) = 0 Then
$errorsav = 3
ExitLoop
EndIf
Next
EndSwitch
If IsString($file) Then FileClose($hfile)
If $errorsav Then Return SetError($errorsav, 0, 0)
Return 1
EndFunc

Func _filewritelog($slogpath, $slogmsg, $iflag = -1)
Local $hopenfile = $slogpath, $iopenmode = $fo_append
Local $sdatenow = @YEAR & "-" & @MON & "-" & @MDAY
Local $stimenow = @HOUR & ":" & @MIN & ":" & @SEC
Local $smsg = $sdatenow & " " & $stimenow & " : " & $slogmsg
If $iflag <> -1 Then
$smsg &= @CRLF & FileRead($slogpath)
$iopenmode = $fo_overwrite
EndIf
If IsString($slogpath) Then
$hopenfile = FileOpen($slogpath, $iopenmode)
If $hopenfile = -1 Then
Return SetError(1, 0, 0)
EndIf
EndIf
Local $ireturn = FileWriteLine($hopenfile, $smsg)
If IsString($slogpath) Then
$ireturn = FileClose($hopenfile)
EndIf
If $ireturn <= 0 Then
Return SetError(2, $ireturn, 0)
EndIf
Return $ireturn
EndFunc

Func _filewritetoline($sfile, $iline, $stext, $foverwrite = 0)
If $iline <= 0 Then Return SetError(4, 0, 0)
If NOT IsString($stext) Then
$stext = String($stext)
If $stext = "" Then Return SetError(6, 0, 0)
EndIf
If $foverwrite <> 0 AND $foverwrite <> 1 Then Return SetError(5, 0, 0)
If NOT FileExists($sfile) Then Return SetError(2, 0, 0)
Local $sread_file = FileRead($sfile)
Local $asplit_file = StringSplit(StringStripCR($sread_file), @LF)
If UBound($asplit_file) < $iline Then Return SetError(1, 0, 0)
Local $iencoding = FileGetEncoding($sfile)
Local $hfile = FileOpen($sfile, $iencoding + $fo_overwrite)
If $hfile = -1 Then Return SetError(3, 0, 0)
$sread_file = ""
For $i = 1 To $asplit_file[0]
If $i = $iline Then
If $foverwrite = 1 Then
If $stext <> "" Then $sread_file &= $stext & @CRLF
Else
$sread_file &= $stext & @CRLF & $asplit_file[$i] & @CRLF
EndIf
ElseIf $i < $asplit_file[0] Then
$sread_file &= $asplit_file[$i] & @CRLF
ElseIf $i = $asplit_file[0] Then
$sread_file &= $asplit_file[$i]
EndIf
Next
FileWrite($hfile, $sread_file)
FileClose($hfile)
Return 1
EndFunc

Func _pathfull($srelativepath, $sbasepath = @WorkingDir)
If NOT $srelativepath OR $srelativepath = "." Then Return $sbasepath
Local $sfullpath = StringReplace($srelativepath, "/", "\")
Local Const $sfullpathconst = $sfullpath
Local $spath
Local $brootonly = StringLeft($sfullpath, 1) = "\" AND StringMid($sfullpath, 2, 1) <> "\"
For $i = 1 To 2
$spath = StringLeft($sfullpath, 2)
If $spath = "\\" Then
$sfullpath = StringTrimLeft($sfullpath, 2)
Local $nserverlen = StringInStr($sfullpath, "\") - 1
$spath = "\\" & StringLeft($sfullpath, $nserverlen)
$sfullpath = StringTrimLeft($sfullpath, $nserverlen)
ExitLoop
ElseIf StringRight($spath, 1) = ":" Then
$sfullpath = StringTrimLeft($sfullpath, 2)
ExitLoop
Else
$sfullpath = $sbasepath & "\" & $sfullpath
EndIf
Next
If $i = 3 Then Return ""
If StringLeft($sfullpath, 1) <> "\" Then
If StringLeft($sfullpathconst, 2) = StringLeft($sbasepath, 2) Then
$sfullpath = $sbasepath & "\" & $sfullpath
Else
$sfullpath = "\" & $sfullpath
EndIf
EndIf
Local $atemp = StringSplit($sfullpath, "\")
Local $apathparts[$atemp[0]], $j = 0
For $i = 2 To $atemp[0]
If $atemp[$i] = ".." Then
If $j Then $j -= 1
ElseIf NOT ($atemp[$i] = "" AND $i <> $atemp[0]) AND $atemp[$i] <> "." Then
$apathparts[$j] = $atemp[$i]
$j += 1
EndIf
Next
$sfullpath = $spath
If NOT $brootonly Then
For $i = 0 To $j - 1
$sfullpath &= "\" & $apathparts[$i]
Next
Else
$sfullpath &= $sfullpathconst
If StringInStr($sfullpath, "..") Then $sfullpath = _pathfull($sfullpath)
EndIf
While StringInStr($sfullpath, ".\")
$sfullpath = StringReplace($sfullpath, ".\", "\")
WEnd
Return $sfullpath
EndFunc

Func _pathgetrelative($sfrom, $sto)
If StringRight($sfrom, 1) <> "\" Then $sfrom &= "\"
If StringRight($sto, 1) <> "\" Then $sto &= "\"
If $sfrom = $sto Then Return SetError(1, 0, StringTrimRight($sto, 1))
Local $asfrom = StringSplit($sfrom, "\")
Local $asto = StringSplit($sto, "\")
If $asfrom[1] <> $asto[1] Then Return SetError(2, 0, StringTrimRight($sto, 1))
Local $i = 2
Local $idiff = 1
While 1
If $asfrom[$i] <> $asto[$i] Then
$idiff = $i
ExitLoop
EndIf
$i += 1
WEnd
$i = 1
Local $srelpath = ""
For $j = 1 To $asto[0]
If $i >= $idiff Then
$srelpath &= "\" & $asto[$i]
EndIf
$i += 1
Next
$srelpath = StringTrimLeft($srelpath, 1)
$i = 1
For $j = 1 To $asfrom[0]
If $i > $idiff Then
$srelpath = "..\" & $srelpath
EndIf
$i += 1
Next
If StringRight($srelpath, 1) == "\" Then $srelpath = StringTrimRight($srelpath, 1)
Return $srelpath
EndFunc

Func _pathmake($szdrive, $szdir, $szfname, $szext)
If StringLen($szdrive) Then
If NOT (StringLeft($szdrive, 2) = "\\") Then $szdrive = StringLeft($szdrive, 1) & ":"
EndIf
If StringLen($szdir) Then
If NOT (StringRight($szdir, 1) = "\") AND NOT (StringRight($szdir, 1) = "/") Then $szdir = $szdir & "\"
EndIf
If StringLen($szext) Then
If NOT (StringLeft($szext, 1) = ".") Then $szext = "." & $szext
EndIf
Return $szdrive & $szdir & $szfname & $szext
EndFunc

Func _pathsplit($szpath, ByRef $szdrive, ByRef $szdir, ByRef $szfname, ByRef $szext)
Local $drive = ""
Local $dir = ""
Local $fname = ""
Local $ext = ""
Local $pos
Local $array[5]
$array[0] = $szpath
If StringMid($szpath, 2, 1) = ":" Then
$drive = StringLeft($szpath, 2)
$szpath = StringTrimLeft($szpath, 2)
ElseIf StringLeft($szpath, 2) = "\\" Then
$szpath = StringTrimLeft($szpath, 2)
$pos = StringInStr($szpath, "\")
If $pos = 0 Then $pos = StringInStr($szpath, "/")
If $pos = 0 Then
$drive = "\\" & $szpath
$szpath = ""
Else
$drive = "\\" & StringLeft($szpath, $pos - 1)
$szpath = StringTrimLeft($szpath, $pos - 1)
EndIf
EndIf
Local $nposforward = StringInStr($szpath, "/", 0, -1)
Local $nposbackward = StringInStr($szpath, "\", 0, -1)
If $nposforward >= $nposbackward Then
$pos = $nposforward
Else
$pos = $nposbackward
EndIf
$dir = StringLeft($szpath, $pos)
$fname = StringRight($szpath, StringLen($szpath) - $pos)
If StringLen($dir) = 0 Then $fname = $szpath
$pos = StringInStr($fname, ".", 0, -1)
If $pos Then
$ext = StringRight($fname, StringLen($fname) - ($pos - 1))
$fname = StringLeft($fname, $pos - 1)
EndIf
$szdrive = $drive
$szdir = $dir
$szfname = $fname
$szext = $ext
$array[1] = $drive
$array[2] = $dir
$array[3] = $fname
$array[4] = $ext
Return $array
EndFunc

Func _replacestringinfile($szfilename, $szsearchstring, $szreplacestring, $fcaseness = 0, $foccurance = 1)
Local $iretval = 0
Local $ncount, $sendswith
If StringInStr(FileGetAttrib($szfilename), "R") Then Return SetError(6, 0, -1)
Local $hfile = FileOpen($szfilename, $fo_read)
If $hfile = -1 Then Return SetError(1, 0, -1)
Local $s_totfile = FileRead($hfile, FileGetSize($szfilename))
If StringRight($s_totfile, 2) = @CRLF Then
$sendswith = @CRLF
ElseIf StringRight($s_totfile, 1) = @CR Then
$sendswith = @CR
ElseIf StringRight($s_totfile, 1) = @LF Then
$sendswith = @LF
Else
$sendswith = ""
EndIf
Local $afilelines = StringSplit(StringStripCR($s_totfile), @LF)
FileClose($hfile)
Local $iencoding = FileGetEncoding($szfilename)
Local $hwritehandle = FileOpen($szfilename, $iencoding + $fo_overwrite)
If $hwritehandle = -1 Then Return SetError(2, 0, -1)
For $ncount = 1 To $afilelines[0]
If StringInStr($afilelines[$ncount], $szsearchstring, $fcaseness) Then
$afilelines[$ncount] = StringReplace($afilelines[$ncount], $szsearchstring, $szreplacestring, 1 - $foccurance, $fcaseness)
$iretval = $iretval + 1
If $foccurance = 0 Then
$iretval = 1
ExitLoop
EndIf
EndIf
Next
For $ncount = 1 To $afilelines[0] - 1
If FileWriteLine($hwritehandle, $afilelines[$ncount]) = 0 Then
FileClose($hwritehandle)
Return SetError(3, 0, -1)
EndIf
Next
If $afilelines[$ncount] <> "" Then FileWrite($hwritehandle, $afilelines[$ncount] & $sendswith)
FileClose($hwritehandle)
Return $iretval
EndFunc

Func _tempfile($s_directoryname = @TempDir, $s_fileprefix = "~", $s_fileextension = ".tmp", $i_randomlength = 7)
If IsKeyword($s_fileprefix) Then $s_fileprefix = "~"
If IsKeyword($s_fileextension) Then $s_fileextension = ".tmp"
If IsKeyword($i_randomlength) Then $i_randomlength = 7
If NOT FileExists($s_directoryname) Then $s_directoryname = @TempDir
If NOT FileExists($s_directoryname) Then $s_directoryname = @ScriptDir
If StringRight($s_directoryname, 1) <> "\" Then $s_directoryname = $s_directoryname & "\"
Local $s_tempname
Do
$s_tempname = ""
While StringLen($s_tempname) < $i_randomlength
$s_tempname = $s_tempname & Chr(Random(97, 122, 1))
WEnd
$s_tempname = $s_directoryname & $s_fileprefix & $s_tempname & $s_fileextension
Until NOT FileExists($s_tempname)
Return $s_tempname
EndFunc

Global $smtpserver = IniRead("config.ini", "EmailSettings", "SmtpServer", "nicht gefunden")
Global $fromname = IniRead("config.ini", "EmailSettings", "FromName", "nicht gefunden")
Global $fromaddress = IniRead("config.ini", "EmailSettings", "FromAddress", "nicht gefunden")
Global $toaddress = IniRead("config.ini", "EmailSettings", "ToAddress", "nicht gefunden")
Global $subject = "Userinfo"
Global $body = ""
$attachfiles = ""
Global $ccaddress = IniRead("config.ini", "EmailSettings", "CcAddress", "nicht gefunden")
$bccaddress = "BCCadress1@test.com"
$importance = "Normal"
Global $username = IniRead("config.ini", "EmailSettings", "Username", "nicht gefunden")
Global $password = IniRead("config.ini", "EmailSettings", "Password", "nicht gefunden")
Global $ipport = 25
$ssl = 0
Global $mytimestamp = @YEAR & "_" & @MON & "_" & @HOUR & "_" & @MIN & "_" & @SEC
Global $afestplatten = DriveGetDrive("FIXED")
Global $savedir = IniRead("config.ini", "Parameter", "SaveDir", "SaveDir nicht gefunden")
Global $savetype = IniRead("config.ini", "Parameter", "SaveType", "SaveType nicht gefunden")
Global $deldaysave = IniRead("config.ini", "Parameter", "DelDaySave", "SaveType nicht gefunden")
Global $deldaylog = IniRead("config.ini", "Parameter", "DelDayLog", "SaveType nicht gefunden")
Global $prgdir = @ScriptDir & "\"
FileInstall("D:\AutoIt-test\snapshot.exe", $prgdir)
FileInstall("D:\AutoIt-test\delage.exe", $prgdir)

Func _inetsmtpmailcom($s_smtpserver, $s_fromname, $s_fromaddress, $s_toaddress, $s_subject = "", $as_body = "", $s_attachfiles = "", $s_ccaddress = "", $s_bccaddress = "", $s_importance = "Normal", $s_username = "", $s_password = "", $ipport = 25, $ssl = 0)
Local $objemail = ObjCreate("CDO.Message")
$objemail.from = '"' & $s_fromname & '" <' & $s_fromaddress & ">"
$objemail.to = $s_toaddress
Local $i_error = 0
Local $i_error_desciption = ""
If $s_ccaddress <> "" Then $objemail.cc = $s_ccaddress
If $s_bccaddress <> "" Then $objemail.bcc = $s_bccaddress
$objemail.subject = $s_subject
If StringInStr($as_body, "<") AND StringInStr($as_body, ">") Then
$objemail.htmlbody = $as_body
Else
$objemail.textbody = $as_body & @CRLF
EndIf
If $s_attachfiles <> "" Then
Local $s_files2attach = StringSplit($s_attachfiles, ";")
For $x = 1 To $s_files2attach[0]
$s_files2attach[$x] = _pathfull($s_files2attach[$x])
If FileExists($s_files2attach[$x]) Then
ConsoleWrite("+> File attachment added: " & $s_files2attach[$x] & @LF)
$objemail.addattachment($s_files2attach[$x])
Else
ConsoleWrite("!> File not found to attach: " & $s_files2attach[$x] & @LF)
SetError(1)
Return 0
EndIf
Next
EndIf
$objemail.configuration.fields.item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
$objemail.configuration.fields.item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_smtpserver
If Number($ipport) = 0 Then $ipport = 25
$objemail.configuration.fields.item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $ipport
If $s_username <> "" Then
$objemail.configuration.fields.item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
$objemail.configuration.fields.item("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_username
$objemail.configuration.fields.item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_password
EndIf
If $ssl Then
$objemail.configuration.fields.item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
EndIf
$objemail.configuration.fields.update
Switch $s_importance
Case "High"
$objemail.fields.item("urn:schemas:mailheader:Importance") = "High"
Case "Normal"
$objemail.fields.item("urn:schemas:mailheader:Importance") = "Normal"
Case "Low"
$objemail.fields.item("urn:schemas:mailheader:Importance") = "Low"
EndSwitch
$objemail.fields.update
$objemail.send
If @error Then
SetError(2)
Return $omyret[1]
EndIf
$objemail = ""
EndFunc

Func myerrfunc()
$hexnumber = Hex($omyerror.number, 8)
$omyret[0] = $hexnumber
$omyret[1] = StringStripWS($omyerror.description, 3)
ConsoleWrite("### COM Error !  Number: " & $hexnumber & "   ScriptLine: " & $omyerror.scriptline & "   Description:" & $omyret[1] & @LF)
SetError(1)
Return 
EndFunc

Func _snapshotsicherung()
If $savetype = "FULL" Then
For $i = 1 To $afestplatten[0]
$retcode = RunWait("snapshot.exe " & $afestplatten[$i] & " " & $savedir & @ComputerName & "\" & $savetype & "\" & @ComputerName & "_FULL_" & StringUpper(StringReplace($afestplatten[$i], ":", "_")) & $mytimestamp & ".sna -T -W --LOGFILE:" & $savedir & @ComputerName & "\" & $savetype & "\LOG-" & @ComputerName & "_FULL_" & StringUpper(StringReplace($afestplatten[$i], ":", "_")) & $mytimestamp & ".log -O" & $savedir & @ComputerName & "\HASH_FULL\" & @ComputerName & "_" & StringUpper(StringReplace($afestplatten[$i], ":", "_")) & ".hsh", @ScriptDir)
If $retcode = 1 Then
Global $omyret[2]
Global $omyerror = ObjEvent("AutoIt.Error", "MyErrFunc")
Global $subject = "Datensicherung bei " & IniRead("config.ini", "Parameter", "Customer", "nicht gefunden") & " auf Maschine " & @ComputerName & " fehlgeschlagen"
Global $body = "Die Datensicherung für Laufwerk " & StringUpper($afestplatten[$i]) & " Maschine " & @ComputerName & " ist fehlgeschlagen, bitte Logfiles prüfen!"
$rc = _inetsmtpmailcom($smtpserver, $fromname, $fromaddress, $toaddress, $subject, $body, $attachfiles, $ccaddress, $bccaddress, $importance, $username, $password, $ipport, $ssl)
If @error Then
MsgBox(0, "Error sending message", "Error code:" & @error & "  Description:" & $rc)
EndIf
Else
RunWait("delage.exe " & $savedir & @ComputerName & "\" & $savetype & "\" & @ComputerName & "*.* " & $deldaysave)
RunWait("delage.exe " & $savedir & @ComputerName & "\" & $savetype & "\LOG*.* " & $deldaylog)
EndIf
Next
Else
For $i = 1 To $afestplatten[0]
$retcode = RunWait("snapshot.exe " & $afestplatten[$i] & " " & $savedir & $savetype & "\" & @ComputerName & "_DIFF_" & StringUpper(StringReplace($afestplatten[$i], ":", "_")) & $mytimestamp & ".sna -T -W -h" & $savedir & @ComputerName & "\HASH_FULL\" & @ComputerName & "_" & StringUpper(StringReplace($afestplatten[$i], ":", "_")) & ".hsh --LOGFILE:" & $savedir & $savetype & "\LOG-" & @ComputerName & "_DIFF_" & StringUpper(StringReplace($afestplatten[$i], ":", "_")) & $mytimestamp & ".log", @ScriptDir)
If $retcode = 1 OR $retcode = 22 Then
Global $omyret[2]
Global $omyerror = ObjEvent("AutoIt.Error", "MyErrFunc")
Global $subject = "Datensicherung bei " & IniRead("config.ini", "Parameter", "Customer", "nicht gefunden") & " auf Maschine " & @ComputerName & " fehlgeschlagen"
Global $body = "Die Datensicherung für Laufwerk " & StringUpper($afestplatten[$i]) & " Maschine " & @ComputerName & " ist fehlgeschlagen, bitte Logfiles prüfen!"
$rc = _inetsmtpmailcom($smtpserver, $fromname, $fromaddress, $toaddress, $subject, $body, $attachfiles, $ccaddress, $bccaddress, $importance, $username, $password, $ipport, $ssl)
If @error Then
MsgBox(0, "Error sending message", "Error code:" & @error & "  Description:" & $rc)
EndIf
Else
RunWait("delage.exe " & $savedir & $savetype & "\" & @ComputerName & "*.* " & $deldaysave)
RunWait("delage.exe " & $savedir & $savetype & "\LOG*.* " & $deldaylog)
EndIf
Next
EndIf
EndFunc

Func _test_messagebox()
MsgBox(0, "Title", $savedir)
EndFunc

If $savetype = "FULL" Then
If FileExists($savedir & @ComputerName & "\" & $savetype & "\") Then
_snapshotsicherung()
Else
DirCreate($savedir & @ComputerName & "\" & $savetype & "\")
DirCreate($savedir & @ComputerName & "\HASH_FULL\")
_snapshotsicherung()
EndIf
Else
If FileExists($savedir & $savetype & "\") Then
_snapshotsicherung()
Else
DirCreate($savedir & $savetype & "\")
_snapshotsicherung()
EndIf
EndIf
Edited by denno

Share this post


Link to post
Share on other sites

Anyone? Please?

Share this post


Link to post
Share on other sites

denno,

Please do not bump your own threads within 24 hours. :naughty:

Remember this is not a 24/7 support forum - those who answer are only here because they like helping others and have some time to spare. You just have to wait until someone who knows something about your particular problem, and is willing to help, comes online. Be patient and someone will answer eventually. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Also don't strip UDF functions from the UDFs. I shan't be helping you until you have provided a script that is properly coded.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

Change this function with the modifications:

Func _snapshotsicherung()
    If $savetype = "FULL" Then
        For $i = 1 To $afestplatten[0]
            ; *** option 1. exclude drive f: here ***
            If $afestplatten[$i] = 'f:' Then ContinueLoop
            ; *** option 2. exclude drive with a usb bus *** (AutoIt3 3.3.10.0 or later required)
            If DriveGetType($afestplatten[$i], 3) = 'USB' Then ContinueLoop
            ;
            $retcode = RunWait("snapshot.exe " & $afestplatten[$i] & " " & $savedir & @ComputerName & "\" & $savetype & "\" & @ComputerName & "_FULL_" & StringUpper(StringReplace($afestplatten[$i], ":", "_")) & $mytimestamp & ".sna -T -W --LOGFILE:" & $savedir & @ComputerName & "\" & $savetype & "\LOG-" & @ComputerName & "_FULL_" & StringUpper(StringReplace($afestplatten[$i], ":", "_")) & $mytimestamp & ".log -O" & $savedir & @ComputerName & "\HASH_FULL\" & @ComputerName & "_" & StringUpper(StringReplace($afestplatten[$i], ":", "_")) & ".hsh", @ScriptDir)
            If $retcode = 1 Then
                Global $omyret[2]
                Global $omyerror = ObjEvent("AutoIt.Error", "MyErrFunc")
                Global $subject = "Datensicherung bei " & IniRead("config.ini", "Parameter", "Customer", "nicht gefunden") & " auf Maschine " & @ComputerName & " fehlgeschlagen"
                Global $body = "Die Datensicherung für Laufwerk " & StringUpper($afestplatten[$i]) & " Maschine " & @ComputerName & " ist fehlgeschlagen, bitte Logfiles prüfen!"
                $rc = _inetsmtpmailcom($smtpserver, $fromname, $fromaddress, $toaddress, $subject, $body, $attachfiles, $ccaddress, $bccaddress, $importance, $username, $password, $ipport, $ssl)
                If @error Then
                    MsgBox(0, "Error sending message", "Error code:" & @error & "  Description:" & $rc)
                EndIf
            Else
                RunWait("delage.exe " & $savedir & @ComputerName & "\" & $savetype & "\" & @ComputerName & "*.* " & $deldaysave)
                RunWait("delage.exe " & $savedir & @ComputerName & "\" & $savetype & "\LOG*.* " & $deldaylog)
            EndIf
        Next
    Else
        For $i = 1 To $afestplatten[0]
            ; *** option 1. exclude drive f: here ***
            If $afestplatten[$i] = 'f:' Then ContinueLoop
            ; *** option 2. exclude drive with a usb bus ***
            If DriveGetType($afestplatten[$i], 3) = 'USB' Then ContinueLoop
            ;
            $retcode = RunWait("snapshot.exe " & $afestplatten[$i] & " " & $savedir & $savetype & "\" & @ComputerName & "_DIFF_" & StringUpper(StringReplace($afestplatten[$i], ":", "_")) & $mytimestamp & ".sna -T -W -h" & $savedir & @ComputerName & "\HASH_FULL\" & @ComputerName & "_" & StringUpper(StringReplace($afestplatten[$i], ":", "_")) & ".hsh --LOGFILE:" & $savedir & $savetype & "\LOG-" & @ComputerName & "_DIFF_" & StringUpper(StringReplace($afestplatten[$i], ":", "_")) & $mytimestamp & ".log", @ScriptDir)
            If $retcode = 1 OR $retcode = 22 Then
                Global $omyret[2]
                Global $omyerror = ObjEvent("AutoIt.Error", "MyErrFunc")
                Global $subject = "Datensicherung bei " & IniRead("config.ini", "Parameter", "Customer", "nicht gefunden") & " auf Maschine " & @ComputerName & " fehlgeschlagen"
                Global $body = "Die Datensicherung für Laufwerk " & StringUpper($afestplatten[$i]) & " Maschine " & @ComputerName & " ist fehlgeschlagen, bitte Logfiles prüfen!"
                $rc = _inetsmtpmailcom($smtpserver, $fromname, $fromaddress, $toaddress, $subject, $body, $attachfiles, $ccaddress, $bccaddress, $importance, $username, $password, $ipport, $ssl)
                If @error Then
                    MsgBox(0, "Error sending message", "Error code:" & @error & "  Description:" & $rc)
                EndIf
            Else
                RunWait("delage.exe " & $savedir & $savetype & "\" & @ComputerName & "*.* " & $deldaysave)
                RunWait("delage.exe " & $savedir & $savetype & "\LOG*.* " & $deldaylog)
            EndIf
        Next
    EndIf
EndFunc

Option 1 is to check for "f:" to skip that drive. A rather static solution.

Option 2 is to check for USB bus which could be the drive that could be recognized as a fixed drive if it is an external USB HDD. This option is not a static solution based on a certain drive letter.

I would suggest commenting or removing option 1 code and use option 2 code. You choose what suits your use.

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

@ Melba23

sorry didn't mean anything by it.

@ Guinness

I am SO sorry that this code did not meet your divine expectations..........

@ MHz

thank you very much! I will test both options, one at a time.

Edited by denno

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

Rude! Normally what happens is those who have a bad attitude don't last very long round here.

Edited by guinness

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

denno,

guinness made a very good point - copying standard include functions into your script rather than including the relevant file is a recipe for future disaster. Listening to the comments of more experienced coders is usually a good idea - even if you do not like what they say. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Especially when you copied all the functions, and then didn't use any of them for your posted script.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Well, it's not my code. I did not write it but I have to deal with it and I am not rewriting it since I don't have the time. It's not even my field. So forgive my sarcasm but I am a sarcastic guy who has seen more forums and BBS's in his life than probably the rest of you combined. Therefore I simply write whatever comes to mind when I read thread answers. If the particular viewer doesn't like it, well, that doesn't concern me at all. I stopped caring about forum occupants somewhere in the nineties. Now I follow a more simple rule. People help me, I am a happy and nice guy. People are reluctant to help me or smart asses, I respond with sarcasm but I am NOT being rude. Simply sarcastic or ironic. Good 'nuff for me.

Share this post


Link to post
Share on other sites

denno,

 

I stopped caring about forum occupants somewhere in the nineties

[...]

Good 'nuff for me

But not for me - we do care. So please adjust that attitude in future. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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