gerardsweeney Posted March 19, 2012 Share Posted March 19, 2012 Hello, all.. This is probably of limited use, but it saved me a great deal of hair-pulling. Easy Recovery 6 by OnTrack has a slightly annoying feature when recovering files. If it attempts to recover multiple versions of a file to a location, it'll prompt saying that the file already exists - do you want to skip, rename etc. Each time. With no apparent way of remembering your option. I cobbled together the following laughably poor script so that it automatically adds _renameX to the file. If the file ends in an a ".abc" type extension, it puts the _renameX before the . so as to not break the filetype. I have no doubt anyone with even a modicum of AU3 experience will wet themselves at my coding, so please feel free to improve on it. It served my requirements expandcollapse popupDim $RenameNum $RenameNum = 0 $App = "EasyRecovery.exe" While ProcessExists($App) ToolTip("Number of renames = " & $RenameNum) WaitForRename() Sleep(100) Wend msgbox(0, "", "All done - renames = " & $RenameNum) EXIT ; ================================================== Func WaitForRename() $Title = "File Exists" ToolTip("Waiting for rename Window to exist") WinWait($Title, "", 10) ToolTip("Waiting for rename window to be active") WinActivate($Title) $WinWA = WinWaitActive($Title, "", 10) If $WinWA = 0 then Return EndIf Send("{End}") ; So we're at the end of the rename text box ; Get the filename $Text = WinGetText($Title) $TextSplit = StringSplit($Text, @LF, 1) If $TextSplit[0] = 12 then $OldFile = $TextSplit[1] $OldFileLen = StringLen($OldFile) $OldFileExt = StringRight($OldFile, 4) ; If it's an extension, jump back before the extension If StringMid($OldFileExt, 1, 1) = "." then Send("{LEFT}{LEFT}{LEFT}{LEFT}") EndIf EndIf $RenameNum = $RenameNum + 1 If $RenameNum < 10 then $RenamePadding = "0" Else $RenamePadding = "" EndIf Send("_Rename" & $RenamePadding & $RenameNum) ControlClick($Title, "", 1018, "left", 1) EndFunc ; ================================================== JScript 1 Link to comment Share on other sites More sharing options...
JScript Posted March 19, 2012 Share Posted March 19, 2012 Hello, welcome to the forum! I also use this program and liked its automation, thank you! Regards, João Carlos. http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now