├── ChangeLog.txt ├── MRS.PNG ├── MRS.ahk ├── MRS.exe ├── MRS.ini ├── README.md ├── _mkzip.ahk ├── docs ├── MRS.html ├── Plugins.html └── res │ ├── MRS.PNG │ ├── scheme.gif │ └── style.css ├── inc ├── Errors ├── Events.ahk ├── Gui.ahk ├── IFun.ahk ├── Shell.ahk ├── TCwdx.ahk ├── Thumbs.db └── m │ ├── Accordion.ahk │ ├── Attach.ahk │ ├── COM.ahk │ ├── ComboX.ahk │ ├── DDE.ahk │ ├── ErrMsg.ahk │ ├── HLink.ahk │ ├── Ini.ahk │ ├── Plugins.ahk │ ├── ShowMenu.ahk │ └── Win.ahk ├── plugins ├── AnyTag │ ├── ReadMe.txt │ ├── anytag.any │ ├── anytag.wdx │ └── pluginst.inf ├── DirCnt.ahk ├── FileInfo.ahk ├── FileInfo.txt ├── FileX │ ├── FileX.lng │ ├── FileX.wdx │ ├── ReadMe.txt │ └── pluginst.inf ├── Hash.ahk ├── Images │ ├── History.txt │ ├── History_Rus.txt │ ├── Images.lng │ ├── Images.wdx │ ├── PlugInst.inf │ ├── Readme.txt │ └── Readme_Rus.txt ├── ShellDetails │ ├── ShellDetails.ini │ ├── ShellDetails.wdx │ ├── liesmich.htm │ ├── pluginst.inf │ ├── readme.htm │ └── styles │ │ └── layout.css ├── Sub.ahk ├── Ver.ahk ├── WdHash │ ├── ReadMe.en.txt │ ├── ReadMe.txt │ ├── hashes │ │ ├── CRC32.dll │ │ ├── MD5.dll │ │ └── SHA1.dll │ ├── pluginst.inf │ └── wdHash.wdx ├── _Hash │ ├── File.ahk │ └── Hash.ahk ├── filesys │ ├── cputil.wdx │ ├── cputil1.tbl │ └── cputil2.tbl └── myplugin ├── res ├── icon.ico └── menus.ini └── temp ├── MRS Schematic.bmp ├── MRS Schematic.docx ├── MRS Schematic.gif ├── MRS-Index.txt ├── MRS-WritePlugins.txt ├── TC Content Plugins SDK ├── contentplugin.HLP └── winhlp32.exe └── Textile 2 Html ├── classTextile.php ├── style.css └── textilePrev.php /ChangeLog.txt: -------------------------------------------------------------------------------- 1 | v1.5 2 | ---------------- 3 | + You don't have to add AutoHotKey to DEP list any more (Lexikos). 4 | + AHK_L updated to 1.0.92.02 - January 19, 2011. This allows MRS script to keep its original name (MRS.ahk instead AutoHotKey.ini). 5 | You can delete MRS.exe if you already have AHK_L asociated with ahk files. 6 | + Plugin updates: Shell Details 1.22 7 | 8 | v1.5c 19/02/2010 9 | ---------------- 10 | ! Fixed issue with content plugins that have - in the name (i.e. jpg-comment.wdx) 11 | + Optimization: Improved speed of editor preview a lot. 12 | 13 | v1.5b 09/02/2010 14 | ---------------- 15 | + TCWdx module improved: 16 | + Unicode support for TC content plugins - module will first try W export, then A export, then it will return error. 17 | + It cashes function adresses for faster subsequent calls. HTML manual for external use. 18 | * Removed dependency on folder names to be equal to content plugins names. When TC ini file is not present, module now searches recursively for all wdx files in the \plugins folder. 19 | * Range will no longer flicker in "select range" inputbox. Inputbox is wider. 20 | + Added TC content plugin cputil.wdx which allows to find file names with characters from a different code page, and rename them using conversion table. 21 | + ShellDetails.wdx updated to Unicode version. 22 | 23 | v1.5a 08/02/2010 24 | ---------------- 25 | + Unicode support in GUI and AHK Plugins. Total Commander plugins are still not unicode (because they still mostly don't support it). 26 | + Resizable window (window placement is saved in ini) 27 | + Rename operation will create directory if it doesn't exist (__meta__) 28 | + If you hold CTRL while using drag&drop or shell extension to add single folder, MRS will add its files instead. 29 | * Preset Save button and DropDown replaced with single editable ComboBox. 30 | To save preset write its desired name and press ENTER. 31 | To load preset select it from the list or type its name. 32 | 33 | v1.1 16/12/2009 34 | ---------------- 35 | * ComboX, HLink modules updated. This will fix ComboX issue where plugin buttons were drawn over it. 36 | + CTRL + A hotkey added to select all files in the list view. 37 | + Little gui improvements. 38 | ! Bugfix: Script freezing, mostly on Win7 & Vista. 39 | + New AHK plugin Sub: Extracts substring from file name from str1 up to the str2. 40 | 41 | v1.0 06/02/2009 42 | ----------------- 43 | + Initial release -------------------------------------------------------------------------------- /MRS.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/MRS.PNG -------------------------------------------------------------------------------- /MRS.ahk: -------------------------------------------------------------------------------- 1 | #include %A_ScriptDir% 2 | #NoTrayIcon 3 | #SingleInstance, force 4 | #NoEnv 5 | #MaxThreads, 255 6 | SetBatchLines, -1 7 | SetWorkingDir, %A_ScriptDir% 8 | FileEncoding, UTF-8 9 | 10 | ;-- GLOBALS -------------------------- 11 | gTitle := "Multi-Rename Script" 12 | gVersion := "1.5" 13 | gGuiHeight := 500, gGuiWidth := 800 14 | gResultList := "res\ResultList.txt" 15 | gPreviewFile:= "res\Preview.txt" 16 | gConfig := "MRS.ini" 17 | gShellName := "Add to Multi-Rename Lis&t" 18 | gShellGuid := "{0F60CC03-F4D6-464C-8D59-FD919FF14E26}" 19 | gDocsFolder := "docs" 20 | ;------------------------------------ 21 | 22 | InitApp(), GuiCreate(), GuiInit(), GuiAttach(), Shell_Init("OnShell") 23 | 24 | if (gCmdPreset != "") 25 | goto DoCmdRun 26 | 27 | Gui, show, h%gGuiHeight% w%gGuiWidth%, %gTitle% 28 | Win_Recall("< -Min", "", gConfig) 29 | 30 | if (cfg_LastEdit != "") && !cfg_NoLastEdit 31 | Preset_Set(cfg_LastEdit, false) 32 | else Preset_Set("[N]>[E]", false) 33 | return 34 | 35 | 36 | ;------------------------------------------------------------------------------------- 37 | ;If 2 arguments are specified on cmd line - file list & preset - don't show GUI initialy, 38 | ;just rename files showing progress bar and exit imediately if no errors. If errors ocure 39 | ;show GUI and continue as if the user started MRS without cmd line 40 | DoCmdRun: 41 | Preset_Set( gCmdPreset, false ) 42 | OnButton( "btnStart" ) 43 | 44 | if ( LV_GetCount() = 0 ) 45 | ExitApp 46 | 47 | gCmdPreset = 48 | Gui, show, h%gGuiHeight% w%gGuiWidth%, %gTitle% 49 | return 50 | 51 | ;------------------------------------------------------------------------------------- 52 | ; Initialise plugins, get command line, load configuration, set gui icon 53 | InitApp() { 54 | global 55 | 56 | #include inc\Errors 57 | GuiSetIcon() ;set title icon 58 | Plugins_Init() ;load plugins 59 | 60 | Ini_LoadSection( gConfig ) 61 | Ini_LoadKeys( "", inis_Config, "", "cfg"), inis_Config := "" 62 | 63 | if (cfg_tcIni != "") 64 | cfg_tcIni := FileExist(cfg_tcIni) ? ExpandEnvVar(cfg_tcIni) : cfg_tcIni 65 | 66 | GetCmdLine() 67 | 68 | gtcPlugins := TCWdx_GetPlugins(cfg_tcIni), gahkPlugins := Plugins_Get() 69 | if (gtcPlugins = "ERR") 70 | gtcPlugins := TCWdx_GetPluginsFromDir("plugins") 71 | gPlugMenu := "[Plugins]`n" Ini_LoadKeys("", gtcPlugins, "keys") "`n-`n" gahkPlugins 72 | 73 | gProcId := 0 ;id of the current proc 74 | } 75 | 76 | ;------------------------------------------------------------------------------------- 77 | ; Function: GetCmdLine 78 | ; Get command line 79 | GetCmdLine() { 80 | local file 81 | 82 | if (%0% < 1) 83 | return 84 | 85 | file = %1% 86 | gCmdPreset = %2% 87 | 88 | if (file = "Plugin_Reload") 89 | return 90 | if (gCmdPreset = "Plugin_Reload") ;Plugin module uses last parameter for itself 91 | gCmdPreset := "" 92 | 93 | if !FileExist( file ) { 94 | MsgBox, 16, %gTitle%, File doesn't exist:`n`n%file% 95 | } else, FileRead, gFiles, %file% 96 | 97 | if (*&gCmdPreset = 62){ ;">" 98 | gCmdPreset := Preset_GetDef( SubStr(gCmdPreset, 2) ) 99 | if (gCmdPreset = "") 100 | MsgBox 16, %gTitle%, Preset doesn't exist:`n`n%2% 101 | } 102 | } 103 | 104 | ;------------------------------------------------------------------------------------- 105 | ; Function: Proc 106 | ; Envoke all processors on a file name. 107 | ; 108 | ; Parameters: 109 | ; fn - file name 110 | ; 111 | ; Returns: 112 | ; New file name 113 | ; 114 | ; Remarks: 115 | ; Processing diagram is as follows: 116 | ; 117 | ;> Fn_Mask 118 | ;> FN --> / \ --> SR --> Case --> FN' 119 | ;> \ / 120 | ;> Ext_Mask 121 | Proc( fn ) { 122 | local n, e 123 | n := ProcMask(fn, "FN"), e := ProcMask(fn, "Ext") 124 | fn := (e !="") ? n "." e : n 125 | return ProcCase( ProcSR( fn ), ddCase ) 126 | } 127 | 128 | ;------------------------------------------------------------------------------------- 129 | ; Function: ProcMask 130 | ; Process file name mask 131 | ; 132 | ; Parameters: 133 | ; fn - file name 134 | ; a - array storing parsed mask, as there are 2 unrelated masks ("FN" or "Ext") 135 | ; 136 | ; Returns: 137 | ; Processed file name 138 | ; 139 | ProcMask( fpath, a ) { 140 | local fun, res, fe, dir, fn, z := "a" a "_0" 141 | local cp, U=5, L=4, F=2, _n=0, case := "_n" 142 | 143 | SplitPath, fpath,,dir, fe, fn 144 | loop, % %z% 145 | { 146 | fun := a%a%_%A_Index% 147 | if fun in U,L,F,_n 148 | { 149 | GoSub %fun% 150 | continue 151 | } 152 | 153 | #1:= a%a%_%A_Index%_1, #2:= a%a%_%A_Index%_2, #3:= a%a%_%A_Index%_3 154 | #fp := fpath, #fe := fe, #fn := fn, #fd := dir, #Res :="" ;set always as plugin can change them 155 | if IsLabel(fun) 156 | GoSub %fun% 157 | 158 | if (a%a%_%A_Index%_rng1 != "") { 159 | #fn := #Res, #1:= a%a%_%A_Index%_rng1, #2:= a%a%_%A_Index%_rng2, #3:= a%a%_%A_Index%_rng3 160 | goSub N 161 | } 162 | 163 | cp .= #Res 164 | } 165 | goSub %case% 166 | return res 167 | 168 | ;casing switches 169 | U: 170 | L: 171 | F: 172 | _n: 173 | res .= ProcCase(cp, %case%), cp := "" 174 | case := A_ThisLabel 175 | return 176 | } 177 | 178 | ;------------------------------------------------------------------------------------- 179 | ; Function: ProcSR 180 | ; Process search & replace 181 | ; 182 | ; Parameters: 183 | ; fn - file name 184 | ; 185 | ; Returns: 186 | ; Processed file name 187 | ; 188 | ProcSR( fn ) { 189 | local res, s,r 190 | 191 | if (cbRE) 192 | return RegExReplace(fn, aSearch1, aReplace1) 193 | 194 | ;check for | for multi replace 195 | res := fn 196 | loop, %aSearch0% 197 | { 198 | s := aSearch%A_Index%, r :=aReplace%A_Index% 199 | StringReplace, res, res, %s%, %r%, A 200 | } 201 | 202 | return res 203 | } 204 | 205 | ;------------------------------------------------------------------------------------- 206 | ; Function: ProcCase 207 | ; Process case 208 | ; 209 | ; Parameters: 210 | ; fn - file name 211 | ; case - desired case, 2-5 (other numbers will cause fn to be returned unchanged) 212 | ; Returns: 213 | ; Processed file name 214 | ; 215 | ProcCase( fn, case) { 216 | if (case=2) ;first of each letter uppercase F=2 217 | StringUpper, fn, fn, T 218 | else if (case=3) { ;first word uppercase 3 219 | StringLower, fn, fn 220 | c := *&fn 221 | if c between 97 and 122 222 | c -=32 223 | fn := chr(c) SubStr(fn, 2) 224 | } 225 | else if (case=4) ;lowsercase L=4 226 | StringLower, fn, fn 227 | else if (case=5) ;uppercase U=5 228 | StringUpper, fn, fn 229 | 230 | return fn 231 | } 232 | 233 | ;------------------------------------------------------------------------------------- 234 | ; Function: ParseMask 235 | ; Parses file or extension mask into array 236 | ; 237 | ; Parameters: 238 | ; pMask - mask 239 | ; a - array used to hold mask data with 0 element pointing to number of functions in the mask 240 | ; ("FN" or "Ext") 241 | ; Returns: 242 | ; Postive number if error occured while parsing, otherwise 0 (also sets global gParseMak) 243 | ; 244 | ; Remarks: 245 | ; Parsing is done using grammar: 246 | ;> Mask :: Mask_i (i e No) 247 | ;> Mask_i :: Fun_i Mask_i-1 (i e No) 248 | ;> Fun :: [F{params}] | Const 249 | ;> F :: N | E | C | Y | = | .... 250 | ;> Const :: sentence without [ char 251 | ;> params :: C_param | N_param | plug_param 252 | ;> plug_param :: plug_name{.plugField{.fieldUnit}}{:N_param} 253 | ; 254 | ParseMask( pMask, a ) { 255 | local i, r, k, c, token, b, param, cnt, fun, fi, ui, re, z := "a" a "_0", out, out1, out2, out3, rng, rng1, rng2, rng3 256 | %z% := 0 257 | 258 | StringReplace, pMask, pMask, ]], >] ; replace [ ]] with [ >] for easier parsing 259 | loop { 260 | ;extract token 261 | c := SubStr(pMask, 1, 1), b := 0 262 | if ( c="[" AND b := 1) ;b keeps branch that is executed (function=1, constant=0) 263 | if ( i := InStr(pMask, "]")) { ;check for ]] 264 | token := SubStr(pMask, 2, i-2), pMask := SubStr(pMask, i+1) 265 | } else return ERR_OPENMASK ;error1 - syntax error 266 | else if (i := InStr(pMask, "[")) 267 | token := SubStr(pMask, 1, i-1), pMask := SubStr(pMask, i) 268 | else token := pMask, pMask := "" 269 | 270 | ;fix [[] []] 271 | if b and ((token = "[") or (token = ">")) { 272 | b := 0 273 | if (token=">") 274 | token := "]" 275 | } 276 | 277 | ;Parse token (out1,2,3 hold #1 #2 #3) 278 | cnt := %z% + 1, a%a%_%cnt%_rng1 := "" ;plugins may have range. 279 | if !b ;constant function 280 | a%a%_%cnt% := "_Const", a%a%_%cnt%_1 := token 281 | else { 282 | c := chr(*&token) 283 | if (c="") { ; [] - empty mask 284 | a%a%_%cnt% := "_Const" 285 | continue 286 | } 287 | 288 | a%a%_%cnt% := c, param := 1, r := 0 289 | r := (c = "N") ? RegExMatch(token, "^N\s*(?:(-?\d+)(?:(-|,)?(-?\d+)?)?)?$", out) : r 290 | r := !r and (c = "E") ? RegExMatch(token, "^E\s*(?:(-?\d+)(?:(-|,)?(-?\d+)?)?)?$", out) : r 291 | r := !r and (c = "C") ? RegExMatch(token, "^C\s*(\d*)(?:\+(\d*))*(?:\:(\d+))*", out) : r 292 | 293 | ;check plugin 294 | if (!r and c="=") { 295 | r := 1 296 | 297 | ;check for range 298 | if k := InStr(token, ":") { 299 | if RegExMatch(SubStr(token, k+1), "^(?:(-?\d+)(?:(-|,)?(-?\d+)?)?)?$", rng) 300 | loop, 3 301 | a%a%_%cnt%_rng%A_Index% := rng%A_Index% 302 | else return ERR_PLUGRANGE 303 | token := SubStr(token, 1, k-1) 304 | } 305 | 306 | k := InStr(token, ".") 307 | IfEqual, k, 0, SetEnv, k, 1000 ;if no dot, just make k large enough to go over end of the token 308 | 309 | fun := SubStr(token, 2, k-2), out3 := SubStr(token, k+1) ;out3 keeps everything after first dot 310 | 311 | ;is this AHK plugin ? 312 | if IsLabel(fun) 313 | { 314 | k := InStr(out3, ".") ;if there is unit, there is another dot 315 | IfEqual, k, 0, SetEnv, k, 100 316 | out1 := SubStr(out3, 1, k-1), out2 := SubStr(out3, k+1) ;out1=field, out2=unit 317 | if (out3 != "") and IsLabel(fun "_GetFields") ;if out3 is not empty check the fields 318 | { 319 | GoSub, %fun%_GetFields ;#Res contains fields here 320 | if (*&#Res != 42) ; chr(42) = "*" 321 | { ; check if fields are valid 322 | re = `aim)^\Q%out1%\E([|]|\s*$) 323 | if (out2 != "") 324 | re = `aim)^\Q%out1%\E.*?[|]\Q%out2%\E([|]|\s*$) 325 | 326 | if !RegExMatch(#Res, re) 327 | return ERR_PLUGFIELD 328 | } 329 | } 330 | a%a%_%cnt% := fun 331 | } 332 | else { ;check for TC plugin 333 | k := Ini_GetVal(gtcPlugins, fun) 334 | IfEqual, k, , return ERR_PLUG 335 | 336 | if !TCWdx_LoadPlugin(k) ;loadlibrary returns the same handle if it is previously loaded 337 | return ERR_PLUGLOAD 338 | 339 | TCWdx_GetIndices(k, out3, fi, ui) 340 | 341 | if (fi = "" or ui = "") 342 | return ERR_PLUGFIELD 343 | 344 | a%a%_%cnt% := "_TC", out1 := k, out2:= fi, out3 := ui 345 | } 346 | } 347 | ;check parameterless functions 348 | if !r and InStr("P,G,Y,M,D,U,L,F", c, true) and token=c 349 | a%a%_%cnt% := c, param := 0, r:=1 350 | 351 | if !r and InStr("t,h,m,s,n,y", c, true) and token=c ;those will have _ as sub prefix (little letters) 352 | a%a%_%cnt% := "_" c, param := 0, r:=1 353 | 354 | ;check for full path fun [d1-d2] 355 | if !r and (r := RegExMatch(token, "^\s*(?:(-?\d+)(?:(-|,)?(-?\d+)?)?)?$", out)) 356 | if (out1 out2 out3 = "") ; [ ] 357 | a%a%_%cnt% := "_Const", param := 0 358 | else a%a%_%cnt% := "_FN" 359 | 360 | ;set args - out1, out2, out3 361 | if r and param 362 | loop, 3 363 | a%a%_%cnt%_%A_Index% := out%A_Index% 364 | 365 | ;no match 366 | ifEqual r, 0, return ERR_UNKNOWN ;Unknown token 367 | } 368 | %z% := cnt 369 | IfEqual, pMask, , break 370 | } 371 | return 0 372 | } 373 | 374 | ;------------------------------------------------------------------------------------- 375 | ; Function: ParseSR 376 | ; Parses search & replace fields 377 | ; 378 | ; Remarks: 379 | ; Parser for multiple renames with ("|" notation). Stores parsed data in aSearch & aReplace arrays 380 | ; 381 | ParseSR() { 382 | local dif, i 383 | 384 | if (cbRE) { 385 | aSearch1 := eSearch, aReplace1 := eReplace 386 | return 387 | } 388 | 389 | 390 | aSearch1 := aReplace1 := "" 391 | 392 | StringSplit, aSearch, eSearch, | 393 | StringSplit, aReplace, eReplace, | 394 | 395 | dif := aSearch0 - aReplace0, i := aReplace0 396 | if dif > 0 397 | Loop, %dif% 398 | i++, aReplace%i% := (aReplace0=0) ? "" : aReplace%aReplace0% 399 | } 400 | 401 | ;------------------------------------------------------------------------------------- 402 | ; Function: Preview 403 | ; Preview function for files in the list. 404 | ; 405 | ; Remarks: 406 | ; Only files currently visible in the list view will be previewed. Preview 407 | ; works according to ProcID which is unique number for current Mask. 408 | ; Files in the list for which preview is already done, will not be previewd 409 | ; again until ProcId changes. 410 | Preview(){ 411 | local topIndex, page, fpath, cnt, procid, pid, fid 412 | static LVM_GETTOPINDEX=0x1027, LVM_GETCOUNTPERPAGE=0x1028, funcID=0 413 | 414 | IfEqual, gFiles, , return 415 | 416 | fid := ++funcID, pid := gProcId 417 | Gui, ListView, lvFiles 418 | 419 | SendMessage, LVM_GETTOPINDEX, 0, 0, ,ahk_id %hlvFiles% 420 | topIndex := ErrorLevel 421 | 422 | SendMessage, LVM_GETCOUNTPERPAGE, 0, 0, , ahk_id %hlvFiles% 423 | gLvPage := ErrorLevel 424 | 425 | cnt := LV_GetCount() 426 | loop, % gLvPage+1 427 | { 428 | sleep -1 ;read windows quiue 429 | if (pid != gProcId) or (fid != funcID) or gWorking ;if (proc changed while in preview) or (preview is launched again while it is still runing) or (user started some operation) 430 | break 431 | 432 | #no := A_Index + topIndex 433 | if (#no > cnt) 434 | break 435 | 436 | LV_GetText(procid, #no, 4) 437 | if (procid != pid) ;if already calculated, don't do it again (remember procID which is unique number of each change) 438 | #flag := "prev", LV_GetText(fpath, #no, 3), LV_Modify(#no, "col2", (!gParseError) ? Proc( fpath ) : ""), LV_Modify(#no, "col4", pid) 439 | 440 | } 441 | } 442 | 443 | ; This subroutine is called by SetTimer on some places where there is a need for preview spam protection 444 | DelayedPreview: 445 | Preview() 446 | return 447 | 448 | ;------------------------------------------------------------------------------------- 449 | ; Function: SetCtrlHandler 450 | ; Enable/Desable OnProcChange handler for array of gui controls 451 | ; 452 | ; Parameter: 453 | ; state - true or false 454 | ; 455 | SetCtrlHandler( state ) { 456 | param := state ? "+gOnProcChange" : "-g" 457 | ctrls := "eMask,eExt,eSearch,eReplace,cbRE,ddCase" 458 | 459 | Loop, parse,ctrls,`, 460 | GuiControl, %param%, %A_LoopField% 461 | } 462 | 463 | ;------------------------------------------------------------------------------------- 464 | ;Function: Preset_Set 465 | ; Load preset from ini (by its name), or from string 466 | ; 467 | ;Example: 468 | ; Preset_Set("My Preset") ;load preset "My Preset" 469 | ; Preset_Set("[N]>[E].bak", false) ;use first param as preset definition 470 | ; 471 | Preset_Set( preset, flag=true ) { 472 | p := flag ? Preset_GetDef(preset) : preset 473 | StringSplit, x, p, > 474 | 475 | SetCtrlHandler( false ) ;desable handler so OnProcChange isn't called 6 times 476 | GuiControl, , eMask, %x1% 477 | GuiControl, , eExt, %x2% 478 | GuiControl, , eSearch, %x3% 479 | GuiControl, , eReplace, %x4% 480 | GuiControl, , cbRe, %x5% 481 | GuiControl, Choose, ddCase, %x6% 482 | SetCtrlHandler( true ) 483 | 484 | gosub OnProcChange 485 | } 486 | 487 | 488 | ;------------------------------------------------------------------------------------- 489 | ; Function: Preset_Exists 490 | ; Check if preset exists 491 | Preset_Exists( name ) { 492 | local s 493 | 494 | s := Ini_LoadSection( gConfig, "Presets") 495 | return RegExMatch(s, "`amiS)^name[0-9]+=\Q" name "\E$") 496 | } 497 | 498 | ;------------------------------------------------------------------------------------- 499 | ; Function: Preset_Load 500 | ; Load presets from ini file and add them to combo box list 501 | Preset_Load() { 502 | local p 503 | p := Ini_LoadKeys("", inis_Presets, "vals", "", "name"), inis_Presets := "" 504 | StringReplace, p, p,`n,|,A 505 | GuiControl, , ddPresets, %p% 506 | } 507 | 508 | ;------------------------------------------------------------------------------------- 509 | ; Function: Preset_Save 510 | ; Save preset in Ini and add it to combobox 511 | ; 512 | ; Remarks: 513 | ; Preset is saved as single line, with preset elements separated by ">" symbol. 514 | ; This symbol is not used in file renaming as it is illegal in file name. 515 | ; 516 | Preset_Save() { 517 | local name, def, idx, sec 518 | Gui, submit, nohide 519 | 520 | GuiControlGet,name,,ddPresets 521 | name = %name% ;trim 522 | 523 | sec := Ini_LoadSection(gConfig, "Presets") 524 | idx := SubStr(Ini_GetKeyName( sec, name ), 5) 525 | 526 | if (idx) { 527 | MsgBox 36, Save preset, Name already in the preset list.`n`nOverwrite ? 528 | ifMsgBox No 529 | return 530 | Preset_Delete( name ) 531 | } 532 | 533 | GuiControl, , ddPresets, %name%|| 534 | def := eMask ">" eExt ">" eSearch ">" eReplace ">" cbRE ">" ddCase 535 | 536 | ;get next free number 537 | sec := Ini_LoadKeys("", sec, "keys", "", "name") 538 | idx := (sec="") ? 0 : SubStr(sec, InStr("`n" sec, "`nname", false, 0) +4) 539 | idx++ 540 | 541 | IniWrite, %name%, %gConfig%, Presets, name%idx% 542 | IniWrite, %def%, %gConfig%, Presets, def%idx% 543 | 544 | MsgBox Preset saved: `n`n%name% 545 | } 546 | ;------------------------------------------------------------------------------------- 547 | ; Function: Preset_GetDef 548 | ; Get preset definition or id 549 | ; 550 | ; Parameters: 551 | ; name - preset name to search for in ini file 552 | ; idx - if set to true, function will return preset ID instead definition 553 | ; 554 | Preset_GetDef( name, idx=false ) { 555 | global gConfig 556 | 557 | sec := Ini_LoadSection(gConfig, "Presets") 558 | 559 | if !RegExMatch(sec, "`aim)^\s*name(\d+)\s*=\Q" name "\E$", out) 560 | return 561 | return idx ? out1 : Ini_GetVal(sec, "def" out1) 562 | } 563 | 564 | ;------------------------------------------------------------------------------------- 565 | ; Function: Preset_Delete 566 | ; Delete preset by name, or if its not given, use selected item in Presets combo box 567 | ; 568 | Preset_Delete(name="") { 569 | local i, focus, idx 570 | 571 | if (name = "") { 572 | GuiControlGet,name,,ddPresets 573 | GuiControlGet, focus, FOCUSV 574 | if focus != ddPresets 575 | return 576 | } 577 | 578 | ControlGet, i, FindString, %name%, ,ahk_id %hddPresets% 579 | Control, Delete, %i%, , ahk_id %hddPresets% 580 | 581 | idx := Preset_GetDef(name, true) ;get preset idx 582 | IniDelete, %gConfig%, Presets, name%idx% 583 | IniDelete, %gConfig%, Presets, def%idx% 584 | 585 | Send {Space} ;refresh 586 | } 587 | 588 | ;------------------------------------------------------------------------------------- 589 | ; Function: DoLoad 590 | ; Load from gFiles into ListView 591 | DoLoad() { 592 | local fn, path 593 | 594 | Gui, ListView, lvFiles 595 | loop, Parse, gFiles, `n, `r 596 | { 597 | if (A_LoopField = "") ;skip empty lines 598 | continue 599 | else path := A_LoopField 600 | 601 | ;TC puts trailing \ on dirs, remove them 602 | if SubStr(path, 0, 1) = "\" 603 | StringTrimRight, path, path, 1 604 | 605 | SplitPath, path, fn 606 | LV_Add("", fn, "", path, 0) 607 | } 608 | Status() 609 | } 610 | 611 | ;------------------------------------------------------------------------------------- 612 | ; Function: DoReload 613 | ; Loads previously processed files (previous result is saved in ResultList) 614 | DoReload(){ 615 | local fn, fpath, re 616 | Gui, ListView, lvFiles 617 | 618 | re = ([^\\>]+\> )"(.+)$ 619 | 620 | if !FileExist( gResultList ) { 621 | MsgBox, 16, %gTitle%, Result List is not available. 622 | return 623 | } 624 | FileRead, gFiles, %gResultList% 625 | 626 | LV_Delete() 627 | loop, Parse, gFiles, `n, `r 628 | { 629 | if (A_LoopField = "") ;skip empty lines 630 | continue 631 | 632 | fpath := SubStr(RegExReplace( A_LoopField, re, "$2" ), 2, -1) 633 | SplitPath, fpath, fn 634 | LV_Add("", fn, "", fpath) 635 | } 636 | Preview() 637 | } 638 | 639 | ; Function: DoRename 640 | ; Rename files using current processor 641 | DoRename(){ 642 | local newName, oldPath, newPath, dir, cnt, res, delRow := 1, flags := 0, dire,ext,name_no_ext 643 | static adrMoveFileEx 644 | 645 | if !adrMoveFileEx 646 | adrMoveFileEx := DllCall("GetProcAddress", "uint", DllCall("GetModuleHandle", "str", "Kernel32.dll"), "astr", "MoveFileExW") 647 | 648 | if (gParseError) { 649 | MsgBox Mask Error. 650 | return 651 | } 652 | 653 | SetWorking( true ) 654 | 655 | FileDelete, %gResultList% 656 | 657 | Gui, ListView, lvFiles 658 | GuiControl, -Redraw, lvFiles 659 | cnt := LV_GetCount(), res := 1, Progress(true) 660 | loop, %cnt% 661 | { 662 | #flag := "real", #no := A_Index + delRow - 1, LV_GetText(oldPath, delRow, 3), newName := Proc( oldPath ) 663 | SplitPath, oldPath, ,dir 664 | newPath := dir "\" newName 665 | 666 | SplitPath, newPath, ,dir 667 | IfNotExist, %dir% 668 | FileCreateDir, %dir% 669 | 670 | res := DllCall(adrMoveFileEx, "str", oldPath, "str", newpath, "uint", flags) 671 | if !res 672 | LV_Modify(delRow, "col5", ErrMsg() ), delRow++ 673 | else { 674 | LV_Delete(delRow) 675 | FileAppend, "%oldPath%" -> "%newName%"`r`n, %gResultList% 676 | } 677 | 678 | Progress_Inc() 679 | if !mod(A_Index, 10) ;do win messages 680 | sleep, -1 681 | } 682 | Progress(false) 683 | GuiControl, +Redraw, lvFiles 684 | SetWorking( false ), Preview() ;call preview in case of errors 685 | } 686 | 687 | ;------------------------------------------------------------------------------------- 688 | ; Function: DoEditorPreview 689 | ; Preview processed file names in editor 690 | ; 691 | ; Parameters: 692 | ; mode - type of output (1,2,3) 693 | ; 694 | DoEditorPreview( Mode = 1 ){ 695 | local newName, oldPath, newPath, dir, cnt, res, delRow := 1, flags := 0 696 | 697 | if (gParseError) { 698 | MsgBox Mask Error. 699 | return 700 | } 701 | 702 | SetWorking( true ) 703 | FileDelete, %gPreviewFile% 704 | 705 | Gui, ListView, lvFiles 706 | cnt := LV_GetCount(), Progress(true) 707 | loop, %cnt% 708 | { 709 | #flag := "real", #no := A_Index, LV_GetText(oldPath, #no, 3), newName := Proc( oldPath ) 710 | SplitPath, oldPath, ,dir 711 | newPath := dir "\" newName 712 | 713 | GuiControl,,Progress, +1 714 | 715 | if Mode = 1 716 | res = %res%%newName%`n 717 | else if Mode = 2 718 | res = %res%%newPath%`n 719 | else if Mode = 3 720 | res = %res%"%oldPath%" -> "%newName%"`n 721 | } 722 | res := SubStr(res, 1, -1) 723 | FileAppend, %res%, %gPreviewFile% 724 | Progress(false), SetWorking( false ) 725 | Run, %gPreviewFile% 726 | } 727 | 728 | 729 | ;------------------------------------------------------------------------------------- 730 | ; Function: DoUndo 731 | ; Undo previous file renames according to data saved in ResultList 732 | ; 733 | DoUndo(){ 734 | local oldPath, newPath, reNew, reOld, fnOld, fnNew, msg, res, flags := 0 735 | 736 | reNew = ([^\\>]+\> )"(.+)$ 737 | reOld := " ->.+$" 738 | 739 | if !FileExist( gResultList ) { 740 | MsgBox, 16, %gTitle%, Undo data is not available. 741 | return 742 | } 743 | 744 | FileRead, gFiles, %gResultList% 745 | 746 | ;create preview msg 747 | msg := "Undo previous operation:`n" 748 | Loop, Parse, gFiles, `n, `r 749 | { 750 | if (A_LoopField = "") ;skip empty lines 751 | continue 752 | 753 | if (A_Index = 6){ 754 | msg .= "`n..." 755 | break 756 | } 757 | 758 | oldPath := SubStr(RegExReplace( A_LoopField, reOld), 2, -1), newPath := SubStr(RegExReplace( A_LoopField, reNew, "$2" ), 2, -1) 759 | SplitPath, oldPath, fnOld 760 | SplitPath, newPath, fnNew 761 | msg .= "`n" fnOld " -> " fnNew 762 | } 763 | 764 | MsgBox, 36, %gTitle%, %msg% 765 | IfMsgBox No 766 | return 767 | 768 | SetWorking( true ), Progress(true) 769 | 770 | loop, Parse, gFiles, `n, `r 771 | { 772 | if (A_LoopField = "") ;skip empty lines 773 | continue 774 | 775 | oldPath := SubStr(RegExReplace( A_LoopField, reOld), 2, -1) 776 | newPath := SubStr(RegExReplace( A_LoopField, reNew, "$2" ), 2, -1) 777 | res := DllCall("MoveFileEx", "str", newPath, "str", oldPath, "uint", flags) 778 | if (!res){ 779 | SplitPath, oldPath, fnOld 780 | SplitPath, newPath, fnNew 781 | MsgBox Rename failed:`n`n%fnNew% -> %fnOld% 782 | } 783 | 784 | GuiControl,,Progress, +1 785 | if !mod(A_Index, 10) ;check the quie 786 | sleep, -1 787 | } 788 | FileDelete, %gResultList% 789 | 790 | SetWorking( false ), Progress(false) 791 | } 792 | 793 | ;------------------------------------------------------------------------------------- 794 | SetWorking( flag ) { 795 | global 796 | 797 | if (flag) 798 | critical on 799 | else critical off 800 | 801 | GuiControl, Disable%flag%, eMask 802 | GuiControl, Disable%flag%, eExt 803 | GuiControl, Disable%flag%, eSearch 804 | GuiControl, Disable%flag%, eReplace 805 | GuiControl, Disable%flag%, cbRE 806 | GuiControl, Disable%flag%, ddCase 807 | 808 | GuiControl, Disable%flag%, btnStart 809 | GuiControl, Disable%flag%, btnUndo 810 | GuiControl, Disable%flag%, btnResult 811 | GuiControl, Disable%flag%, btnReload 812 | GuiControl, Disable%flag%, btnInEditor 813 | 814 | GuiControl, Disable%flag%, lvFiles 815 | 816 | gWorking := flag 817 | } 818 | 819 | ;------------------------------------------------------------------------------------- 820 | ; Function: MRU_Load 821 | ; Load mru list for file mask & extension mask 822 | ; 823 | ; Parameters: 824 | ; target - "FM" or "Ext" 825 | ; 826 | MRU_Load( target ) { 827 | local mru, lw 828 | 829 | if (target = "FM") 830 | mru := "inis_MRUfm" , lv := "cxMask" 831 | else mru := "inis_MRUsr" , lv := "cxSR" 832 | 833 | Gui, ListView, %lv% 834 | mru := Ini_LoadKeys("", %mru%, "vals") 835 | loop, Parse, mru, `n, `r 836 | lw := InStr(A_LoopField, ">"), LV_Add("", SubStr(A_LoopField, 1, lw-1), SubStr(A_LoopField, lw+1)) 837 | 838 | Gui, ListView, lvFiles 839 | } 840 | 841 | ;------------------------------------------------------------------------------------- 842 | ; Function: MRU_Set 843 | ; Set mru list for file mask & extension mask 844 | ; 845 | ; Parameters: 846 | ; target - "FM" or "Ext" 847 | ; max - maximum number of MRU enteries 848 | ; 849 | MRU_Set( target, max=10 ) { 850 | local j, c1, c2, def, lv, section 851 | 852 | if (target = "FM") 853 | c1 := eMask, c2 := eExt, def:="[N][E]", lv:="cxMask" 854 | else c1 := eSearch, c2 := eReplace, def:="", lv:="cxSR" 855 | 856 | section := "inis_MRU" target 857 | if (c1 c2 != def) 858 | if (j := Ini_AddMRU(%section%, c1 ">" c2, 10)) { 859 | Gui, ListView, %lv% 860 | if (j > 1) ;duplicate is moved to top 861 | LV_Delete(j) 862 | 863 | LV_Insert(1, "", c1, c2), LV_Delete(max+1) 864 | } 865 | 866 | Gui, ListView, lvFiles 867 | } 868 | 869 | ;------------------------------------------------------------------------------------ 870 | ; Function: ExpandEnvVar 871 | ; Expand environment variables in a path 872 | ExpandEnvVar(pPath){ 873 | VarSetCapacity(dest, 512) 874 | DllCall("ExpandEnvironmentStrings", "str", ppath, "str", dest, "int", 512) 875 | return dest 876 | } 877 | 878 | ;------------------------------------------------------------------------------------ 879 | About(){ 880 | global 881 | static txt 882 | 883 | if !txt 884 | { 885 | txt = 886 | (LTrim 887 | [About] 888 | *%gTitle% %gVersion%* 889 | _by majkinetor_ 890 | 891 | "Visit Project Page":http://code.google.com/p/multi-rename-script       "Check for new version":http://code.google.com/p/multi-rename-script/downloads/list 892 | 893 | 894 | !http://www.autohotkey.net/~majkinetor/-Avatars/scaryroboo3k.gif! 895 | [Links] 896 | "Total Commander Content Plugins":http://www.totalcmd.net/directory/content.html 897 | "AutoHotKey":http://www.autohotkey.com 898 | 899 | [Modules] 900 | "COM":http://www.autohotkey.com/forum/viewtopic.php?t=22923 - COM library. 901 | "Accordion":http://www.autohotkey.com/forum/topic27182.html - Accordion dialog. 902 | "ComboX":http://www.autohotkey.com/forum/topic22390.html - Impose combobox behavior on control. 903 | "HLink":http://www.autohotkey.com/forum/topic19508.html - Custom HyperLink control. 904 | "ShowMenu":http://www.autohotkey.com/forum/topic23138.html - Show menu from the text. 905 | "Ini":http://www.autohotkey.com/forum/topic22495.html - Helper functions for easier ini file handling. 906 | "Plugins":http://www.autohotkey.com/forum/topic22029.html - Plugin framework for non compiled scripts. 907 | "Attach":http://www.autohotkey.com/forum/topic48298.html - Attach controls in the window. 908 | "Win":http://www.autohotkey.com/forum/topic47856.html - Window functions. 909 | 910 | [Shortcuts] 911 | @F12@ - Load default preset. 912 | @DEL@ - Delete current preset if presets combo box is focused. 913 | @ENTER@ - Save preset if presets combo box is focused. 914 | @SHIFT click@ - Select left column of ComboX. 915 | @ALT click@ - Select right column of ComboX. 916 | 917 | ) 918 | } 919 | Accordion("About", "Multi-Rename Script", txt, 1, 500, 440) 920 | } 921 | 922 | ;------------------------------------------------------------------------------------- 923 | #IfWinActive Multi-Rename Script 924 | 925 | F12:: Preset_Set("[N]>[E]>>>0>1", false) ;reset 926 | ~^A:: 927 | GuiControlGet, focus, FOCUSV 928 | if focus != lvFiles 929 | return 930 | LV_Modify(0, "Select") 931 | return 932 | 933 | ~del:: 934 | GuiControlGet, focus, FOCUSV 935 | if (focus != "ddPresets") 936 | return 937 | 938 | GuiControlGet,name,,ddPresets 939 | if !Preset_Exists( name ) 940 | return 941 | 942 | MsgBox, 4, Preset, Delete preset ?`n`n%name% 943 | ifMsgbox, Yes 944 | Preset_Delete( name ) 945 | return 946 | 947 | ENTER:: 948 | GuiControlGet, focus, FOCUSV 949 | if focus != ddPresets 950 | return 951 | 952 | Preset_Save() 953 | return 954 | 955 | #IfWinActive 956 | 957 | ;==================================== INCLUDES ===================================== 958 | 959 | #include inc\IFun.ahk ;definition of native masks 960 | #include inc\Gui.ahk ;gui related stuff 961 | #include inc\Events.ahk ;gui events 962 | #include inc\TCwdx.ahk ;TC content plugin functions 963 | #include inc\Shell.ahk ;Register shell extension 964 | 965 | ;================== modules ====================== 966 | #include inc\m\COM.ahk 967 | #include inc\m\Plugins.ahk 968 | #include inc\m\Ini.ahk 969 | #include inc\m\ComboX.ahk 970 | #include inc\m\ErrMsg.ahk 971 | #include inc\m\ShowMenu.ahk 972 | #include inc\m\Accordion.ahk 973 | 974 | ;================== Forms ======================== 975 | #include inc\m\Win.ahk 976 | #include inc\m\Attach.ahk 977 | #include inc\m\HLink.ahk -------------------------------------------------------------------------------- /MRS.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/MRS.exe -------------------------------------------------------------------------------- /MRS.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/MRS.ini -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Multi-Rename Script(MRS) is open source application for massive file renaming. 2 | 3 | MRS is not limited to finite number of rename actions so you can rename files based on any criteria and you can write your own. Its up to you if its going to be simple file name manipulation or complex one, like using database or Internet to get information about the new file name. 4 | 5 | You can extend application using scripting language and plugins. 6 | 7 | ![https://raw.githubusercontent.com/majkinetor/multi-rename-script/master/MRS.PNG](https://raw.githubusercontent.com/majkinetor/multi-rename-script/master/MRS.PNG) 8 | -------------------------------------------------------------------------------- /_mkzip.ahk: -------------------------------------------------------------------------------- 1 | ;================== CONFIG ==================== 2 | ignore = 3 | (LTrim 4 | temp 5 | .svn 6 | res\ResultList.txt 7 | res\Preview.txt 8 | MRS.ahkl 9 | _mkzip.ahk 10 | ) 11 | 12 | path_7z = %A_ProgramFiles%\7-Zip\7z.exe 13 | path_mkdoc = %ComSpec% /c mkdoc.bat 14 | ;============================================== 15 | 16 | FileCopy Mrs.ahkl, Mrs.ahk 17 | 18 | opt = %1% 19 | SplitPath, A_WorkingDIr, fileOut 20 | fileOut .= ".7z" 21 | 22 | loop, parse, ignore, `n 23 | ign .= " -x!" A_LoopField 24 | 25 | FileDelete, %fileOut% 26 | opt = a -r %ign% %fileOut% 27 | res .= Run( path_7z " " opt) 28 | 29 | 30 | bOK := FileExist( fileOut ) != "" 31 | m("Result: " bOK ) 32 | return 33 | 34 | 35 | /* 36 | Function: Run 37 | Retrieve and be notified about output from the console programs. 38 | 39 | Parameters: 40 | Cmd - Command to execute. 41 | Dir - Working Directory, optional. 42 | Skip - Decimal, number of lines to be omitted from the start and the end of the command output. 43 | For instance 3.5, means that first 3 and last 5 lines will be omitted. 44 | Input - Program input (stdin). 45 | Stream - If set to TRUE it will create a console window and display output line-by-line, in addition to returning the result as a whole. 46 | If string, name of the function to be called as output updates (stream handler). The function accepts one argument. 47 | 48 | Remarks: 49 | After the function finishes, ErrorLevel will be set to programs exit code. 50 | You can't use function names for stream handler which consist only of numbers. 51 | 52 | Examples: 53 | (start code) 54 | sOutput := Run("ping.exe localhost") ;just grab the output 55 | sOutput := Run("ping.exe localhost", "", 0, "", "OnOutput") ;with stream handler 56 | sOutput := Run("cmd.exe /c dir /a /o", A_WinDir) ;with working dir 57 | sOutput := Run("sort.exe", "", 0, "abc`r`nefg`r`nhijk`r`n0123" ) ;with stdin input 58 | if !ErrorLevel 59 | msgbox Program failed with exit code %ErrorLevel% 60 | 61 | OnOutput(s){ 62 | OutputDebug %s% 63 | } 64 | (end code) 65 | 66 | About: 67 | o v1.2 68 | o Developed by Sean. Modified and documented by majkinetor. 69 | o Licenced under GNU GPL 70 | */ 71 | Run(Cmd, Dir = "", Skip=0, Input = "", Stream = "") 72 | { 73 | DllCall("CreatePipe", "UintP", hStdInRd , "UintP", hStdInWr , "Uint", 0, "Uint", 0) 74 | DllCall("CreatePipe", "UintP", hStdOutRd, "UintP", hStdOutWr, "Uint", 0, "Uint", 0) 75 | DllCall("SetHandleInformation", "Uint", hStdInRd , "Uint", 1, "Uint", 1) 76 | DllCall("SetHandleInformation", "Uint", hStdOutWr, "Uint", 1, "Uint", 1) 77 | 78 | VarSetCapacity(pi, 16, 0) 79 | NumPut(VarSetCapacity(si, 68, 0), si) ; size of si 80 | ,NumPut(0x100, si, 44) ; STARTF_USESTDHANDLES 81 | ,NumPut(hStdInRd, si, 56) ; hStdInput 82 | ,NumPut(hStdOutWr, si, 60) ; hStdOutput 83 | ,NumPut(hStdOutWr, si, 64) ; hStdError 84 | If !DllCall("CreateProcess", "Uint", 0, "Uint", &Cmd, "Uint", 0, "Uint", 0, "int", True, "Uint", 0x08000000, "Uint", 0, "Uint", Dir ? &Dir : 0, "Uint", &si, "Uint", &pi) ; bInheritHandles and CREATE_NO_WINDOW 85 | return A_ThisFunc "> Can't create process:`n" Cmd 86 | 87 | hProcess := NumGet(pi,0) 88 | DllCall("CloseHandle", "Uint", NumGet(pi,4)), DllCall("CloseHandle", "Uint", hStdOutWr), DllCall("CloseHandle", "Uint", hStdInRd) 89 | 90 | If Input != 91 | DllCall("WriteFile", "Uint", hStdInWr, "Uint", &Input, "Uint", StrLen(Input), "UintP", nSize, "Uint", 0) 92 | DllCall("CloseHandle", "Uint", hStdInWr) 93 | 94 | if (Stream+0) 95 | bAlloc := DllCall("AllocConsole") ,hCon:=DllCall("CreateFile","str","CON","Uint",0x40000000,"Uint", bAlloc ? 0 : 3, "Uint",0, "Uint",3, "Uint",0, "Uint",0) 96 | 97 | VarSetCapacity(sTemp, nTemp:=Stream ? 64-nTrim:=1 : 4095) 98 | loop 99 | if DllCall("ReadFile", "Uint", hStdOutRd, "Uint", &sTemp, "Uint", nTemp, "UintP", nSize:=0, "Uint", 0) && nSize 100 | { 101 | NumPut(0,sTemp,nSize,"Uchar"), VarSetCapacity(sTemp,-1), sOutput .= sTemp 102 | if Stream 103 | loop 104 | if RegExMatch(sOutput, "S)[^\n]*\n", sTrim, nTrim) 105 | Stream+0 ? DllCall("WriteFile", "Uint", hCon, "Uint", &sTrim, "Uint", StrLen(sTrim), "UintP", 0, "Uint", 0) : %Stream%(sTrim), nTrim += StrLen(sTrim) 106 | else break 107 | } else break 108 | 109 | DllCall("CloseHandle", "Uint", hStdOutRd) 110 | Stream+0 ? (DllCall("Sleep", "Uint", 1000), hCon+1 ? DllCall("CloseHandle","Uint", hCon) : "", bAlloc ? DllCall("FreeConsole") : "" ) : "" 111 | DllCall("GetExitCodeProcess", "uint", hProcess, "intP", ExitCode), DllCall("CloseHandle", "Uint", hProcess) 112 | 113 | if (Skip != "") { 114 | StringSplit, s, Skip, ., 115 | StringReplace, sOutput, sOutput, `n, `n, A UseErrorLevel 116 | s2 := ErrorLevel - (s2 ? s2 : 0) + 1, s1++ 117 | loop, parse, sOutput,`n,`r 118 | if A_Index between %s1% and %s2% 119 | s .= A_LoopField "`r`n" 120 | StringTrimRight, sOutput, s, 2 121 | } 122 | 123 | ErrorLevel := ExitCode 124 | return sOutput 125 | } -------------------------------------------------------------------------------- /docs/MRS.html: -------------------------------------------------------------------------------- 1 |

Multi Rename Script

74 | 75 |

Overview

76 | 77 |

Multi-Rename Script(MRS) is open source application for massive file renaming. It is not limited to finite number of rename actions. You can rename files based on any criteria and you can write your own. Its up to you if its going to be simple file name manipulation or complex one, like using database or Internet to get information about the new file name.

78 | 79 |

MRS is influenced by Total Commander’s (TC) Multi-Rename Tool. File name masks from TC will generally work unchanged. TC content plugins are also supported and automatically recognized if you have normal TC installation. This feature alone opens the world to Explorer’s Shell Extensions which can be used as rename mask providers. Its not necessary to have Total Commander installed for any of the MRS functionality.

80 | 81 |

Additionally, MRS has its native plugin interface using AutoHotKey language. With basic programming experience you can extend file-rename operations. To create/change plugin or even MRS itself, nothing else but text editor is needed.

82 | 83 |

84 | 85 |

Features

86 | 87 | 98 | 99 |

Installation

100 | 101 |

MRS is portable application. Just unpack the archive to the directory of your choice.
102 | In some systems you will have to add MRS.exe in Data Execution Prevention (DEP) list. You can do so using “System” Control Panel applet (Advanced -> Performance section -> Data Execution Prevention tab).

103 | 104 |

To uninstall MRS, simply delete the directory. If you enabled shell extension you need to disable it first.

105 | 106 |

Integration

107 | 108 |

Although MRS can be used standalone, its the best to integrate it with your file manager.

109 | 110 |

Explorer
111 | Enable Shell Extension ( ?->Settings->Enable Shell Extension ).

112 | 113 |

Total Commander
114 | Edit Start menu ( Start->Change Start Menu ) and use following settings:

115 | 116 |
Title:		Multi-Rename Script
117 | Command:	<path_to_mrs>\MRS.exe
118 | Parameters:	AutoHotKey.ini %UL
119 | Start In:	<path_to_mrs>
120 | 
121 | 122 |

%UL parameter will make TC send Unicode List of files to MRS (requires TC 7.5++).

123 | 124 |

You can also recall preset directly from the TC menu to be applied as soon as you activate the menu item, without showing the MRS GUI. To do so specify MRS preset after the %UL parameter or write new preset directly. For instance, to add counter to selected files using TC file list order, use above settings with following Parameters:

125 | 126 |
Parameters:	AutoHotKey.ini %UL "[C] [N]"
127 | 
128 | 129 |

For other file managers procedure should be similar. See Command Line section for additional details.

130 | 131 |

Usage

132 | 133 |

Rename
134 | In MRS, you build up a new file names using name-masks, search & replace and casing operations. File name mask is the string describing how to build up a new file name based on the currently processed file name and its position in the file list. Basic masks are always written between [ ]. Anything not among angular brackets is literal. To build up complete mask you concatenate basic masks and literal words. For instance, file name mask:

135 | 136 |
No=[C:2] Name=[N4,10]
137 | 
138 | 139 |

renames files in the list so that new file names contain some literals (No= Name=), file number in the list specified with 2 digits ([C:2]) and 10 characters of original file name starting from 4th character ([N4,10]). The result for 2 files in the list is for instance:

140 | 141 |
"AFX-Lisbon Acid.mp3"   --->   "No=01  Name=Lisabon Acid.mp3"
142 | "AFX-Pitcard.Mp3"       --->   "No=02  Name=Pitcard.Mp3"
143 | 
144 | 145 |

There are 2 unrelated file masks, one that will be expanded to the new file name and one that will form the new file extension (File Extension Mask). You specify them in File name mask and Ext mask GUI fields. Both masks work the same way.

146 | 147 |

After the mask, file name is processed with regular expression (RE) search & replace. What you get is converted to appropriate case selected from the Case combo box.

148 | 149 |

In the file list, you can see real time preview for your current rename operation. Once you build the mask you can press Start button to rename all files in the list. You can always restore previous names with Undo operation, even if you restart the application.

150 | 151 |

Report
152 | You can use MRS to generate file and directory reports using plugins. The difference between renaming and reporting operation is simply that you don’t use Start button but Editor Preview instead to show generated text. This means that you can use all charachters desired, not only those allowed for the file names. For example, the following mask generates CSV file with details about each file in the list containing the file/directory name, number of files in the diretory, owner, full path, and creation date:

153 | 154 |
[N];[=DirSizeCalc.File Count (on demand)] files;[=ShellDetails.Owner];[1-];[=ShellDetails.Date Created]
155 | 
156 | 157 |

158 | 159 |

Interface elements

160 | 161 |

File name mask
162 | File Name Mask. You can enter mask by typing, or you can expand MRS interface using expander on the middle of the GUI to select mask functions from mask categories.

163 | 164 |

Ext mask
165 | File Extension Mask. All masks used for a file name can be used here.

166 | 167 |

Search & Replace
168 | Enter search and replace strings here. You can specify multiple criteria by using | separator (not with RE option enabled).
169 | For instance: 170 | Search for: ä|ö|ü| Replace with: ae|oe|ue

171 | 172 |

If RE option is turned on search string is specified as PERL regular expression and you can use backreferences like $1 in the replace field. There are number of regular expression options that can be set at the beginning of the search string followed by an close-parenthesis. For instance, the pattern i)abc.*123 would turn on the case-insensitive option and search for “abc” followed by “123”.

173 | 174 |

Case
175 | Specify case here to be applied finanally. To apply case on the parts of the file name, use case masks ( [U], [L] … ).

176 | 177 |

Expander
178 | Pressing the little button on the middle of the top side of ListView control will expand user interface.
179 | Expanded interface contains buttons that will let you select rename-mask using categories. Button Plugins will show the menu with list of installed plugins.
180 | AHK plugins are shown bellow Total Commander plugins delimited by separator.

181 | 182 |

There is also combo box with presets you saved. Type the name and press ENTER to save the preset. Type the preset name or use the combox box to select the preset. You can delete selected preset by pressing DEL key. Pressing F12 will load default preset.

183 | 184 |

You can change/add/remove entries from the button menus by editing res\menus.ini file. The format of this file is self explanatory.

185 | 186 |

File List
187 | This is the list of files to be renamed. Double click the file to create range mask.

188 | 189 |

You can add files using command line or drag & drop.
190 | If you specify file name with the list of files as command line parameter, it will be used to populate the file list. The input file must contain one full file path per line.

191 | 192 |

You can also add files to the list by dropping them with the mouse. If you drop files again, you will add to the current list unless you hold the SHIFT key.
193 | To remove selected files from the list, select them and press DELETE key.

194 | 195 |

Double click the file in the list to set the N mask range based on its name.

196 | 197 |

Start
198 | Launch rename operation. All renamed files will be removed from the list. Files that can not be renamed due to any kind of error will stay in the list and their Error column will contan error description.

199 | 200 |

Undo
201 | Undo the last operation. There is only 1 undo and it will not be lost if you restart MRS.

202 | 203 |

Reload
204 | Reload the result of the pervious rename operation to the list.

205 | 206 |

Preview in editor
207 | Show preview for all files in the list in the editor. You can use this feature to edit the result manually before doing actual renaming. To do this, save preview in the FileInfo.txt under plugins folder, and use [=FileInfo] as file-rename mask.

208 | 209 |

Command line

210 | 211 |

MRS accepts 2 command line arguments:

212 | 213 |
MRS.exe AutoHotKey.ini [fileList] [presetDef]
214 | 
215 | 216 |

AutoHotKey.ini
217 | Must be set as the first parameter.

218 | 219 |

fileList
220 | This is list of full system paths of files you want to rename, each on new line.

221 | 222 |

presetDef
223 | This is preset definition to be used immediately on startup.
224 | Preset definition is string containing file mask, extension mask, search string, replace string, RE flag and case option separated by “>” symbol. For instance [N]>[E] is the same as you set file mask to [N] and extension mask to [E] and leaving all other options unchanged in GUI.

225 | 226 |

Alternatively u can use preset name by specifying “>” as the first character; for instance, you can write ">Artist - Title" on command line to rename files in the fileList using already saved preset named Artist - Title. Note that you must use quotation to specify preset name or it will be understood as command line redirection.
227 | The same preset definition is used in MRS configuration file to store presets and last used mask, so you can also copy/paste it from there.

228 | 229 |

If presetDef is present on the command line, only progress bar will be shown and application will exit immediately after completing operation. GUI will be shown only if errors occured and it will contain list of problematic files with error descriptions.

230 | 231 |

Using plugins

232 | 233 |

Plugins extend the set of basic mask functions. Plugin may provide fields that can be used to specify what information to return about the file. Additionally, fields may have units to choose different format for the field data or specific information part.
234 | To specify plugin in file mask, use [=plugin.field.unit] notation. For instance mask:

235 | 236 |

[N] [=Hash.CRC32] [=File.size.MB]MB ver[=Ver]

237 | 238 |

will append crc32, file size in megabytes and version to the original file name.

239 | 240 |

You can select range from plugin data using syntax:

241 | 242 |

[=FileInfo:4-9]

243 | 244 |

where range is used the same way as with [N] mask.

245 | 246 |

TC plugin ShellDetails provides data from Explorer’s shell extensions.

247 | 248 |

Installing plugins

249 | 250 |

AHK plugins are single AHK script files and they have .ahk extension. To install AHK plugin, simply copy it to the plugins folder and restart the application. To disable plugin, change its extension to anything but .ahk.

251 | 252 |

About TC content plugins, MRS will try to find location of the wincmd.ini using system registry and if that fails, COMMANDER_PATH environment variable. It will then load all plugins found in TC configuration file. To override this behavior, set location of the wincmd.ini in the MRS configuration file, MRS.ini (Section: Config, Key: tcIni).

253 | 254 |

If you don’t have TC installed you can still use its content plugins. To install plugin without TC, simply copy it (or its folder) to \plugins folder. To use always plugins from the MRS plugins folder, no matter configuration of your local TC installation, set tcIni=! in MRS.ini Config section.

255 | 256 |

To verify plugin installation expand MRS interface and click Plugins button. All installed plugins should be in the list.

257 | 258 |

Writing plugins

259 | 260 |

To Create AHK plugin nothing but the text editor is needed. Plugin interface is very simple:

261 | 262 | 269 | 270 |

Masks

271 | 272 |

All masks except plugin names and fields are case sensitive. White space is allowed between mask name and its parameters.
273 | Maks are written betwen angular brackets: [mask]

274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 |
maskdescription
File name
N n-mFrom n to m, no m means “end”, no n means “start”
N n,mFrom n, m.
E n-mExtension
C s+i:wCounter S-start, i-increment, w-width
PParent dir
GGrandparent dir
Date Time
YYear in 4 digit form
yYear in 2 digit form
MMonth, 2 digit
DDay, 2 digit
tTime, as defined in current country settings. : is replaced by a dot
hHours, always in 24 hour 2 digit format
mMinutes, in 2 digit format
sSeconds, in 2 digit format
Case
UAll characters after this position in uppercase
LAll characters after this position in lowercase
FFirst letter of each word uppercase after this position, all others lowercase
nAll characters after this position again as in original name (upper/lowercase unchanged)
Plugins
=Plugin3 ways to call plugins. Range can be specified with ‘:’ using N notation: [=plugin:range]
=Plugin.field
=Plugin.field.unit
Special
[Opening square bracket
]Closing square bracket
386 | 387 |

About

388 | 389 |

MRS is free, open source application. You are encouraged to modify any part of it and share it. If you write cool plugin consider sharing it (via forum for instance) and if its of general usability I will consider including it in the future versions.

390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 |
Developed by:Miodrag Milić
License:BSD
Contact: miodrag.milic@gmail.com
Location: Belgrade, Serbia
409 | 410 |

Last Changed: 09/02/2010

411 | 412 | -------------------------------------------------------------------------------- /docs/Plugins.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/docs/Plugins.html -------------------------------------------------------------------------------- /docs/res/MRS.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/docs/res/MRS.PNG -------------------------------------------------------------------------------- /docs/res/scheme.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/docs/res/scheme.gif -------------------------------------------------------------------------------- /docs/res/style.css: -------------------------------------------------------------------------------- 1 | BODY { 2 | font-family : Arial, Tahoma, Helvetica, sans-serif; 3 | margin-left : 8%; 4 | margin-right : 5%; 5 | } 6 | 7 | PRE { 8 | margin-left: 5%; 9 | } 10 | 11 | H3 { 12 | border-bottom: solid; 13 | border-width: 1px; 14 | padding: 5px; 15 | color : #990000; 16 | font-family : Verdana, Tahoma, Arial, Helvetica, sans-serif; 17 | font-size : 140%; 18 | margin-left : -5%; 19 | margin-top : 2em; 20 | } 21 | 22 | BLOCKQUOTE { 23 | margin-left : 0; 24 | } 25 | 26 | TH { 27 | background-color : #FFFFFF; 28 | } 29 | 30 | TD { 31 | background-color : #F0F0F0; 32 | } 33 | -------------------------------------------------------------------------------- /inc/Errors: -------------------------------------------------------------------------------- 1 | ;PARSING ERRORS 2 | ;-------------------------------------------------- 3 | 4 | ERR_OPENMASK=1 ;missing ] 5 | ERR_PLUG=2 ;plugin can't be found 6 | ERR_PLUGLOAD=3 ;error while opening plugin 7 | ERR_PLUGFIELD=4 ;no plugin filed or unit 8 | ERR_PLUGRANGE=6 ;invalid plugin range 9 | ERR_UNKNOWN=10 ;unknown error -------------------------------------------------------------------------------- /inc/Events.ahk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/inc/Events.ahk -------------------------------------------------------------------------------- /inc/Gui.ahk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/inc/Gui.ahk -------------------------------------------------------------------------------- /inc/IFun.ahk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/inc/IFun.ahk -------------------------------------------------------------------------------- /inc/Shell.ahk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/inc/Shell.ahk -------------------------------------------------------------------------------- /inc/TCwdx.ahk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/inc/TCwdx.ahk -------------------------------------------------------------------------------- /inc/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/inc/Thumbs.db -------------------------------------------------------------------------------- /inc/m/Accordion.ahk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/inc/m/Accordion.ahk -------------------------------------------------------------------------------- /inc/m/Attach.ahk: -------------------------------------------------------------------------------- 1 | /* 2 | Function: Attach 3 | Determines how a control is resized with its parent. 4 | 5 | hCtrl: 6 | - hWnd of the control if aDef is not empty. 7 | - hWnd of the parent to be reset if aDef is empty. If you omit this parameter function will use 8 | the first hWnd passed to it. 9 | With multiple parents you need to specify which one you want to reset. 10 | - Handler name, if parameter is string and aDef is empty. Handler will be called after the function has finished 11 | moving controls for the parent. Handler receives hWnd of the parent as its only argument. 12 | 13 | aDef: 14 | Attach definition string. Space separated list of attach options. If omitted, function working depends on hCtrl parameter. 15 | You can use following elements in the definition string: 16 | 17 | - "x,y,w,h" letters along with coefficients, decimal numbers which can also be specified in m/n form (see example below). 18 | - "r". Use "r1" (or "r") option to redraw control immediately after repositioning, set "r2" to delay redrawing 100ms for the control 19 | (prevents redrawing spam). 20 | - "p" (for "proportional") is the special coefficient. It will make control's dimension always stay in the same proportion to its parent 21 | (so, pin the control to the parent). Although you can mix pinned and non-pinned controls and dimensions that is rarely what you want. 22 | You will generally want to pin every control in the parent. 23 | - "+" or "-" enable or disable function for the control. If control is hidden, you may want to disable the function for 24 | performance reasons, especially if control is container attaching its children. Its perfectly OK to leave invisible controls 25 | attached, but if you have lots of them you can use this feature to get faster and more responsive updates. 26 | When you want to show disabled hidden control, make sure you first attach it back so it can take its correct position 27 | and size while in hidden state, then show it. "+" must be used alone while "-" can be used either alone or in Attach definition string 28 | to set up control as initially disabled. 29 | 30 | Remarks: 31 | Function monitors WM_SIZE message to detect parent changes. That means that it can be used with other eventual container controls 32 | and not only top level windows. 33 | 34 | You should reset the function when you programmatically change the position of the controls in the parent control. 35 | Depending on how you created your GUI, you might need to put "autosize" when showing it, otherwise resetting the Gui before its 36 | placement is changed will not work as intented. Autosize will make sure that WM_SIZE handler fires. Sometimes, however, WM_SIZE 37 | message isn't sent to the window. One example is for instance when some control requires Gui size to be set in advance in which case 38 | you would first have "Gui, Show, w100 h100 Hide" line prior to adding controls, and only Gui, Show after controls are added. This 39 | case will not trigger WM_SIZE message unless AutoSize is added. 40 | 41 | 42 | Examples: 43 | (start code) 44 | Attach(h, "w.5 h1/3 r2") ;Attach control's w, h and redraw it with delay. 45 | Attach(h, "-") ;Disable function for control h but keep its definition. To enable it latter use "+". 46 | Attach(h, "- w.5") ;Make attach definition for control but do not attach it until you call Attach(h, "+"). 47 | Attach() ;Reset first parent. Use when you have only 1 parent. 48 | Attach(hGui2) ;Reset Gui2. 49 | Attach("Win_Redraw") ;Use Win_Redraw function as a Handler. Attach will call it with parent's handle as argument. 50 | Attach(h, "p r2") ;Pin control with delayed refreshing. 51 | 52 | 53 | ; This is how to do delayed refresh of entire window. 54 | ; To prevent redraw spam which can be annoying in some cases, 55 | ; you can choose to redraw entire window only when user has finished resizing it. 56 | ; This is similar to r2 option for controls, except it works with entire parent. 57 | 58 | Attach("OnAttach") ;Set Handler to OnAttach function 59 | ... 60 | 61 | OnAttach( Hwnd ) { 62 | global hGuiToRedraw := hwnd 63 | SetTimer, Redraw, -100 64 | } 65 | 66 | Redraw: 67 | Win_Redraw(hGuiToRedraw) 68 | return 69 | (end code) 70 | Working sample: 71 | (start code) 72 | #SingleInstance, force 73 | Gui, +Resize 74 | Gui, Add, Edit, HWNDhe1 w150 h100 75 | Gui, Add, Picture, HWNDhe2 w100 x+5 h100, pic.bmp 76 | 77 | Gui, Add, Edit, HWNDhe3 w100 xm h100 78 | Gui, Add, Edit, HWNDhe4 w100 x+5 h100 79 | Gui, Add, Edit, HWNDhe5 w100 yp x+5 h100 80 | 81 | gosub SetAttach ;comment this line to disable Attach 82 | Gui, Show, autosize 83 | return 84 | 85 | SetAttach: 86 | Attach(he1, "w.5 h") 87 | Attach(he2, "x.5 w.5 h r") 88 | Attach(he3, "y w1/3") 89 | Attach(he4, "y x1/3 w1/3") 90 | Attach(he5, "y x2/3 w1/3") 91 | return 92 | (end code) 93 | 94 | About: 95 | o 1.08 by majkinetor 96 | o Licensed under BSD 97 | */ 98 | Attach(hCtrl="", aDef="") { 99 | Attach_(hCtrl, aDef, "", "") 100 | } 101 | 102 | Attach_(hCtrl, aDef, Msg, hParent){ 103 | static 104 | local s1,s2, enable, reset, oldCritical 105 | 106 | if (aDef = "") { ;Reset if integer, Handler if string 107 | if IsFunc(hCtrl) 108 | return Handler := hCtrl 109 | 110 | ifEqual, adrWindowInfo,, return ;Resetting prior to adding any control just returns. 111 | hParent := hCtrl != "" ? hCtrl+0 : hGui 112 | loop, parse, %hParent%a, %A_Space% 113 | { 114 | hCtrl := A_LoopField, SubStr(%hCtrl%,1,1), aDef := SubStr(%hCtrl%,1,1)="-" ? SubStr(%hCtrl%,2) : %hCtrl%, %hCtrl% := "" 115 | gosub Attach_GetPos 116 | loop, parse, aDef, %A_Space% 117 | { 118 | StringSplit, z, A_LoopField, : 119 | %hCtrl% .= A_LoopField="r" ? "r " : (z1 ":" z2 ":" c%z1% " ") 120 | } 121 | %hCtrl% := SubStr(%hCtrl%, 1, -1) 122 | } 123 | reset := 1, %hParent%_s := %hParent%_pw " " %hParent%_ph 124 | } 125 | 126 | if (hParent = "") { ;Initialize controls 127 | if !adrSetWindowPos 128 | adrSetWindowPos := DllCall("GetProcAddress", "uint", DllCall("GetModuleHandle", "str", "user32"), A_IsUnicode ? "astr" : "str", "SetWindowPos") 129 | ,adrWindowInfo := DllCall("GetProcAddress", "uint", DllCall("GetModuleHandle", "str", "user32"), A_IsUnicode ? "astr" : "str", "GetWindowInfo") 130 | ,OnMessage(5, A_ThisFunc), VarSetCapacity(B, 60), NumPut(60, B), adrB := &B 131 | ,hGui := DllCall("GetParent", "uint", hCtrl, "Uint") 132 | 133 | hParent := DllCall("GetParent", "uint", hCtrl, "Uint") 134 | 135 | if !%hParent%_s 136 | DllCall(adrWindowInfo, "uint", hParent, "uint", adrB), %hParent%_pw := NumGet(B, 28) - NumGet(B, 20), %hParent%_ph := NumGet(B, 32) - NumGet(B, 24), %hParent%_s := !%hParent%_pw || !%hParent%_ph ? "" : %hParent%_pw " " %hParent%_ph 137 | 138 | if InStr(" " aDef " ", "p") 139 | StringReplace, aDef, aDef, p, xp yp wp hp 140 | ifEqual, aDef, -, return SubStr(%hCtrl%,1,1) != "-" ? %hCtrl% := "-" %hCtrl% : 141 | else if (aDef = "+") 142 | if SubStr(%hCtrl%,1,1) != "-" 143 | return 144 | else %hCtrl% := SubStr(%hCtrl%, 2), enable := 1 145 | else { 146 | gosub Attach_GetPos 147 | %hCtrl% := "" 148 | loop, parse, aDef, %A_Space% 149 | { 150 | if (l := A_LoopField) = "-" { 151 | %hCtrl% := "-" %hCtrl% 152 | continue 153 | } 154 | f := SubStr(l,1,1), k := StrLen(l)=1 ? 1 : SubStr(l,2) 155 | if (j := InStr(l, "/")) 156 | k := SubStr(l, 2, j-2) / SubStr(l, j+1) 157 | %hCtrl% .= f ":" k ":" c%f% " " 158 | } 159 | return %hCtrl% := SubStr(%hCtrl%, 1, -1), %hParent%a .= InStr(%hParent%, hCtrl) ? "" : (%hParent%a = "" ? "" : " ") hCtrl 160 | } 161 | } 162 | ifEqual, %hParent%a,, return ;return if nothing to anchor. 163 | 164 | if !reset && !enable { 165 | %hParent%_pw := aDef & 0xFFFF, %hParent%_ph := aDef >> 16 166 | ifEqual, %hParent%_ph, 0, return ;when u create gui without any control, it will send message with height=0 and scramble the controls .... 167 | } 168 | 169 | if !%hParent%_s 170 | %hParent%_s := %hParent%_pw " " %hParent%_ph 171 | 172 | oldCritical := A_IsCritical 173 | critical, 5000 174 | 175 | StringSplit, s, %hParent%_s, %A_Space% 176 | loop, parse, %hParent%a, %A_Space% 177 | { 178 | hCtrl := A_LoopField, aDef := %hCtrl%, uw := uh := ux := uy := r := 0, hCtrl1 := SubStr(%hCtrl%,1,1) 179 | if (hCtrl1 = "-") 180 | ifEqual, reset,, continue 181 | else aDef := SubStr(aDef, 2) 182 | 183 | gosub Attach_GetPos 184 | loop, parse, aDef, %A_Space% 185 | { 186 | StringSplit, z, A_LoopField, : ; opt:coef:initial 187 | ifEqual, z1, r, SetEnv, r, %z2% 188 | if z2=p 189 | c%z1% := z3 * (z1="x" || z1="w" ? %hParent%_pw/s1 : %hParent%_ph/s2), u%z1% := true 190 | else c%z1% := z3 + z2*(z1="x" || z1="w" ? %hParent%_pw-s1 : %hParent%_ph-s2), u%z1% := true 191 | } 192 | flag := 4 | (r=1 ? 0x100 : 0) | (uw OR uh ? 0 : 1) | (ux OR uy ? 0 : 2) ; nozorder=4 nocopybits=0x100 SWP_NOSIZE=1 SWP_NOMOVE=2 193 | ;m(hParent, %hParent%a, hCtrl, %hCTRL%) 194 | DllCall(adrSetWindowPos, "uint", hCtrl, "uint", 0, "uint", cx, "uint", cy, "uint", cw, "uint", ch, "uint", flag) 195 | r+0=2 ? Attach_redrawDelayed(hCtrl) : 196 | } 197 | critical %oldCritical% 198 | return Handler != "" ? %Handler%(hParent) : "" 199 | 200 | Attach_GetPos: ;hParent & hCtrl must be set up at this point 201 | DllCall(adrWindowInfo, "uint", hParent, "uint", adrB), lx := NumGet(B, 20), ly := NumGet(B, 24), DllCall(adrWindowInfo, "uint", hCtrl, "uint", adrB) 202 | ,cx :=NumGet(B, 4), cy := NumGet(B, 8), cw := NumGet(B, 12)-cx, ch := NumGet(B, 16)-cy, cx-=lx, cy-=ly 203 | return 204 | } 205 | 206 | Attach_redrawDelayed(hCtrl){ 207 | static s 208 | s .= !InStr(s, hCtrl) ? hCtrl " " : "" 209 | SetTimer, %A_ThisFunc%, -100 210 | return 211 | Attach_redrawDelayed: 212 | loop, parse, s, %A_Space% 213 | WinSet, Redraw, , ahk_id %A_LoopField% 214 | s := "" 215 | return 216 | } 217 | -------------------------------------------------------------------------------- /inc/m/COM.ahk: -------------------------------------------------------------------------------- 1 | ;------------------------------------------------------------------------------ 2 | ; COM.ahk Standard Library 3 | ; by Sean 4 | ; http://www.autohotkey.com/forum/topic22923.html 5 | ;------------------------------------------------------------------------------ 6 | 7 | COM_Init(bUn = "") 8 | { 9 | Static h 10 | Return (bUn&&!h:="")||h==""&&1==(h:=DllCall("ole32\OleInitialize","Uint",0))?DllCall("ole32\OleUninitialize"):0 11 | } 12 | 13 | COM_Term() 14 | { 15 | COM_Init(1) 16 | } 17 | 18 | COM_VTable(ppv, idx) 19 | { 20 | Return NumGet(NumGet(1*ppv)+4*idx) 21 | } 22 | 23 | COM_QueryInterface(ppv, IID = "") 24 | { 25 | If DllCall(NumGet(NumGet(1*ppv:=COM_Unwrap(ppv))), "Uint", ppv+0, "Uint", COM_GUID4String(IID,IID ? IID:IID=0 ? "{00000000-0000-0000-C000-000000000046}":"{00020400-0000-0000-C000-000000000046}"), "UintP", ppv:=0)=0 26 | Return ppv 27 | } 28 | 29 | COM_AddRef(ppv) 30 | { 31 | Return DllCall(NumGet(NumGet(1*ppv:=COM_Unwrap(ppv))+4), "Uint", ppv) 32 | } 33 | 34 | COM_Release(ppv) 35 | { 36 | If Not IsObject(ppv) 37 | Return DllCall(NumGet(NumGet(1*ppv)+8), "Uint", ppv) 38 | Else 39 | { 40 | nRef:= DllCall(NumGet(NumGet(COM_Unwrap(ppv))+8), "Uint", COM_Unwrap(ppv)), nRef==0 ? (ppv.prm_:=0):"" 41 | Return nRef 42 | } 43 | } 44 | 45 | COM_QueryService(ppv, SID, IID = "") 46 | { 47 | If DllCall(NumGet(NumGet(1*ppv:=COM_Unwrap(ppv))), "Uint", ppv, "Uint", COM_GUID4String(IID_IServiceProvider,"{6D5140C1-7436-11CE-8034-00AA006009FA}"), "UintP", psp)=0 48 | && DllCall(NumGet(NumGet(1*psp)+12), "Uint", psp, "Uint", COM_GUID4String(SID,SID), "Uint", IID ? COM_GUID4String(IID,IID):&SID, "UintP", ppv:=0)+DllCall(NumGet(NumGet(1*psp)+8), "Uint", psp)*0=0 49 | Return COM_Enwrap(ppv) 50 | } 51 | 52 | COM_FindConnectionPoint(pdp, DIID) 53 | { 54 | DllCall(NumGet(NumGet(1*pdp)+ 0), "Uint", pdp, "Uint", COM_GUID4String(IID_IConnectionPointContainer, "{B196B284-BAB4-101A-B69C-00AA00341D07}"), "UintP", pcc) 55 | DllCall(NumGet(NumGet(1*pcc)+16), "Uint", pcc, "Uint", COM_GUID4String(DIID,DIID), "UintP", pcp) 56 | DllCall(NumGet(NumGet(1*pcc)+ 8), "Uint", pcc) 57 | Return pcp 58 | } 59 | 60 | COM_GetConnectionInterface(pcp) 61 | { 62 | VarSetCapacity(DIID,16,0) 63 | DllCall(NumGet(NumGet(1*pcp)+12), "Uint", pcp, "Uint", &DIID) 64 | Return COM_String4GUID(&DIID) 65 | } 66 | 67 | COM_Advise(pcp, psink) 68 | { 69 | DllCall(NumGet(NumGet(1*pcp)+20), "Uint", pcp, "Uint", psink, "UintP", nCookie) 70 | Return nCookie 71 | } 72 | 73 | COM_Unadvise(pcp, nCookie) 74 | { 75 | Return DllCall(NumGet(NumGet(1*pcp)+24), "Uint", pcp, "Uint", nCookie) 76 | } 77 | 78 | COM_Enumerate(penum, ByRef Result, ByRef vt = "") 79 | { 80 | VarSetCapacity(varResult,16,0) 81 | If (0 = hr:=DllCall(NumGet(NumGet(1*penum:=COM_Unwrap(penum))+12), "Uint", penum, "Uint", 1, "Uint", &varResult, "UintP", 0)) 82 | Result:=(vt:=NumGet(varResult,0,"Ushort"))=9||vt=13?COM_Enwrap(NumGet(varResult,8),vt):vt=8||vt<0x1000&&COM_VariantChangeType(&varResult,&varResult)=0?StrGet(NumGet(varResult,8)) . COM_VariantClear(&varResult):NumGet(varResult,8) 83 | Return hr 84 | } 85 | 86 | COM_Invoke(pdsp,name="",prm0="vT_NoNe",prm1="vT_NoNe",prm2="vT_NoNe",prm3="vT_NoNe",prm4="vT_NoNe",prm5="vT_NoNe",prm6="vT_NoNe",prm7="vT_NoNe",prm8="vT_NoNe",prm9="vT_NoNe") 87 | { 88 | pdsp := COM_Unwrap(pdsp) 89 | If name= 90 | Return DllCall(NumGet(NumGet(1*pdsp)+8),"Uint",pdsp) 91 | If name contains . 92 | { 93 | SubStr(name,1,1)!="." ? name.=".":name:=SubStr(name,2) . "." 94 | Loop, Parse, name, . 95 | { 96 | If A_Index=1 97 | { 98 | name := A_LoopField 99 | Continue 100 | } 101 | Else If name not contains [,( 102 | prmn := "" 103 | Else If InStr("])",SubStr(name,0)) 104 | Loop, Parse, name, [(,'")] 105 | If A_Index=1 106 | name := A_LoopField 107 | Else prmn := A_LoopField 108 | Else 109 | { 110 | name .= "." . A_LoopField 111 | Continue 112 | } 113 | If A_LoopField!= 114 | pdsp:= COM_Invoke(pdsp,name,prmn!="" ? prmn:"vT_NoNe"),name:=A_LoopField 115 | Else Return prmn!=""?COM_Invoke(pdsp,name,prmn,prm0,prm1,prm2,prm3,prm4,prm5,prm6,prm7,prm8):COM_Invoke(pdsp,name,prm0,prm1,prm2,prm3,prm4,prm5,prm6,prm7,prm8,prm9) 116 | } 117 | } 118 | Static varg,namg,iidn,varResult,sParams 119 | VarSetCapacity(varResult,64,0),sParams?"":(sParams:="0123456789",VarSetCapacity(varg,160,0),VarSetCapacity(namg,88,0),VarSetCapacity(iidn,16,0)),mParams:=0,nParams:=10,nvk:=3 120 | Loop, Parse, sParams 121 | If (prm%A_LoopField%=="vT_NoNe") 122 | { 123 | nParams:=A_Index-1 124 | Break 125 | } 126 | Else If prm%A_LoopField% is integer 127 | NumPut(SubStr(prm%A_LoopField%,1,1)="+"?9:prm%A_LoopField%=="-0"?(prm%A_LoopField%:=0x80020004)*0+10:3,NumPut(prm%A_LoopField%,varg,168-16*A_Index),-12) 128 | Else If IsObject(prm%A_LoopField%) 129 | typ:=prm%A_LoopField%["typ_"],prm:=prm%A_LoopField%["prm_"],typ+0==""?(NumPut(&_nam_%A_LoopField%:=typ,namg,84-4*mParams++),typ:=prm%A_LoopField%["nam_"]+0==""?prm+0==""||InStr(prm,".")?8:3:prm%A_LoopField%["nam_"]):"",NumPut(typ==8?COM_SysString(prm%A_LoopField%,prm):prm,NumPut(typ,varg,160-16*A_Index),4) 130 | Else NumPut(COM_SysString(prm%A_LoopField%,prm%A_LoopField%),NumPut(8,varg,160-16*A_Index),4) 131 | If nParams 132 | SubStr(name,0)="="?(name:=SubStr(name,1,-1),nvk:=12,NumPut(-3,namg,4)):"",NumPut(nvk==12?1:mParams,NumPut(nParams,NumPut(&namg+4,NumPut(&varg+160-16*nParams,varResult,16)))) 133 | Global COM_HR, COM_LR:="" 134 | If (COM_HR:=DllCall(NumGet(NumGet(1*pdsp)+20),"Uint",pdsp,"Uint",&iidn,"Uint",NumPut(&name,namg,84-4*mParams)-4,"Uint",1+mParams,"Uint",1024,"Uint",&namg,"Uint"))=0&&(COM_HR:=DllCall(NumGet(NumGet(1*pdsp)+24),"Uint",pdsp,"int",NumGet(namg),"Uint",&iidn,"Uint",1024,"Ushort",nvk,"Uint",&varResult+16,"Uint",&varResult,"Uint",&varResult+32,"Uint",0,"Uint"))!=0&&nParams&&nvk<4&&NumPut(-3,namg,4)&&(COM_LR:=DllCall(NumGet(NumGet(1*pdsp)+24),"Uint",pdsp,"int",NumGet(namg),"Uint",&iidn,"Uint",1024,"Ushort",12,"Uint",NumPut(1,varResult,28)-16,"Uint",0,"Uint",0,"Uint",0,"Uint"))=0 135 | COM_HR:=0 136 | Global COM_VT:=NumGet(varResult,0,"Ushort") 137 | Return COM_HR=0?COM_VT>1?COM_VT=9||COM_VT=13?COM_Enwrap(NumGet(varResult,8),COM_VT):COM_VT=8||COM_VT<0x1000&&COM_VariantChangeType(&varResult,&varResult)=0?StrGet(NumGet(varResult,8)) . COM_VariantClear(&varResult):NumGet(varResult,8):"":COM_Error(COM_HR,COM_LR,&varResult+32,name) 138 | } 139 | 140 | COM_InvokeSet(pdsp,name,prm0,prm1="vT_NoNe",prm2="vT_NoNe",prm3="vT_NoNe",prm4="vT_NoNe",prm5="vT_NoNe",prm6="vT_NoNe",prm7="vT_NoNe",prm8="vT_NoNe",prm9="vT_NoNe") 141 | { 142 | Return COM_Invoke(pdsp,name "=",prm0,prm1,prm2,prm3,prm4,prm5,prm6,prm7,prm8,prm9) 143 | } 144 | 145 | COM_DispInterface(this, prm1="", prm2="", prm3="", prm4="", prm5="", prm6="", prm7="", prm8="") 146 | { 147 | Critical 148 | If A_EventInfo = 6 149 | hr:=DllCall(NumGet(NumGet(0+p:=NumGet(this+8))+28),"Uint",p,"Uint",prm1,"UintP",pname,"Uint",1,"UintP",0),hr==0?(sfn:=StrGet(this+40) . StrGet(pname),COM_SysFreeString(pname),%sfn%(prm5,this,prm6)):"" 150 | Else If A_EventInfo = 5 151 | hr:=DllCall(NumGet(NumGet(0+p:=NumGet(this+8))+40),"Uint",p,"Uint",prm2,"Uint",prm3,"Uint",prm5) 152 | Else If A_EventInfo = 4 153 | NumPut(0*hr:=0x80004001,prm3+0) 154 | Else If A_EventInfo = 3 155 | NumPut(0,prm1+0) 156 | Else If A_EventInfo = 2 157 | NumPut(hr:=NumGet(this+4)-1,this+4) 158 | Else If A_EventInfo = 1 159 | NumPut(hr:=NumGet(this+4)+1,this+4) 160 | Else If A_EventInfo = 0 161 | COM_IsEqualGUID(this+24,prm1)||InStr("{00020400-0000-0000-C000-000000000046}{00000000-0000-0000-C000-000000000046}",COM_String4GUID(prm1)) ? NumPut(NumPut(NumGet(this+4)+1,this+4)-8,prm2+0):NumPut(0*hr:=0x80004002,prm2+0) 162 | Return hr 163 | } 164 | 165 | COM_DispGetParam(pDispParams, Position = 0, vt = 8) 166 | { 167 | VarSetCapacity(varResult,16,0) 168 | DllCall("oleaut32\DispGetParam", "Uint", pDispParams, "Uint", Position, "Ushort", vt, "Uint", &varResult, "UintP", nArgErr) 169 | Return (vt:=NumGet(varResult,0,"Ushort"))=8?StrGet(NumGet(varResult,8)) . COM_VariantClear(&varResult):vt=9||vt=13?COM_Enwrap(NumGet(varResult,8),vt):NumGet(varResult,8) 170 | } 171 | 172 | COM_DispSetParam(val, pDispParams, Position = 0, vt = 8) 173 | { 174 | Return NumPut(vt=8?COM_SysAllocString(val):vt=9||vt=13?COM_Unwrap(val):val,NumGet(NumGet(pDispParams+0)+(NumGet(pDispParams+8)-Position)*16-8),0,vt=11||vt=2 ? "short":"int") 175 | } 176 | 177 | COM_Error(hr = "", lr = "", pei = "", name = "") 178 | { 179 | Static bDebug:=1 180 | If Not pei 181 | { 182 | bDebug:=hr 183 | Global COM_HR, COM_LR 184 | Return COM_HR&&COM_LR ? COM_LR<<32|COM_HR:COM_HR 185 | } 186 | Else If !bDebug 187 | Return 188 | hr ? (VarSetCapacity(sError,1022),VarSetCapacity(nError,62),DllCall("kernel32\FormatMessage","Uint",0x1200,"Uint",0,"Uint",hr<>0x80020009?hr:(bExcep:=1)*(hr:=NumGet(pei+28))?hr:hr:=NumGet(pei+0,0,"Ushort")+0x80040200,"Uint",0,"str",sError,"Uint",512,"Uint",0),DllCall("kernel32\FormatMessage","Uint",0x2400,"str","0x%1!p!","Uint",0,"Uint",0,"str",nError,"Uint",32,"UintP",hr)):sError:="No COM Dispatch Object!`n",lr?(VarSetCapacity(sError2,1022),VarSetCapacity(nError2,62),DllCall("kernel32\FormatMessage","Uint",0x1200,"Uint",0,"Uint",lr,"Uint",0,"str",sError2,"Uint",512,"Uint",0),DllCall("kernel32\FormatMessage","Uint",0x2400,"str","0x%1!p!","Uint",0,"Uint",0,"str",nError2,"Uint",32,"UintP",lr)):"" 189 | MsgBox, 260, COM Error Notification, % "Function Name:`t""" . name . """`nERROR:`t" . sError . "`t(" . nError . ")" . (bExcep ? SubStr(NumGet(pei+24) ? DllCall(NumGet(pei+24),"Uint",pei) : "",1,0) . "`nPROG:`t" . StrGet(NumGet(pei+4)) . COM_SysFreeString(NumGet(pei+4)) . "`nDESC:`t" . StrGet(NumGet(pei+8)) . COM_SysFreeString(NumGet(pei+8)) . "`nHELP:`t" . StrGet(NumGet(pei+12)) . COM_SysFreeString(NumGet(pei+12)) . "," . NumGet(pei+16) : "") . (lr ? "`n`nERROR2:`t" . sError2 . "`t(" . nError2 . ")" : "") . "`n`nWill Continue?" 190 | IfMsgBox, No, Exit 191 | } 192 | 193 | COM_CreateIDispatch() 194 | { 195 | Static IDispatch 196 | If Not VarSetCapacity(IDispatch) 197 | { 198 | VarSetCapacity(IDispatch,28,0), nParams=3112469 199 | Loop, Parse, nParams 200 | NumPut(RegisterCallback("COM_DispInterface","",A_LoopField,A_Index-1),IDispatch,4*(A_Index-1)) 201 | } 202 | Return &IDispatch 203 | } 204 | 205 | COM_GetDefaultInterface(pdisp) 206 | { 207 | DllCall(NumGet(NumGet(1*pdisp) +12), "Uint", pdisp , "UintP", ctinf) 208 | If ctinf 209 | { 210 | DllCall(NumGet(NumGet(1*pdisp)+16), "Uint", pdisp, "Uint" , 0, "Uint", 1024, "UintP", ptinf) 211 | DllCall(NumGet(NumGet(1*ptinf)+12), "Uint", ptinf, "UintP", pattr) 212 | DllCall(NumGet(NumGet(1*pdisp)+ 0), "Uint", pdisp, "Uint" , pattr, "UintP", ppv) 213 | DllCall(NumGet(NumGet(1*ptinf)+76), "Uint", ptinf, "Uint" , pattr) 214 | DllCall(NumGet(NumGet(1*ptinf)+ 8), "Uint", ptinf) 215 | If ppv 216 | DllCall(NumGet(NumGet(1*pdisp)+ 8), "Uint", pdisp), pdisp := ppv 217 | } 218 | Return pdisp 219 | } 220 | 221 | COM_GetDefaultEvents(pdisp) 222 | { 223 | DllCall(NumGet(NumGet(1*pdisp)+16), "Uint", pdisp, "Uint" , 0, "Uint", 1024, "UintP", ptinf) 224 | DllCall(NumGet(NumGet(1*ptinf)+12), "Uint", ptinf, "UintP", pattr) 225 | VarSetCapacity(IID,16),DllCall("kernel32\RtlMoveMemory","Uint",&IID,"Uint",pattr,"Uint",16) 226 | DllCall(NumGet(NumGet(1*ptinf)+76), "Uint", ptinf, "Uint" , pattr) 227 | DllCall(NumGet(NumGet(1*ptinf)+72), "Uint", ptinf, "UintP", ptlib, "UintP", idx) 228 | DllCall(NumGet(NumGet(1*ptinf)+ 8), "Uint", ptinf) 229 | Loop, % DllCall(NumGet(NumGet(1*ptlib)+12), "Uint", ptlib) 230 | { 231 | DllCall(NumGet(NumGet(1*ptlib)+20), "Uint", ptlib, "Uint", A_Index-1, "UintP", TKind) 232 | If TKind <> 5 233 | Continue 234 | DllCall(NumGet(NumGet(1*ptlib)+16), "Uint", ptlib, "Uint", A_Index-1, "UintP", ptinf) 235 | DllCall(NumGet(NumGet(1*ptinf)+12), "Uint", ptinf, "UintP", pattr) 236 | nCount:=NumGet(pattr+48,0,"Ushort") 237 | DllCall(NumGet(NumGet(1*ptinf)+76), "Uint", ptinf, "Uint" , pattr) 238 | Loop, % nCount 239 | { 240 | DllCall(NumGet(NumGet(1*ptinf)+36), "Uint", ptinf, "Uint", A_Index-1, "UintP", nFlags) 241 | If !(nFlags & 1) 242 | Continue 243 | DllCall(NumGet(NumGet(1*ptinf)+32), "Uint", ptinf, "Uint", A_Index-1, "UintP", hRefType) 244 | DllCall(NumGet(NumGet(1*ptinf)+56), "Uint", ptinf, "Uint", hRefType , "UintP", prinf) 245 | DllCall(NumGet(NumGet(1*prinf)+12), "Uint", prinf, "UintP", pattr) 246 | nFlags & 2 ? DIID:=COM_String4GUID(pattr) : bFind:=COM_IsEqualGUID(pattr,&IID) 247 | DllCall(NumGet(NumGet(1*prinf)+76), "Uint", prinf, "Uint" , pattr) 248 | DllCall(NumGet(NumGet(1*prinf)+ 8), "Uint", prinf) 249 | } 250 | DllCall(NumGet(NumGet(1*ptinf)+ 8), "Uint", ptinf) 251 | If bFind 252 | Break 253 | } 254 | DllCall(NumGet(NumGet(1*ptlib)+ 8), "Uint", ptlib) 255 | Return bFind ? DIID : "{00000000-0000-0000-0000-000000000000}" 256 | } 257 | 258 | COM_GetGuidOfName(pdisp, Name) 259 | { 260 | DllCall(NumGet(NumGet(1*pdisp)+16), "Uint", pdisp, "Uint", 0, "Uint", 1024, "UintP", ptinf) 261 | DllCall(NumGet(NumGet(1*ptinf)+72), "Uint", ptinf, "UintP", ptlib, "UintP", idx) 262 | DllCall(NumGet(NumGet(1*ptinf)+ 8), "Uint", ptinf), ptinf:=0 263 | DllCall(NumGet(NumGet(1*ptlib)+44), "Uint", ptlib, "Uint", &Name, "Uint", 0, "UintP", ptinf, "UintP", memID, "UshortP", 1) 264 | DllCall(NumGet(NumGet(1*ptlib)+ 8), "Uint", ptlib) 265 | DllCall(NumGet(NumGet(1*ptinf)+12), "Uint", ptinf, "UintP", pattr) 266 | GUID := COM_String4GUID(pattr) 267 | DllCall(NumGet(NumGet(1*ptinf)+76), "Uint", ptinf, "Uint" , pattr) 268 | DllCall(NumGet(NumGet(1*ptinf)+ 8), "Uint", ptinf) 269 | Return GUID 270 | } 271 | 272 | COM_GetTypeInfoOfGuid(pdisp, GUID) 273 | { 274 | DllCall(NumGet(NumGet(1*pdisp)+16), "Uint", pdisp, "Uint", 0, "Uint", 1024, "UintP", ptinf) 275 | DllCall(NumGet(NumGet(1*ptinf)+72), "Uint", ptinf, "UintP", ptlib, "UintP", idx) 276 | DllCall(NumGet(NumGet(1*ptinf)+ 8), "Uint", ptinf), ptinf := 0 277 | DllCall(NumGet(NumGet(1*ptlib)+24), "Uint", ptlib, "Uint", COM_GUID4String(GUID,GUID), "UintP", ptinf) 278 | DllCall(NumGet(NumGet(1*ptlib)+ 8), "Uint", ptlib) 279 | Return ptinf 280 | } 281 | 282 | COM_ConnectObject(pdisp, prefix = "", DIID = "") 283 | { 284 | pdisp:= COM_Unwrap(pdisp) 285 | If Not DIID 286 | 0+(pconn:=COM_FindConnectionPoint(pdisp,"{00020400-0000-0000-C000-000000000046}")) ? (DIID:=COM_GetConnectionInterface(pconn))="{00020400-0000-0000-C000-000000000046}" ? DIID:=COM_GetDefaultEvents(pdisp):"":pconn:=COM_FindConnectionPoint(pdisp,DIID:=COM_GetDefaultEvents(pdisp)) 287 | Else pconn:=COM_FindConnectionPoint(pdisp,SubStr(DIID,1,1)="{" ? DIID:DIID:=COM_GetGuidOfName(pdisp,DIID)) 288 | If !pconn||!ptinf:=COM_GetTypeInfoOfGuid(pdisp,DIID) 289 | { 290 | MsgBox, No Event Interface Exists! 291 | Return 292 | } 293 | NumPut(pdisp,NumPut(ptinf,NumPut(1,NumPut(COM_CreateIDispatch(),0+psink:=COM_CoTaskMemAlloc(40+nSize:=StrLen(prefix)*2+2))))) 294 | DllCall("kernel32\RtlMoveMemory","Uint",psink+24,"Uint",COM_GUID4String(DIID,DIID),"Uint",16) 295 | DllCall("kernel32\RtlMoveMemory","Uint",psink+40,"Uint",&prefix,"Uint",nSize) 296 | NumPut(COM_Advise(pconn,psink),NumPut(pconn,psink+16)) 297 | Return psink 298 | } 299 | 300 | COM_DisconnectObject(psink) 301 | { 302 | Return COM_Unadvise(NumGet(psink+16),NumGet(psink+20))=0 ? (0,COM_Release(NumGet(psink+16)),COM_Release(NumGet(psink+8)),COM_CoTaskMemFree(psink)):1 303 | } 304 | 305 | COM_CreateObject(CLSID, IID = "", CLSCTX = 21) 306 | { 307 | ppv := COM_CreateInstance(CLSID,IID,CLSCTX) 308 | Return IID=="" ? COM_Enwrap(ppv):ppv 309 | } 310 | 311 | COM_GetObject(Name) 312 | { 313 | COM_Init() 314 | If DllCall("ole32\CoGetObject", "Uint", &Name, "Uint", 0, "Uint", COM_GUID4String(IID_IDispatch,"{00020400-0000-0000-C000-000000000046}"), "UintP", pdisp)=0 315 | Return COM_Enwrap(pdisp) 316 | } 317 | 318 | COM_GetActiveObject(CLSID) 319 | { 320 | COM_Init() 321 | If DllCall("oleaut32\GetActiveObject", "Uint", COM_GUID4String(CLSID,CLSID), "Uint", 0, "UintP", punk)=0 322 | && DllCall(NumGet(NumGet(1*punk)), "Uint", punk, "Uint", COM_GUID4String(IID_IDispatch,"{00020400-0000-0000-C000-000000000046}"), "UintP", pdisp)+DllCall(NumGet(NumGet(1*punk)+8), "Uint", punk)*0=0 323 | Return COM_Enwrap(pdisp) 324 | } 325 | 326 | COM_CreateInstance(CLSID, IID = "", CLSCTX = 21) 327 | { 328 | COM_Init() 329 | If DllCall("ole32\CoCreateInstance", "Uint", COM_GUID4String(CLSID,CLSID), "Uint", 0, "Uint", CLSCTX, "Uint", COM_GUID4String(IID,IID ? IID:IID=0 ? "{00000000-0000-0000-C000-000000000046}":"{00020400-0000-0000-C000-000000000046}"), "UintP", ppv)=0 330 | Return ppv 331 | } 332 | 333 | COM_CLSID4ProgID(ByRef CLSID, ProgID) 334 | { 335 | VarSetCapacity(CLSID,16,0) 336 | DllCall("ole32\CLSIDFromProgID", "Uint", &ProgID, "Uint", &CLSID) 337 | Return &CLSID 338 | } 339 | 340 | COM_ProgID4CLSID(pCLSID) 341 | { 342 | DllCall("ole32\ProgIDFromCLSID", "Uint", pCLSID, "UintP", pProgID) 343 | Return StrGet(pProgID) . COM_CoTaskMemFree(pProgID) 344 | } 345 | 346 | COM_GUID4String(ByRef CLSID, String) 347 | { 348 | VarSetCapacity(CLSID,16,0) 349 | DllCall("ole32\CLSIDFromString", "Uint", &String, "Uint", &CLSID) 350 | Return &CLSID 351 | } 352 | 353 | COM_String4GUID(pGUID) 354 | { 355 | VarSetCapacity(String,38*2) 356 | DllCall("ole32\StringFromGUID2", "Uint", pGUID, "str", String, "int", 39) 357 | Return String 358 | } 359 | 360 | COM_IsEqualGUID(pGUID1, pGUID2) 361 | { 362 | Return DllCall("ole32\IsEqualGUID", "Uint", pGUID1, "Uint", pGUID2) 363 | } 364 | 365 | COM_CoCreateGuid() 366 | { 367 | VarSetCapacity(GUID,16,0) 368 | DllCall("ole32\CoCreateGuid", "Uint", &GUID) 369 | Return COM_String4GUID(&GUID) 370 | } 371 | 372 | COM_CoInitialize() 373 | { 374 | Return DllCall("ole32\CoInitialize", "Uint", 0) 375 | } 376 | 377 | COM_CoUninitialize() 378 | { 379 | DllCall("ole32\CoUninitialize") 380 | } 381 | 382 | COM_CoTaskMemAlloc(cb) 383 | { 384 | Return DllCall("ole32\CoTaskMemAlloc", "Uint", cb) 385 | } 386 | 387 | COM_CoTaskMemFree(pv) 388 | { 389 | DllCall("ole32\CoTaskMemFree", "Uint", pv) 390 | } 391 | 392 | COM_SysAllocString(str) 393 | { 394 | Return DllCall("oleaut32\SysAllocString", "Uint", &str) 395 | } 396 | 397 | COM_SysFreeString(pstr) 398 | { 399 | DllCall("oleaut32\SysFreeString", "Uint", pstr) 400 | } 401 | 402 | COM_SafeArrayDestroy(psar) 403 | { 404 | Return DllCall("oleaut32\SafeArrayDestroy", "Uint", psar) 405 | } 406 | 407 | COM_VariantClear(pvar) 408 | { 409 | DllCall("oleaut32\VariantClear", "Uint", pvar) 410 | } 411 | 412 | COM_VariantChangeType(pvarDst, pvarSrc, vt = 8) 413 | { 414 | Return DllCall("oleaut32\VariantChangeTypeEx", "Uint", pvarDst, "Uint", pvarSrc, "Uint", 1024, "Ushort", 0, "Ushort", vt) 415 | } 416 | 417 | COM_SysString(ByRef wString, sString) 418 | { 419 | VarSetCapacity(wString,4+nLen:=2*StrLen(sString)) 420 | Return DllCall("kernel32\lstrcpyW","Uint",NumPut(nLen,wString),"Uint",&sString) 421 | } 422 | 423 | COM_AccInit() 424 | { 425 | Static h 426 | If Not h 427 | COM_Init(), h:=DllCall("kernel32\LoadLibrary","str","oleacc") 428 | } 429 | 430 | COM_AccTerm() 431 | { 432 | COM_Term() 433 | } 434 | 435 | COM_AccessibleChildren(pacc, cChildren, ByRef varChildren) 436 | { 437 | VarSetCapacity(varChildren,cChildren*16,0) 438 | If DllCall("oleacc\AccessibleChildren", "Uint", COM_Unwrap(pacc), "Uint", 0, "Uint", cChildren+0, "Uint", &varChildren, "UintP", cChildren:=0)=0 439 | Return cChildren 440 | } 441 | 442 | COM_AccessibleObjectFromEvent(hWnd, idObject, idChild, ByRef _idChild_="") 443 | { 444 | COM_AccInit(), VarSetCapacity(varChild,16,0) 445 | If DllCall("oleacc\AccessibleObjectFromEvent", "Uint", hWnd, "Uint", idObject, "Uint", idChild, "UintP", pacc, "Uint", &varChild)=0 446 | Return COM_Enwrap(pacc), _idChild_:=NumGet(varChild,8) 447 | } 448 | 449 | COM_AccessibleObjectFromPoint(x, y, ByRef _idChild_="") 450 | { 451 | COM_AccInit(), VarSetCapacity(varChild,16,0) 452 | If DllCall("oleacc\AccessibleObjectFromPoint", "int", x, "int", y, "UintP", pacc, "Uint", &varChild)=0 453 | Return COM_Enwrap(pacc), _idChild_:=NumGet(varChild,8) 454 | } 455 | 456 | COM_AccessibleObjectFromWindow(hWnd, idObject=-4, IID = "") 457 | { 458 | COM_AccInit() 459 | If DllCall("oleacc\AccessibleObjectFromWindow", "Uint", hWnd, "Uint", idObject, "Uint", COM_GUID4String(IID, IID ? IID : idObject&0xFFFFFFFF==0xFFFFFFF0 ? "{00020400-0000-0000-C000-000000000046}":"{618736E0-3C3D-11CF-810C-00AA00389B71}"), "UintP", pacc)=0 460 | Return COM_Enwrap(pacc) 461 | } 462 | 463 | COM_WindowFromAccessibleObject(pacc) 464 | { 465 | If DllCall("oleacc\WindowFromAccessibleObject", "Uint", COM_Unwrap(pacc), "UintP", hWnd)=0 466 | Return hWnd 467 | } 468 | 469 | COM_GetRoleText(nRole) 470 | { 471 | nLen:= DllCall("oleacc\GetRoleTextW", "Uint", nRole, "Uint", 0, "Uint", 0) 472 | VarSetCapacity(sRole,nLen*2) 473 | If DllCall("oleacc\GetRoleTextW", "Uint", nRole, "str", sRole, "Uint", nLen+1) 474 | Return sRole 475 | } 476 | 477 | COM_GetStateText(nState) 478 | { 479 | nLen:= DllCall("oleacc\GetStateTextW", "Uint", nState, "Uint", 0, "Uint", 0) 480 | VarSetCapacity(sState,nLen*2) 481 | If DllCall("oleacc\GetStateTextW", "Uint", nState, "str", sState, "Uint", nLen+1) 482 | Return sState 483 | } 484 | 485 | COM_AtlAxWinInit(Version = "") 486 | { 487 | Static h 488 | If Not h 489 | COM_Init(), h:=DllCall("kernel32\LoadLibrary","str","atl" . Version), DllCall("atl" . Version . "\AtlAxWinInit") 490 | } 491 | 492 | COM_AtlAxWinTerm(Version = "") 493 | { 494 | COM_Term() 495 | } 496 | 497 | COM_AtlAxGetHost(hWnd, Version = "") 498 | { 499 | If DllCall("atl" . Version . "\AtlAxGetHost", "Uint", hWnd, "UintP", punk)=0 500 | Return COM_Enwrap(COM_QueryInterface(punk)+COM_Release(punk)*0) 501 | } 502 | 503 | COM_AtlAxGetControl(hWnd, Version = "") 504 | { 505 | If DllCall("atl" . Version . "\AtlAxGetControl", "Uint", hWnd, "UintP", punk)=0 506 | Return COM_Enwrap(COM_QueryInterface(punk)+COM_Release(punk)*0) 507 | } 508 | 509 | COM_AtlAxAttachControl(pdsp, hWnd, Version = "") 510 | { 511 | If DllCall("atl" . Version . "\AtlAxAttachControl", "Uint", punk:=COM_QueryInterface(pdsp,0), "Uint", hWnd, "Uint", COM_AtlAxWinInit(Version))+COM_Release(punk)*0=0 512 | Return COM_Enwrap(pdsp) 513 | } 514 | 515 | COM_AtlAxCreateControl(hWnd, Name, Version = "") 516 | { 517 | If DllCall("atl" . Version . "\AtlAxCreateControl", "Uint", &Name, "Uint", hWnd, "Uint", 0, "Uint", COM_AtlAxWinInit(Version))=0 518 | Return COM_AtlAxGetControl(hWnd,Version) 519 | } 520 | 521 | COM_AtlAxCreateContainer(hWnd, l, t, w, h, Name = "", Version = "") 522 | { 523 | Return DllCall("user32\CreateWindowEx", "Uint",0x200, "str", "AtlAxWin" . Version, "Uint", Name?&Name:0, "Uint", 0x54000000, "int", l, "int", t, "int", w, "int", h, "Uint", hWnd, "Uint", 0, "Uint", 0, "Uint", COM_AtlAxWinInit(Version)) 524 | } 525 | 526 | COM_AtlAxGetContainer(pdsp, bCtrl = "") 527 | { 528 | DllCall(NumGet(NumGet(1*pdsp:=COM_Unwrap(pdsp))), "Uint", pdsp, "Uint", COM_GUID4String(IID_IOleWindow,"{00000114-0000-0000-C000-000000000046}"), "UintP", pwin) 529 | DllCall(NumGet(NumGet(1*pwin)+12), "Uint", pwin, "UintP", hCtrl) 530 | DllCall(NumGet(NumGet(1*pwin)+ 8), "Uint", pwin) 531 | Return bCtrl?hCtrl:DllCall("user32\GetParent", "Uint", hCtrl) 532 | } 533 | 534 | COM_ScriptControl(sCode, sEval = "", sName = "", Obj = "", bGlobal = "") 535 | { 536 | oSC:=COM_CreateObject("ScriptControl"), oSC.Language(sEval+0==""?"VBScript":"JScript"), sName&&Obj?oSC.AddObject(sName,Obj,bGlobal):"" 537 | Return sEval?oSC.Eval(sEval+0?sCode:sEval oSC.AddCode(sCode)):oSC.ExecuteStatement(sCode) 538 | } 539 | 540 | COM_Parameter(typ, prm = "", nam = "") 541 | { 542 | Return IsObject(prm)?prm:Object("typ_",typ,"prm_",prm,"nam_",nam) 543 | } 544 | 545 | COM_Enwrap(obj, vt = 9) 546 | { 547 | Static base 548 | Return IsObject(obj)?obj:Object("prm_",obj,"typ_",vt,"base",base?base:base:=Object("__Delete","COM_Invoke","__Call","COM_Invoke","__Get","COM_Invoke","__Set","COM_InvokeSet","base",Object("__Delete","COM_Term"))) 549 | } 550 | 551 | COM_Unwrap(obj) 552 | { 553 | Return IsObject(obj)?obj.prm_:obj 554 | } 555 | -------------------------------------------------------------------------------- /inc/m/ComboX.ahk: -------------------------------------------------------------------------------- 1 | /* Title: ComboX 2 | 3 | Impose ComboBox like behavior on arbitrary control. 4 | : 5 | To create ComboX control, first create any kind of control and initialize it using function. 6 | After that, control will be stay visible only from the moment it is shown (via or ) 7 | until it losses focus. You can optionally create trigger button for the ComboX control that will be used 8 | for showing and positioning of the control. 9 | 10 | (see ComboX.png) 11 | 12 | Dependency: 13 | Win 1.24++ 14 | */ 15 | 16 | /* 17 | Function: Hide 18 | Hide ComboX control. 19 | 20 | Parameters: 21 | hCombo - Handle of the control. 22 | */ 23 | ComboX_Hide( HCtrl ) { 24 | Win_Show( HCtrl, false ) 25 | handler := ComboX(HCtrl "Handler") 26 | if handler != 27 | %handler%(HCtrl, "Hide") 28 | } 29 | 30 | /* 31 | Function: Set 32 | Initializes control as a ComboX control. 33 | 34 | Parameters: 35 | HCtrl - Handle of the control to be affected. 36 | Handler - Notification handler. Optional. 37 | Options - Space separated list of options, see below. Optional, by default "Esc Enter". 38 | 39 | Options: 40 | Space, Esc, Enter, Click - Specifing one or more of these keys controls when to hide ComboX control. 41 | Hwnd - Handle of the glue control in integer format. This control represents the "arrow button" in normal ComboBox control. When ComboX control is shown, 42 | it will be positioned relative to the glue control. 43 | PHW - Letters specifying how control is positioned relative to the glue control. P specifies on which corner of glue control to bind (1..4), 44 | W how width is expanded L (left) R(right), H how height is expanded U (up) D (down). 45 | For instance 4LD mimic standard ComboBox control. 46 | 47 | Handler: 48 | > OnComboX( Hwnd, Event ) 49 | 50 | Hwnd - Handle of the control that triggered event. 51 | Event - "Show", "Hide" or "Select". Space and Enter will trigger "Select" event after control is hidden. Esc and loosing focus will triger "Hide" event after control is hidden. 52 | "Show" event is triggered before control is shown as a call to or functions. 53 | 54 | Remarks: 55 | Some controls may have their g labels not working after being set as ComboX control. 56 | */ 57 | ComboX_Set( HCtrl, Options="", Handler="") { 58 | ifEqual, Options,,SetEnv, Options, esc enter 59 | 60 | HCtrl += 0 61 | Win_Show(HCtrl, false) 62 | oldParent := Win_SetParent(HCtrl, 0, true) 63 | Win_Subclass(HCtrl, "ComboX_wndProc") 64 | 65 | RegExMatch(Options, "S)[\d]+(?=$|[ ])", out) 66 | ComboX( HCtrl "HButton", out+0) 67 | 68 | RegExMatch(Options, "Si)[1-4][LR][UD]", out) 69 | ComboX( HCtrl "Pos", out) 70 | ComboX( HCtrl "Options", Options) 71 | if IsFunc(Handler) 72 | ComboX( HCtrl "Handler", Handler) 73 | 74 | Win_SetOwner( HCtrl, oldParent ) 75 | } 76 | 77 | /* 78 | Function: Show 79 | Show ComboX control. Sets ComboX_Active to currently shown control. 80 | 81 | Parameters: 82 | HCtrl - Handle of the control. 83 | X,Y,W,H - Optional screen coordinates on which to show control and its width and height. 84 | */ 85 | ComboX_Show( HCtrl, X="", Y="", W="", H="" ) { 86 | HCtrl += 0 87 | ComboX("", HCtrl ")Handler HButton Pos", handler, hBtn, pos) 88 | 89 | if (X Y = "") { 90 | if (hBtn != "") 91 | ComboX_setPosition(HCtrl, pos, hBtn, W, H) 92 | } 93 | else Win_Move(HCtrl, X, Y, W, H) 94 | 95 | if handler != 96 | %handler%(HCtrl, "Show") 97 | Win_Show(HCtrl) 98 | } 99 | 100 | 101 | /* 102 | Function: Toggle 103 | Toggle ComboX control. 104 | 105 | Parameters: 106 | HCtrl - Handle of the control. 107 | */ 108 | ComboX_Toggle(HCtrl) { 109 | return Win_Is(HCtrl, "visible") ? ComboX_Hide(HCtrl) : ComboX_Show(HCtrl) 110 | } 111 | 112 | ;==================================== PRIVATE =================================== 113 | 114 | ComboX_wndProc(Hwnd, UMsg, WParam, LParam){ 115 | static WM_KEYDOWN = 0x100, WM_KILLFOCUS=8, WM_LBUTTONDOWN=0x201, WM_LBUTTONUP=0x202, VK_ESCAPE=27, VK_ENTER=13, VK_SPACE=32 116 | 117 | critical ;safe, always in new thread 118 | 119 | res := DllCall("CallWindowProcA", "UInt", A_EventInfo, "UInt", Hwnd, "UInt", UMsg, "UInt", WParam, "UInt", LParam) 120 | 121 | ComboX("", Hwnd ")Handler Options HButton", handler, op, hBtn) 122 | 123 | if (UMsg = WM_KILLFOCUS) 124 | return ComboX_Hide(Hwnd) 125 | 126 | if (UMsg = WM_KEYDOWN) 127 | if (WParam = VK_ESCAPE) && InStr(op, "esc") 128 | ComboX_Hide(Hwnd) 129 | else if ((WParam = VK_ENTER) && InStr(op, "enter")) || ((WParam = VK_SPACE) && InStr(op, "space")) 130 | goto %A_ThisFunc% 131 | 132 | if (Umsg = WM_LBUTTONUP) && InStr(op, "click") 133 | goto %A_ThisFunc% 134 | 135 | return res 136 | 137 | ComboX_wndProc: 138 | ComboX_Hide(Hwnd) 139 | if handler != 140 | %handler%(Hwnd, "Select") 141 | return 142 | } 143 | 144 | ComboX_setPosition( HCtrl, Pos, Hwnd, W="", H="" ) { 145 | ifEqual, Pos, , SetEnv, Pos, 4LD 146 | StringSplit, p, Pos 147 | 148 | Win_Get(Hwnd, "Rxywh", x, y, w, h) 149 | Win_Get(HCtrl, "Rwh", cw, ch) ;4LU 150 | 151 | cx := (p1=1 || p1=3 ? x : x + w) + (p2="R" ? 0 : -cw) 152 | cy := (p1=1 || p1=2 ? y : y + h) + (p3="D" ? 0 : -ch) 153 | Win_Move(HCtrl, cx, cy, W, H) 154 | } 155 | 156 | ;Storage 157 | ComboX(var="", value="~`a", ByRef o1="", ByRef o2="", ByRef o3="", ByRef o4="", ByRef o5="", ByRef o6="") { 158 | static 159 | if (var = "" ){ 160 | if ( _ := InStr(value, ")") ) 161 | __ := SubStr(value, 1, _-1), value := SubStr(value, _+1) 162 | loop, parse, value, %A_Space% 163 | _ := %__%%A_LoopField%, o%A_Index% := _ != "" ? _ : %A_LoopField% 164 | return 165 | } else _ := %var% 166 | ifNotEqual, value, ~`a, SetEnv, %var%, %value% 167 | return _ 168 | } 169 | 170 | 171 | #include *i Win.ahk 172 | #include *i inc\Win.ahk 173 | 174 | 175 | /* Group: About 176 | o Ver 2.02 by majkinetor. 177 | o Licensed under BSD 178 | */ -------------------------------------------------------------------------------- /inc/m/DDE.ahk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/inc/m/DDE.ahk -------------------------------------------------------------------------------- /inc/m/ErrMsg.ahk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/inc/m/ErrMsg.ahk -------------------------------------------------------------------------------- /inc/m/HLink.ahk: -------------------------------------------------------------------------------- 1 | /* Title: HLink 2 | HyperLink control. 3 | */ 4 | 5 | /* 6 | Function: Add 7 | Creates hyperlink control. 8 | 9 | Parameters: 10 | hGui - Handle of the parent GUI. 11 | X..H - Size & position. 12 | Handler - Notification handler. If you omit handler, link will be opened in default browser when clicked. 13 | Text - Link text. Link is text between the ' char followd by the : char and location (as Textille mark-up). 14 | Everything else will be displayed as ordinary text. 15 | 16 | Notifications: 17 | > Result := OnLink(hWnd, Text, Link) 18 | 19 | hWnd - Handle of the HLink control that generated notification. 20 | Text - Text of the control. 21 | Link - Link of the control. 22 | 23 | Returns: 24 | Handle of the new control or 0 on failure. 25 | Example: 26 | > hLink := HLink_Add(hGui, "OnLink", 10, 10, 200, 20, "Click 'here':www.Google.com to go to Google") 27 | */ 28 | HLink_Add(hGui, X, Y, W, H, Handler="", Text="'HLink Control':"){ 29 | static MODULEID 30 | static ICC_LINK_CLASS=0x8000, WS_CHILD=0x40000000, WS_VISIBLE=0x10000000, WS_TABSTOP=0x10000 31 | static id=1 32 | 33 | if MODULEID = 34 | { 35 | old := OnMessage(0x4E, "HLink_onNotify"), MODULEID := 170608 36 | if old != HLink_onNotify 37 | HLink("oldNotify", RegisterCallback(old)) 38 | 39 | VarSetCapacity(ICC, 8, 0), NumPut(8, ICC, 0) 40 | DllCall("comctl32.dll\InitCommonControlsEx", "uint", &ICC) 41 | } 42 | 43 | Text := RegExReplace(Text, "'(.+?)'\:([^ ]*)", "$1") 44 | hCtrl := DllCall("CreateWindowEx" 45 | ,"Uint", 0 46 | ,"str", "SysLink" 47 | ,"str", Text 48 | ,"Uint", WS_CHILD | WS_VISIBLE | WS_TABSTOP 49 | ,"int", X, "int", Y, "int", W, "int", H 50 | ,"Uint", hGui 51 | ,"Uint", MODULEID 52 | ,"Uint", 0 53 | ,"Uint", 0, "Uint") 54 | ifEqual, hCtrl, 0, return 0 55 | 56 | if IsFunc(Handler) 57 | HLink(hCtrl "handler", Handler) 58 | 59 | return hCtrl 60 | } 61 | 62 | ;========================= PRIVATE ========================================== 63 | 64 | HLink_onNotify(Wparam, Lparam, Msg, Hwnd){ 65 | static MODULEID := 170608, oldNotify="*" 66 | static NM_CLICK = -2, NM_ENTER = -4 67 | 68 | if (_ := (NumGet(Lparam+4))) != MODULEID 69 | ifLess _, 10000, return ;if ahk control, return asap (AHK increments control ID starting from 1. Custom controls use IDs > 10000 as its unlikely that u will use more then 10K ahk controls. 70 | else { 71 | ifEqual, oldNotify, *, SetEnv, oldNotify, % HLink("oldNotify") 72 | if oldNotify != 73 | return DllCall(oldNotify, "uint", Wparam, "uint", Lparam, "uint", Msg, "uint", Hwnd) 74 | } 75 | 76 | hw := NumGet(Lparam+0), code := NumGet(Lparam+8, 0, "Int") 77 | 78 | if code not in %NM_CLICK%,%NM_ENTER% 79 | return 80 | 81 | ControlGetText, txt, ,ahk_id %hw% 82 | RegExmatch(txt, "\Q(.+?)", out) 83 | StringReplace, txt, txt, %out%, %out2% 84 | 85 | handler := HLink(hw "Handler") 86 | if (handler = "") 87 | Run, %out1% 88 | else if ( %handler%(hw, txt, out1) ) 89 | Run, %out1% 90 | } 91 | 92 | ;Mini storage function 93 | HLink(var="", value="~`a") { 94 | static 95 | _ := %var% 96 | ifNotEqual, value, ~`a, SetEnv, %var%, %value% 97 | return _ 98 | } 99 | 100 | 101 | ;Required function by Forms framework. 102 | HLink_add2Form(hParent, Txt, Opt) { 103 | static f := "Form_Parse" 104 | 105 | %f%(Opt, "x# y# w# h# g*", x, y, w, h, handler) 106 | x .= x = "" ? 0 : "", y .= y = "" ? 0 : "", w .= w="" ? 100 : "", h .= h = "" ? 25 : "" 107 | return HLink_Add(hParent, x, y, w, h, handler, Txt) 108 | } 109 | 110 | 111 | /* Group: Examples 112 | (start code) 113 | #SingleInstance force 114 | 115 | Gui, +LastFound 116 | hGui := WinExist() +0 117 | 118 | HLink_Add(hGui, 10, 10, 250, 20, "OnLink", "Click 'here':www.Google.com to go to Google" ) 119 | HLink_Add(hGui, 10, 40, 250, 20, "OnLink", "Click 'this link':www.Yahoo.com to go to Yahoo") 120 | HLink_Add(hGui, 10, 170, 100, 20, "OnLink", "'About HLink':About") 121 | HLink_Add(hGui, 110, 170, 100, 20, "OnLink", "'Forum':http://www.autohotkey.com/forum/topic19508.html") 122 | HLink_Add(hGui, 10, 60, 100, 20, "", "'Google':www.Google.com) ;without handler 123 | Gui, Show, w300 h200 124 | return 125 | 126 | OnLink(hCtrl, Text, Link){ 127 | if Link = About 128 | msgbox Hlink control`nby majkinetor 129 | else return 1 130 | 131 | } 132 | (end code) 133 | */ 134 | 135 | /* Group: About 136 | o Ver 2.01 by majkinetor. See http://www.autohotkey.com/forum/topic19508.html 137 | o HLink Reference at MSDN: 138 | o Licensed under GNU GPL 139 | */ 140 | -------------------------------------------------------------------------------- /inc/m/Ini.ahk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/inc/m/Ini.ahk -------------------------------------------------------------------------------- /inc/m/Plugins.ahk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/inc/m/Plugins.ahk -------------------------------------------------------------------------------- /inc/m/ShowMenu.ahk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/inc/m/ShowMenu.ahk -------------------------------------------------------------------------------- /plugins/AnyTag/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/plugins/AnyTag/ReadMe.txt -------------------------------------------------------------------------------- /plugins/AnyTag/anytag.any: -------------------------------------------------------------------------------- 1 | 0=8|Tag|%_tag% 2 | 1=8|Tag Read|%_tag_read% 3 | 2=8|Album|%album% 4 | 3=8|Artist|%artist% 5 | 4=8|Comment|%comment% 6 | 5=8|Genre|%genre% 7 | 6=8|Title|%title% 8 | 7=8|Track|%track% 9 | 8=8|Track (leading zeros)|$num(%track%,2) 10 | 9=8|Year|%year% 11 | 10=8|Bitrate|%_bitrate% 12 | 11=8|Codec|%_codec% 13 | 12=8|Length|%_length% 14 | 13=8|Length (in seconds)|%_length_seconds% 15 | 14=8|Mode|%_mode% 16 | 15=8|Samplerate|%_samplerate% 17 | 16=8|TagSize|%_tag_size% 18 | 17=8|Extra information|%_extra% -------------------------------------------------------------------------------- /plugins/AnyTag/anytag.wdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/plugins/AnyTag/anytag.wdx -------------------------------------------------------------------------------- /plugins/AnyTag/pluginst.inf: -------------------------------------------------------------------------------- 1 | [plugininstall] 2 | description=anytag 0.98 content plugin for displaying metadata of almost all audio files. 3 | type=wdx 4 | file=anytag.wdx 5 | defaultdir=wdx_anytag 6 | 7 | -------------------------------------------------------------------------------- /plugins/DirCnt.ahk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/plugins/DirCnt.ahk -------------------------------------------------------------------------------- /plugins/FileInfo.ahk: -------------------------------------------------------------------------------- 1 | ;Author: majkinetor 2 | ;Version: 1.0 3 | ;Description: FileInfo associates lines from the "FileInfo.txt" file with the files in the rename list. 4 | ; To treat FileInfo.txt as CSV file pass number of column that you want returned as parameter 5 | ; for instance [FileInfo.5]. 6 | FileInfo: 7 | if (FileInfo_file = "") 8 | FileInfo_Set() 9 | 10 | ;if in preview we don't know where we are so, always search from the beginning 11 | ;if in real renaming, the order is sequential so we can use last index to increase speed. 12 | if (#flag = "prev") 13 | FileInfo_j := 1 14 | else IfEqual, #no, 1, SetEnv, FileInfo_j, 1 15 | 16 | if !(FileInfo_j := InStr(FileInfo_file, "`n" #no, false, FileInfo_j)) 17 | return 18 | 19 | FileInfo_j += StrLen(#no)+2 20 | #tmp := #Res := SubStr(FileInfo_file, FileInfo_j, InStr(FileInfo_file, "`n", false, FileInfo_j) - FileInfo_j) 21 | if #1 is Integer 22 | loop, parse, #tmp, CSV 23 | if A_Index = %#1% 24 | { 25 | #Res := A_LoopField 26 | break 27 | } 28 | 29 | FileInfo_j += StrLen(#tmp) ;save the last index for to increase search speed in real time 30 | return 31 | 32 | 33 | FileInfo_Set(){ 34 | local fn 35 | 36 | FileInfo_file := "`n" 37 | 38 | fn := A_ScriptDir "\plugins\FileInfo.txt" 39 | if !FileExist( fn ) { 40 | FileInfo_file = 41 | (LTrim 42 | 43 | 1=To rename files, using FileInfo, save the text into the 44 | 2=FileInfo.txt text file. Each file in the list will be 45 | 3=associated with line of the text from this file, based 46 | 4=on its position in the list. 47 | 5= 48 | 6=You can set range with [=FileInfo:range] syntax, where 49 | 7=range is specified using the same rules as with [N]. 50 | 8= 51 | 9=FileInfo.txt is located in MRS\plugins folder. 52 | 53 | ) 54 | return 55 | } 56 | 57 | loop, read, %fn% 58 | FileInfo_file .= A_Index "=" A_LoopReadLine "`n" 59 | } 60 | 61 | FileInfo_GetFields: 62 | #Res = * 63 | return -------------------------------------------------------------------------------- /plugins/FileInfo.txt: -------------------------------------------------------------------------------- 1 | Edit FileInfo.txt file in MRS\plugins folder. -------------------------------------------------------------------------------- /plugins/FileX/FileX.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/plugins/FileX/FileX.lng -------------------------------------------------------------------------------- /plugins/FileX/FileX.wdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/plugins/FileX/FileX.wdx -------------------------------------------------------------------------------- /plugins/FileX/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------- 2 | FileX 1.6 3 | ------------------------------------------------------------------------------- 4 | FileX is the TC content plugin for display various information about files. 5 | Plugin provides also some useful fields for search and filtering. 6 | 7 | ------------------------------------------------------------------------------- 8 | Changes History 9 | ------------------------------------------------------------------------------- 10 | Version 1.7 11 | - Added ContentType(MIME) field. 12 | 13 | Version 1.6 14 | - Added field for file extents number 15 | - Added 3 fields for upper level directory names (parent,grandpa,greatgrandpa) 16 | - Added 2 fields for UNC names (server & share) 17 | 18 | Version 1.5 19 | - Fixed bug in owner info for network drives and UNC names 20 | - Fixed wrong(old) directory name in pluginst.inf file. 21 | ------------------------------------------------------------------------------- 22 | 23 | Fields list 24 | - registered file type 25 | - associated program 26 | - depth level relative to disk/share root 27 | - owner name 28 | - owner domain 29 | - owner type 30 | - drive type. 31 | - FullPathLen 32 | - FileNameLen 33 | - PathLen 34 | - ExtLen 35 | - Group 36 | - GroupN 37 | - EmptyDir 38 | - ZeroSizeDir 39 | - Extents 40 | - ParentDir 41 | - GrandPaDir 42 | - GtGrandPaDir 43 | - ShareName 44 | - ServerName 45 | 46 | Groups are defined in FileX.ini in the section [Group]. 47 | Every group defined like 48 | 49 | GroupName=str1:str2:str3 50 | 51 | Extended conditions. 52 | -------------------- 53 | strX can be string prefixed by ?, * or | char. 54 | It allows define aditional conditions based on full filename. 55 | - ? means string MAY be in filename (like extension but anywhere in filename) 56 | - * means string MUST be un filename 57 | - | means string MUST NOT be in filename 58 | 59 | Examples: 60 | Document=doc:pdf:djvu:?book 61 | CDImage=iso:bin:|\MyProjects 62 | 63 | 64 | ------------------------------------------------------------------------------- 65 | Autor: MGP Software Ltd. 66 | Email: support@mgpsoft.com 67 | -------------------------------------------------------------------------------- /plugins/FileX/pluginst.inf: -------------------------------------------------------------------------------- 1 | [plugininstall] 2 | description=FileX 1.7 3 | type=wdx 4 | file=FileX.WDX 5 | defaultdir=FileX 6 | -------------------------------------------------------------------------------- /plugins/Hash.ahk: -------------------------------------------------------------------------------- 1 | ;Author: majkinetor 2 | ;Version: 1.0 3 | ;Description: Returns checksum for the file. Supports CRC32, MD5 and SHA1 4 | ; 5 | Hash: 6 | if #tmp := InStr(Hash_cache_%#1%, #fp ">") 7 | { 8 | #tmp += StrLen(#fp)+1 9 | #Res := SubStr(Hash_cache_%#1%, #tmp, InStr(Hash_cache_%#1%, "`n", false, #tmp) - #tmp) 10 | goto Hash_case 11 | } 12 | 13 | FileGetSize, #tmp, %#fp%, M 14 | if (#tmp >= 64) { 15 | #RES := "> FILE TO BIG" 16 | return 17 | } 18 | Hash_size := File_WriteMemory(#fp, Hash_sData) 19 | #Res := Hash(&Hash_sData, Hash_size, #1), Hash_sData := "" 20 | Hash_cache_%#1% .= #fp ">" #res "`n" 21 | 22 | Hash_case: 23 | if (#2 = "Lower") 24 | StringLower, #Res, #Res 25 | else StringUpper, #Res, #Res 26 | return 27 | 28 | Hash_GetFields: 29 | #Res = 30 | (LTrim 31 | CRC32|Upper|Lower 32 | MD5|Upper|Lower 33 | SHA1|Upper|Lower 34 | ) 35 | return 36 | 37 | #include plugins\_Hash\File.ahk 38 | #include plugins\_Hash\Hash.ahk -------------------------------------------------------------------------------- /plugins/Images/History.txt: -------------------------------------------------------------------------------- 1 | Version 1.42 2 | 3 | Bugfix: now it can read more JPEGs 4 | 5 | Version 1.41 6 | 7 | Bugfix: can not read some JPEGs 8 | Bugfix: PCX width and height shown less by one 9 | 10 | Version 1.4 11 | 12 | New: support for PCX and TIFF 13 | New: Improved JPEG handling 14 | 15 | Version 1.2 16 | 17 | New: support for OS/2 BMPs, PNG and PSD 18 | Bugfix: Plugin may crash when trying to read bad JPEG 19 | Bugfix: Great memory leak 20 | 21 | Version 1.0 22 | 23 | First version. -------------------------------------------------------------------------------- /plugins/Images/History_Rus.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/plugins/Images/History_Rus.txt -------------------------------------------------------------------------------- /plugins/Images/Images.lng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/plugins/Images/Images.lng -------------------------------------------------------------------------------- /plugins/Images/Images.wdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/plugins/Images/Images.wdx -------------------------------------------------------------------------------- /plugins/Images/PlugInst.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/plugins/Images/PlugInst.inf -------------------------------------------------------------------------------- /plugins/Images/Readme.txt: -------------------------------------------------------------------------------- 1 | Image Info v1.42 2 | 3 | This plugin extracts most recent info from images: 4 | Width, Height, BitsPerPixel, PixelFormat, 5 | Compression and Misc(such as Progressive(JPEG) or Interlaced(GIF)). 6 | Supported types: BMP(Win&OS/2), TGA, GIF, JPEG, PNG, PSD, PCX, TIFF(the Information only about the FIRST page!) 7 | 8 | (c)WhiteWind -------------------------------------------------------------------------------- /plugins/Images/Readme_Rus.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/plugins/Images/Readme_Rus.txt -------------------------------------------------------------------------------- /plugins/ShellDetails/ShellDetails.ini: -------------------------------------------------------------------------------- 1 | [{B725F130-47EF-101A-A5F1-02608C9EEBAC}10] 2 | Caption=Name 3 | UseDefault=1 4 | State=17 5 | [{B725F130-47EF-101A-A5F1-02608C9EEBAC}12] 6 | Caption=Size 7 | UseDefault=1 8 | State=18 9 | [{B725F130-47EF-101A-A5F1-02608C9EEBAC}4] 10 | Caption=Type 11 | UseDefault=1 12 | State=17 13 | [{B725F130-47EF-101A-A5F1-02608C9EEBAC}14] 14 | Caption=Date Modified 15 | UseDefault=1 16 | State=19 17 | [{B725F130-47EF-101A-A5F1-02608C9EEBAC}15] 18 | Caption=Date Created 19 | UseDefault=1 20 | State=3 21 | [{B725F130-47EF-101A-A5F1-02608C9EEBAC}16] 22 | Caption=Date Accessed 23 | UseDefault=1 24 | State=131 25 | [{B725F130-47EF-101A-A5F1-02608C9EEBAC}13] 26 | Caption=Attributes 27 | UseDefault=1 28 | State=1 29 | [{D8C3986F-813B-449C-845D-87B95D674ADE}2] 30 | Caption=Status 31 | UseDefault=1 32 | State=129 33 | [{9B174B34-40FF-11D2-A27E-00C04FC30871}4] 34 | Caption=Owner 35 | UseDefault=1 36 | State=97 37 | [{F29F85E0-4FF9-1068-AB91-08002B27B3D9}4] 38 | Caption=Author 39 | UseDefault=1 40 | State=97 41 | [{F29F85E0-4FF9-1068-AB91-08002B27B3D9}2] 42 | Caption=Title 43 | UseDefault=1 44 | State=97 45 | [{F29F85E0-4FF9-1068-AB91-08002B27B3D9}3] 46 | Caption=Subject 47 | UseDefault=1 48 | State=225 49 | [{D5CDD502-2E9C-101B-9397-08002B2CF9AE}2] 50 | Caption=Category 51 | UseDefault=1 52 | State=225 53 | [{F29F85E0-4FF9-1068-AB91-08002B27B3D9}14] 54 | Caption=Pages 55 | UseDefault=1 56 | State=226 57 | [{F29F85E0-4FF9-1068-AB91-08002B27B3D9}6] 58 | Caption=Comments 59 | UseDefault=1 60 | State=97 61 | [{64440492-4C8B-11D1-8B70-080036B11A03}11] 62 | Caption=Copyright 63 | UseDefault=1 64 | State=225 65 | [{56A3372E-CE9C-11D2-9F0E-006097C686F6}2] 66 | Caption=Artist 67 | UseDefault=1 68 | State=97 69 | [{56A3372E-CE9C-11D2-9F0E-006097C686F6}4] 70 | Caption=Album Title 71 | UseDefault=1 72 | State=97 73 | [{56A3372E-CE9C-11D2-9F0E-006097C686F6}5] 74 | Caption=Year 75 | UseDefault=1 76 | State=97 77 | [{56A3372E-CE9C-11D2-9F0E-006097C686F6}7] 78 | Caption=Track Number 79 | UseDefault=1 80 | State=98 81 | [{56A3372E-CE9C-11D2-9F0E-006097C686F6}11] 82 | Caption=Genre 83 | UseDefault=1 84 | State=97 85 | [{64440490-4C8B-11D1-8B70-080036B11A03}3] 86 | Caption=Duration 87 | UseDefault=1 88 | State=97 89 | [{64440490-4C8B-11D1-8B70-080036B11A03}4] 90 | Caption=Bit Rate 91 | UseDefault=1 92 | State=97 93 | [{AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}2] 94 | Caption=Protected 95 | UseDefault=1 96 | State=97 97 | [{14B81DA1-0135-4D31-96D9-6CBFC9671A99}272] 98 | Caption=Camera Model 99 | UseDefault=1 100 | State=97 101 | [{14B81DA1-0135-4D31-96D9-6CBFC9671A99}36867] 102 | Caption=Date Picture Taken 103 | UseDefault=1 104 | State=97 105 | [{6444048F-4C8B-11D1-8B70-080036B11A03}13] 106 | Caption=Dimensions 107 | UseDefault=1 108 | State=97 109 | [{6444048F-4C8B-11D1-8B70-080036B11A03}3] 110 | Caption=Untitled 0 111 | UseDefault=1 112 | State=353 113 | [{6444048F-4C8B-11D1-8B70-080036B11A03}4] 114 | Caption=Untitled 1 115 | UseDefault=1 116 | State=353 117 | [{6D748DE2-8D38-4CC3-AC60-F009B057C557}2] 118 | Caption=Episode Name 119 | UseDefault=1 120 | State=97 121 | [{6D748DE2-8D38-4CC3-AC60-F009B057C557}3] 122 | Caption=Program Description 123 | UseDefault=1 124 | State=97 125 | [{F29F85E0-4FF9-1068-AB91-08002B27B3D9}12] 126 | Caption=Untitled 2 127 | UseDefault=1 128 | State=355 129 | [{64440490-4C8B-11D1-8B70-080036B11A03}6] 130 | Caption=Audio sample size 131 | UseDefault=1 132 | State=97 133 | [{64440490-4C8B-11D1-8B70-080036B11A03}5] 134 | Caption=Audio sample rate 135 | UseDefault=1 136 | State=97 137 | [{64440490-4C8B-11D1-8B70-080036B11A03}7] 138 | Caption=Channels 139 | UseDefault=1 140 | State=97 141 | [{D5CDD502-2E9C-101B-9397-08002B2CF9AE}15] 142 | Caption=Company 143 | UseDefault=1 144 | State=97 145 | [{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}3] 146 | Caption=Description 147 | UseDefault=1 148 | State=97 149 | [{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}4] 150 | Caption=File Version 151 | UseDefault=1 152 | State=97 153 | [{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}7] 154 | Caption=Product Name 155 | UseDefault=1 156 | State=97 157 | [{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}8] 158 | Caption=Product Version 159 | UseDefault=1 160 | State=97 161 | [{F29F85E0-4FF9-1068-AB91-08002B27B3D9}5] 162 | Caption=Keywords 163 | UseDefault=1 164 | State=97 165 | [{28636AA6-953D-11D2-B5D6-00C04FD918D0}11] 166 | Caption=Item type 167 | UseDefault=1 168 | State=1041 169 | [{6D24888F-4718-4BDA-AFED-EA0FB4386CD8}100] 170 | Caption=Offline status 171 | UseDefault=1 172 | State=673 173 | [{A94688B6-7D9F-4570-A648-E3DFC0AB2B3F}100] 174 | Caption=Offline availability 175 | UseDefault=1 176 | State=673 177 | [{28636AA6-953D-11D2-B5D6-00C04FD918D0}9] 178 | Caption=Perceived type 179 | UseDefault=1 180 | State=545 181 | [{1E3EE840-BC2B-476C-8237-2ACD1A839B22}3] 182 | Caption=Kind 183 | UseDefault=1 184 | State=641 185 | [{56A3372E-CE9C-11D2-9F0E-006097C686F6}36] 186 | Caption=Conductors 187 | UseDefault=1 188 | State=131809 189 | [{64440492-4C8B-11D1-8B70-080036B11A03}9] 190 | Caption=Rating 191 | UseDefault=1 192 | State=131681 193 | [{14B81DA1-0135-4D31-96D9-6CBFC9671A99}271] 194 | Caption=Camera maker 195 | UseDefault=1 196 | State=131809 197 | [{F29F85E0-4FF9-1068-AB91-08002B27B3D9}18] 198 | Caption=Program name 199 | UseDefault=1 200 | State=131809 201 | [{293CA35A-09AA-4DD2-B180-1FE245728A52}100] 202 | Caption=Duration 203 | UseDefault=1 204 | State=131809 205 | [{BFEE9149-E3E2-49A7-A862-C05988145CEC}100] 206 | Caption=Is online 207 | UseDefault=1 208 | State=131810 209 | [{315B9C8D-80A9-4EF9-AE16-8E746DA51D70}100] 210 | Caption=Is recurring 211 | UseDefault=1 212 | State=131810 213 | [{F6272D18-CECC-40B1-B26A-3911717AA7BD}100] 214 | Caption=Location 215 | UseDefault=1 216 | State=131809 217 | [{D55BAE5A-3892-417A-A649-C6AC5AAAEAB3}100] 218 | Caption=Optional attendee addresses 219 | UseDefault=1 220 | State=131809 221 | [{09429607-582D-437F-84C3-DE93A2B24C3C}100] 222 | Caption=Optional attendees 223 | UseDefault=1 224 | State=131809 225 | [{744C8242-4DF5-456C-AB9E-014EFB9021E3}100] 226 | Caption=Organizer address 227 | UseDefault=1 228 | State=131809 229 | [{AAA660F9-9865-458E-B484-01BC7FE3973E}100] 230 | Caption=Organizer name 231 | UseDefault=1 232 | State=131809 233 | [{72FC5BA4-24F9-4011-9F3F-ADD27AFAD818}100] 234 | Caption=Reminder time 235 | UseDefault=1 236 | State=131811 237 | [{0BA7D6C3-568D-4159-AB91-781A91FB71E5}100] 238 | Caption=Required attendee addresses 239 | UseDefault=1 240 | State=131809 241 | [{B33AF30B-F552-4584-936C-CB93E5CDA29F}100] 242 | Caption=Required attendees 243 | UseDefault=1 244 | State=131809 245 | [{00F58A38-C54B-4C40-8696-97235980EAE1}100] 246 | Caption=Resources 247 | UseDefault=1 248 | State=131809 249 | [{188C1F91-3C40-4132-9EC5-D8B03B72A8A2}100] 250 | Caption=Meeting status 251 | UseDefault=1 252 | State=131809 253 | [{5BF396D4-5EB2-466F-BDE9-2FB3F2361D6E}100] 254 | Caption=Free/busy status 255 | UseDefault=1 256 | State=131809 257 | [{9B174B35-40FF-11D2-A27E-00C04FC30871}3] 258 | Caption=Total size 259 | UseDefault=1 260 | State=131810 261 | [{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}9] 262 | Caption=Account name 263 | UseDefault=1 264 | State=131809 265 | [{BE1A72C6-9A1D-46B7-AFE7-AFAF8CEF4999}100] 266 | Caption=Task status 267 | UseDefault=1 268 | State=131809 269 | [{28636AA6-953D-11D2-B5D6-00C04FD918D0}5] 270 | Caption=Computer 271 | UseDefault=1 272 | State=673 273 | [{9AD5BADB-CEA7-4470-A03D-B84E51B9949E}100] 274 | Caption=Anniversary 275 | UseDefault=1 276 | State=131811 277 | [{CD102C9C-5540-4A88-A6F6-64E4981C8CD1}100] 278 | Caption=Assistant's name 279 | UseDefault=1 280 | State=131809 281 | [{9A93244D-A7AD-4FF8-9B99-45EE4CC09AF6}100] 282 | Caption=Assistant's phone 283 | UseDefault=1 284 | State=131809 285 | [{176DC63C-2688-4E89-8143-A347800F25E9}47] 286 | Caption=Birthday 287 | UseDefault=1 288 | State=131811 289 | [{730FB6DD-CF7C-426B-A03F-BD166CC9EE24}100] 290 | Caption=Business address 291 | UseDefault=1 292 | State=131809 293 | [{402B5934-EC5A-48C3-93E6-85E86A2D934E}100] 294 | Caption=Business city 295 | UseDefault=1 296 | State=131809 297 | [{B0B87314-FCF6-4FEB-8DFF-A50DA6AF561C}100] 298 | Caption=Business country/region 299 | UseDefault=1 300 | State=131809 301 | [{BC4E71CE-17F9-48D5-BEE9-021DF0EA5409}100] 302 | Caption=Business P_O_ box 303 | UseDefault=1 304 | State=131809 305 | [{E1D4A09E-D758-4CD1-B6EC-34A8B5A73F80}100] 306 | Caption=Business postal code 307 | UseDefault=1 308 | State=131809 309 | [{446F787F-10C4-41CB-A6C4-4D0343551597}100] 310 | Caption=Business state or province 311 | UseDefault=1 312 | State=131809 313 | [{DDD1460F-C0BF-4553-8CE4-10433C908FB0}100] 314 | Caption=Business street 315 | UseDefault=1 316 | State=131809 317 | [{91EFF6F3-2E27-42CA-933E-7C999FBE310B}100] 318 | Caption=Business fax 319 | UseDefault=1 320 | State=131809 321 | [{56310920-2491-4919-99CE-EADB06FAFDB2}100] 322 | Caption=Business home page 323 | UseDefault=1 324 | State=131809 325 | [{6A15E5A0-0A1E-4CD7-BB8C-D2F1B0C929BC}100] 326 | Caption=Business phone 327 | UseDefault=1 328 | State=131809 329 | [{BF53D1C3-49E0-4F7F-8567-5A821D8AC542}100] 330 | Caption=Callback number 331 | UseDefault=1 332 | State=131809 333 | [{8FDC6DEA-B929-412B-BA90-397A257465FE}100] 334 | Caption=Car phone 335 | UseDefault=1 336 | State=131809 337 | [{D4729704-8EF1-43EF-9024-2BD381187FD5}100] 338 | Caption=Children 339 | UseDefault=1 340 | State=131809 341 | [{8589E481-6040-473D-B171-7FA89C2708ED}100] 342 | Caption=Company main phone 343 | UseDefault=1 344 | State=131809 345 | [{FC9F7306-FF8F-4D49-9FB6-3FFE5C0951EC}100] 346 | Caption=Department 347 | UseDefault=1 348 | State=131809 349 | [{F8FA7FA3-D12B-4785-8A4E-691A94F7A3E7}100] 350 | Caption=E-mail address 351 | UseDefault=1 352 | State=131809 353 | [{38965063-EDC8-4268-8491-B7723172CF29}100] 354 | Caption=E-mail2 355 | UseDefault=1 356 | State=131809 357 | [{644D37B4-E1B3-4BAD-B099-7E7C04966ACA}100] 358 | Caption=E-mail3 359 | UseDefault=1 360 | State=131809 361 | [{84D8F337-981D-44B3-9615-C7596DBA17E3}100] 362 | Caption=E-mail list 363 | UseDefault=1 364 | State=131809 365 | [{CC6F4F24-6083-4BD4-8754-674D0DE87AB8}100] 366 | Caption=E-mail display name 367 | UseDefault=1 368 | State=131809 369 | [{F1A24AA7-9CA7-40F6-89EC-97DEF9FFE8DB}100] 370 | Caption=File as 371 | UseDefault=1 372 | State=131809 373 | [{14977844-6B49-4AAD-A714-A4513BF60460}100] 374 | Caption=First name 375 | UseDefault=1 376 | State=131809 377 | [{635E9051-50A5-4BA2-B9DB-4ED056C77296}100] 378 | Caption=Full name 379 | UseDefault=1 380 | State=131809 381 | [{3C8CEE58-D4F0-4CF9-B756-4E5D24447BCD}100] 382 | Caption=Gender 383 | UseDefault=1 384 | State=131809 385 | [{176DC63C-2688-4E89-8143-A347800F25E9}70] 386 | Caption=Given name 387 | UseDefault=1 388 | State=131809 389 | [{5DC2253F-5E11-4ADF-9CFE-910DD01E3E70}100] 390 | Caption=Hobbies 391 | UseDefault=1 392 | State=131809 393 | [{98F98354-617A-46B8-8560-5B1B64BF1F89}100] 394 | Caption=Home address 395 | UseDefault=1 396 | State=131809 397 | [{176DC63C-2688-4E89-8143-A347800F25E9}65] 398 | Caption=Home city 399 | UseDefault=1 400 | State=131809 401 | [{08A65AA1-F4C9-43DD-9DDF-A33D8E7EAD85}100] 402 | Caption=Home country/region 403 | UseDefault=1 404 | State=131809 405 | [{7B9F6399-0A3F-4B12-89BD-4ADC51C918AF}100] 406 | Caption=Home P_O_ box 407 | UseDefault=1 408 | State=131809 409 | [{8AFCC170-8A46-4B53-9EEE-90BAE7151E62}100] 410 | Caption=Home postal code 411 | UseDefault=1 412 | State=131809 413 | [{C89A23D0-7D6D-4EB8-87D4-776A82D493E5}100] 414 | Caption=Home state or province 415 | UseDefault=1 416 | State=131809 417 | [{0ADEF160-DB3F-4308-9A21-06237B16FA2A}100] 418 | Caption=Home street 419 | UseDefault=1 420 | State=131809 421 | [{660E04D6-81AB-4977-A09F-82313113AB26}100] 422 | Caption=Home fax 423 | UseDefault=1 424 | State=131809 425 | [{176DC63C-2688-4E89-8143-A347800F25E9}20] 426 | Caption=Home phone 427 | UseDefault=1 428 | State=131809 429 | [{D68DBD8A-3374-4B81-9972-3EC30682DB3D}100] 430 | Caption=IM addresses 431 | UseDefault=1 432 | State=131809 433 | [{F3D8F40D-50CB-44A2-9718-40CB9119495D}100] 434 | Caption=Initials 435 | UseDefault=1 436 | State=131809 437 | [{176DC63C-2688-4E89-8143-A347800F25E9}6] 438 | Caption=Job title 439 | UseDefault=1 440 | State=131809 441 | [{97B0AD89-DF49-49CC-834E-660974FD755B}100] 442 | Caption=Label 443 | UseDefault=1 444 | State=131809 445 | [{8F367200-C270-457C-B1D4-E07C5BCD90C7}100] 446 | Caption=Last name 447 | UseDefault=1 448 | State=131809 449 | [{C0AC206A-827E-4650-95AE-77E2BB74FCC9}100] 450 | Caption=Mailing address 451 | UseDefault=1 452 | State=131809 453 | [{176DC63C-2688-4E89-8143-A347800F25E9}71] 454 | Caption=Middle name 455 | UseDefault=1 456 | State=131809 457 | [{176DC63C-2688-4E89-8143-A347800F25E9}35] 458 | Caption=Cell phone 459 | UseDefault=1 460 | State=131809 461 | [{176DC63C-2688-4E89-8143-A347800F25E9}74] 462 | Caption=Nickname 463 | UseDefault=1 464 | State=131809 465 | [{176DC63C-2688-4E89-8143-A347800F25E9}7] 466 | Caption=Office location 467 | UseDefault=1 468 | State=131809 469 | [{508161FA-313B-43D5-83A1-C1ACCF68622C}100] 470 | Caption=Other address 471 | UseDefault=1 472 | State=131809 473 | [{6E682923-7F7B-4F0C-A337-CFCA296687BF}100] 474 | Caption=Other city 475 | UseDefault=1 476 | State=131809 477 | [{8F167568-0AAE-4322-8ED9-6055B7B0E398}100] 478 | Caption=Other country/region 479 | UseDefault=1 480 | State=131809 481 | [{8B26EA41-058F-43F6-AECC-4035681CE977}100] 482 | Caption=Other P_O_ box 483 | UseDefault=1 484 | State=131809 485 | [{95C656C1-2ABF-4148-9ED3-9EC602E3B7CD}100] 486 | Caption=Other postal code 487 | UseDefault=1 488 | State=131809 489 | [{71B377D6-E570-425F-A170-809FAE73E54E}100] 490 | Caption=Other state or province 491 | UseDefault=1 492 | State=131809 493 | [{FF962609-B7D6-4999-862D-95180D529AEA}100] 494 | Caption=Other street 495 | UseDefault=1 496 | State=131809 497 | [{D6304E01-F8F5-4F45-8B15-D024A6296789}100] 498 | Caption=Pager 499 | UseDefault=1 500 | State=131809 501 | [{176DC63C-2688-4E89-8143-A347800F25E9}69] 502 | Caption=Personal title 503 | UseDefault=1 504 | State=131809 505 | [{C8EA94F0-A9E3-4969-A94B-9C62A95324E0}100] 506 | Caption=City 507 | UseDefault=1 508 | State=131809 509 | [{E53D799D-0F3F-466E-B2FF-74634A3CB7A4}100] 510 | Caption=Country/region 511 | UseDefault=1 512 | State=131809 513 | [{DE5EF3C7-46E1-484E-9999-62C5308394C1}100] 514 | Caption=P_O_ box 515 | UseDefault=1 516 | State=131809 517 | [{18BBD425-ECFD-46EF-B612-7B4A6034EDA0}100] 518 | Caption=Postal code 519 | UseDefault=1 520 | State=131809 521 | [{F1176DFE-7138-4640-8B4C-AE375DC70A6D}100] 522 | Caption=State or province 523 | UseDefault=1 524 | State=131809 525 | [{63C25B20-96BE-488F-8788-C09C407AD812}100] 526 | Caption=Street 527 | UseDefault=1 528 | State=131809 529 | [{176DC63C-2688-4E89-8143-A347800F25E9}48] 530 | Caption=Primary e-mail 531 | UseDefault=1 532 | State=131809 533 | [{176DC63C-2688-4E89-8143-A347800F25E9}25] 534 | Caption=Primary phone 535 | UseDefault=1 536 | State=131809 537 | [{7268AF55-1CE4-4F6E-A41F-B6E4EF10E4A9}100] 538 | Caption=Profession 539 | UseDefault=1 540 | State=131809 541 | [{9D2408B6-3167-422B-82B0-F583B7A7CFE3}100] 542 | Caption=Spouse/Partner 543 | UseDefault=1 544 | State=131809 545 | [{176DC63C-2688-4E89-8143-A347800F25E9}73] 546 | Caption=Suffix 547 | UseDefault=1 548 | State=131809 549 | [{AAF16BAC-2B55-45E6-9F6D-415EB94910DF}100] 550 | Caption=TTY/TTD phone 551 | UseDefault=1 552 | State=131809 553 | [{C554493C-C1F7-40C1-A76C-EF8C0614003E}100] 554 | Caption=Telex 555 | UseDefault=1 556 | State=131809 557 | [{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}18] 558 | Caption=Webpage 559 | UseDefault=1 560 | State=131809 561 | [{D5CDD502-2E9C-101B-9397-08002B2CF9AE}27] 562 | Caption=Content status 563 | UseDefault=1 564 | State=131809 565 | [{D5CDD502-2E9C-101B-9397-08002B2CF9AE}26] 566 | Caption=Content type 567 | UseDefault=1 568 | State=131809 569 | [{2CBAA8F5-D81F-47CA-B17A-F8D822300131}100] 570 | Caption=Date acquired 571 | UseDefault=1 572 | State=131811 573 | [{43F8D7B7-A444-4F87-9383-52271C9B915C}100] 574 | Caption=Date archived 575 | UseDefault=1 576 | State=131811 577 | [{72FAB781-ACDA-43E5-B155-B2434F85E678}100] 578 | Caption=Date completed 579 | UseDefault=1 580 | State=131811 581 | [{78C34FC8-104A-4ACA-9EA4-524D52996E57}94] 582 | Caption=Device category 583 | UseDefault=1 584 | State=131809 585 | [{78C34FC8-104A-4ACA-9EA4-524D52996E57}55] 586 | Caption=Connected 587 | UseDefault=1 588 | State=131810 589 | [{78C34FC8-104A-4ACA-9EA4-524D52996E57}52] 590 | Caption=Discovery method 591 | UseDefault=1 592 | State=131809 593 | [{656A3BB3-ECC0-43FD-8477-4AE0404A96CD}12288] 594 | Caption=Friendly name 595 | UseDefault=1 596 | State=131809 597 | [{78C34FC8-104A-4ACA-9EA4-524D52996E57}70] 598 | Caption=Local computer 599 | UseDefault=1 600 | State=131810 601 | [{656A3BB3-ECC0-43FD-8477-4AE0404A96CD}8192] 602 | Caption=Manufacturer 603 | UseDefault=1 604 | State=131809 605 | [{656A3BB3-ECC0-43FD-8477-4AE0404A96CD}8194] 606 | Caption=Model 607 | UseDefault=1 608 | State=131809 609 | [{78C34FC8-104A-4ACA-9EA4-524D52996E57}56] 610 | Caption=Paired 611 | UseDefault=1 612 | State=131810 613 | [{D08DD4C0-3A9E-462E-8290-7B636B2576B9}10] 614 | Caption=Classification 615 | UseDefault=1 616 | State=131809 617 | [{D08DD4C0-3A9E-462E-8290-7B636B2576B9}257] 618 | Caption=Status 619 | UseDefault=1 620 | State=131809 621 | [{276D7BB0-5B34-4FB0-AA4B-158ED12A1809}100] 622 | Caption=Client ID 623 | UseDefault=1 624 | State=131809 625 | [{F334115E-DA1B-4509-9B3D-119504DC7ABB}100] 626 | Caption=Contributors 627 | UseDefault=1 628 | State=131809 629 | [{F29F85E0-4FF9-1068-AB91-08002B27B3D9}11] 630 | Caption=Last printed 631 | UseDefault=1 632 | State=131811 633 | [{F29F85E0-4FF9-1068-AB91-08002B27B3D9}13] 634 | Caption=Date last saved 635 | UseDefault=1 636 | State=131811 637 | [{1E005EE6-BF27-428B-B01C-79676ACD2870}100] 638 | Caption=Division 639 | UseDefault=1 640 | State=131809 641 | [{E08805C8-E395-40DF-80D2-54F0D6C43154}100] 642 | Caption=Document ID 643 | UseDefault=1 644 | State=131809 645 | [{D5CDD502-2E9C-101B-9397-08002B2CF9AE}7] 646 | Caption=Slides 647 | UseDefault=1 648 | State=131810 649 | [{F29F85E0-4FF9-1068-AB91-08002B27B3D9}10] 650 | Caption=Total editing time 651 | UseDefault=1 652 | State=131810 653 | [{F29F85E0-4FF9-1068-AB91-08002B27B3D9}15] 654 | Caption=Word count 655 | UseDefault=1 656 | State=131810 657 | [{3F8472B5-E0AF-4DB2-8071-C53FE76AE7CE}100] 658 | Caption=Due date 659 | UseDefault=1 660 | State=131811 661 | [{C75FAA05-96FD-49E7-9CB4-9F601082D553}100] 662 | Caption=End date 663 | UseDefault=1 664 | State=131811 665 | [{28636AA6-953D-11D2-B5D6-00C04FD918D0}12] 666 | Caption=File count 667 | UseDefault=1 668 | State=131810 669 | [{41CF5AE0-F75A-4806-BD87-59C7D9248EB9}100] 670 | Caption=Filename 671 | UseDefault=1 672 | State=641 673 | [{67DF94DE-0CA7-4D6F-B792-053A3E4F03CF}100] 674 | Caption=Flag color 675 | UseDefault=1 676 | State=131809 677 | [{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}12] 678 | Caption=Flag status 679 | UseDefault=1 680 | State=131809 681 | [{9B174B35-40FF-11D2-A27E-00C04FC30871}2] 682 | Caption=Space free 683 | UseDefault=1 684 | State=674 685 | [{6444048F-4C8B-11D1-8B70-080036B11A03}7] 686 | Caption=Bit depth 687 | UseDefault=1 688 | State=131810 689 | [{6444048F-4C8B-11D1-8B70-080036B11A03}5] 690 | Caption=Horizontal resolution 691 | UseDefault=1 692 | State=131810 693 | [{6444048F-4C8B-11D1-8B70-080036B11A03}6] 694 | Caption=Vertical resolution 695 | UseDefault=1 696 | State=131810 697 | [{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}11] 698 | Caption=Importance 699 | UseDefault=1 700 | State=131809 701 | [{F23F425C-71A1-4FA8-922F-678EA4A60408}100] 702 | Caption=Is attachment 703 | UseDefault=1 704 | State=131810 705 | [{5CDA5FC8-33EE-4FF3-9094-AE7BD8868C4D}100] 706 | Caption=Is deleted 707 | UseDefault=1 708 | State=131810 709 | [{90E5E14E-648B-4826-B2AA-ACAF790E3513}10] 710 | Caption=Encryption status 711 | UseDefault=1 712 | State=131809 713 | [{5DA84765-E3FF-4278-86B0-A27967FBDD03}100] 714 | Caption=Has flag 715 | UseDefault=1 716 | State=131810 717 | [{A6F360D2-55F9-48DE-B909-620E090A647C}100] 718 | Caption=Is completed 719 | UseDefault=1 720 | State=131810 721 | [{346C8BD1-2E6A-4C45-89A4-61B78E8E700F}100] 722 | Caption=Incomplete 723 | UseDefault=1 724 | State=131810 725 | [{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}10] 726 | Caption=Read status 727 | UseDefault=1 728 | State=131809 729 | [{D0A04F0A-462A-48A4-BB2F-3706E88DBD7D}100] 730 | Caption=Creators 731 | UseDefault=1 732 | State=131809 733 | [{F7DB74B4-4287-4103-AFBA-F1B13DCD75CF}100] 734 | Caption=Date 735 | UseDefault=1 736 | State=131811 737 | [{B725F130-47EF-101A-A5F1-02608C9EEBAC}2] 738 | Caption=Folder name 739 | UseDefault=1 740 | State=641 741 | [{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}6] 742 | Caption=Folder path 743 | UseDefault=1 744 | State=641 745 | [{DABD30ED-0043-4789-A7F8-D013A4736622}100] 746 | Caption=Folder 747 | UseDefault=1 748 | State=641 749 | [{D4D0AA16-9948-41A4-AA85-D97FF9646993}100] 750 | Caption=Participants 751 | UseDefault=1 752 | State=131809 753 | [{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}7] 754 | Caption=Path 755 | UseDefault=1 756 | State=641 757 | [{23620678-CCD4-47C0-9963-95A8405678A3}100] 758 | Caption=By location 759 | UseDefault=1 760 | State=641 761 | [{DEA7C82C-1D89-4A66-9427-A4E3DEBABCB1}100] 762 | Caption=Contact names 763 | UseDefault=1 764 | State=131809 765 | [{95BEB1FC-326D-4644-B396-CD3ED90E6DDF}100] 766 | Caption=Entry type 767 | UseDefault=1 768 | State=131809 769 | [{D5CDD502-2E9C-101B-9397-08002B2CF9AE}28] 770 | Caption=Language 771 | UseDefault=1 772 | State=131809 773 | [{5CBF2787-48CF-4208-B90E-EE5E5D420294}23] 774 | Caption=Date visited 775 | UseDefault=1 776 | State=131811 777 | [{5CBF2787-48CF-4208-B90E-EE5E5D420294}21] 778 | Caption=Description 779 | UseDefault=1 780 | State=131809 781 | [{B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}3] 782 | Caption=Link status 783 | UseDefault=1 784 | State=131809 785 | [{B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}2] 786 | Caption=Link target 787 | UseDefault=1 788 | State=673 789 | [{5CBF2787-48CF-4208-B90E-EE5E5D420294}2] 790 | Caption=URL 791 | UseDefault=1 792 | State=131809 793 | [{2E4B640D-5019-46D8-8881-55414CC5CAA0}100] 794 | Caption=Media created 795 | UseDefault=1 796 | State=131811 797 | [{DE41CC29-6971-4290-B472-F59F2E2F31E2}100] 798 | Caption=Date released 799 | UseDefault=1 800 | State=131809 801 | [{64440492-4C8B-11D1-8B70-080036B11A03}36] 802 | Caption=Encoded by 803 | UseDefault=1 804 | State=131809 805 | [{64440492-4C8B-11D1-8B70-080036B11A03}22] 806 | Caption=Producers 807 | UseDefault=1 808 | State=131809 809 | [{64440492-4C8B-11D1-8B70-080036B11A03}30] 810 | Caption=Publisher 811 | UseDefault=1 812 | State=131809 813 | [{56A3372E-CE9C-11D2-9F0E-006097C686F6}38] 814 | Caption=Subtitle 815 | UseDefault=1 816 | State=131809 817 | [{64440492-4C8B-11D1-8B70-080036B11A03}34] 818 | Caption=User web URL 819 | UseDefault=1 820 | State=131809 821 | [{64440492-4C8B-11D1-8B70-080036B11A03}23] 822 | Caption=Writers 823 | UseDefault=1 824 | State=131809 825 | [{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}21] 826 | Caption=Attachments 827 | UseDefault=1 828 | State=131809 829 | [{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}2] 830 | Caption=Bcc addresses 831 | UseDefault=1 832 | State=131809 833 | [{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}3] 834 | Caption=Bcc 835 | UseDefault=1 836 | State=131809 837 | [{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}4] 838 | Caption=Cc addresses 839 | UseDefault=1 840 | State=131809 841 | [{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}5] 842 | Caption=Cc 843 | UseDefault=1 844 | State=131809 845 | [{DC8F80BD-AF1E-4289-85B6-3DFC1B493992}100] 846 | Caption=Conversation ID 847 | UseDefault=1 848 | State=131809 849 | [{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}20] 850 | Caption=Date received 851 | UseDefault=1 852 | State=131811 853 | [{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}19] 854 | Caption=Date sent 855 | UseDefault=1 856 | State=131811 857 | [{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}13] 858 | Caption=From addresses 859 | UseDefault=1 860 | State=131809 861 | [{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}14] 862 | Caption=From 863 | UseDefault=1 864 | State=131809 865 | [{9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4}8] 866 | Caption=Has attachments 867 | UseDefault=1 868 | State=131810 869 | [{0BE1C8E7-1981-4676-AE14-FDD78F05A6E7}100] 870 | Caption=Sender address 871 | UseDefault=1 872 | State=131809 873 | [{0DA41CFA-D224-4A18-AE2F-596158DB4B3A}100] 874 | Caption=Sender name 875 | UseDefault=1 876 | State=131809 877 | [{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}15] 878 | Caption=Store 879 | UseDefault=1 880 | State=131809 881 | [{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}16] 882 | Caption=To addresses 883 | UseDefault=1 884 | State=131809 885 | [{BCCC8A3C-8CEF-42E5-9B1C-C69079398BC7}100] 886 | Caption=To do title 887 | UseDefault=1 888 | State=131809 889 | [{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}17] 890 | Caption=To 891 | UseDefault=1 892 | State=131809 893 | [{FDF84370-031A-4ADD-9E91-0D775F1C6605}100] 894 | Caption=Mileage 895 | UseDefault=1 896 | State=131809 897 | [{56A3372E-CE9C-11D2-9F0E-006097C686F6}13] 898 | Caption=Album artist 899 | UseDefault=1 900 | State=131809 901 | [{56A3372E-CE9C-11D2-9F0E-006097C686F6}100] 902 | Caption=Album ID 903 | UseDefault=1 904 | State=131809 905 | [{56A3372E-CE9C-11D2-9F0E-006097C686F6}35] 906 | Caption=Beats-per-minute 907 | UseDefault=1 908 | State=131810 909 | [{64440492-4C8B-11D1-8B70-080036B11A03}19] 910 | Caption=Composers 911 | UseDefault=1 912 | State=131809 913 | [{56A3372E-CE9C-11D2-9F0E-006097C686F6}34] 914 | Caption=Initial key 915 | UseDefault=1 916 | State=131809 917 | [{C449D5CB-9EA4-4809-82E8-AF9D59DED6D1}100] 918 | Caption=Part of a compilation 919 | UseDefault=1 920 | State=131810 921 | [{56A3372E-CE9C-11D2-9F0E-006097C686F6}39] 922 | Caption=Mood 923 | UseDefault=1 924 | State=131809 925 | [{56A3372E-CE9C-11D2-9F0E-006097C686F6}37] 926 | Caption=Part of set 927 | UseDefault=1 928 | State=131809 929 | [{64440492-4C8B-11D1-8B70-080036B11A03}31] 930 | Caption=Period 931 | UseDefault=1 932 | State=131809 933 | [{4776CAFA-BCE4-4CB1-A23E-265E76D8EB11}100] 934 | Caption=Color 935 | UseDefault=1 936 | State=131809 937 | [{64440492-4C8B-11D1-8B70-080036B11A03}21] 938 | Caption=Parental rating 939 | UseDefault=1 940 | State=131809 941 | [{10984E0A-F9F2-4321-B7EF-BAF195AF4319}100] 942 | Caption=Parental rating reason 943 | UseDefault=1 944 | State=131809 945 | [{9B174B35-40FF-11D2-A27E-00C04FC30871}5] 946 | Caption=Space used 947 | UseDefault=1 948 | State=131810 949 | [{D35F743A-EB2E-47F2-A286-844132CB1427}100] 950 | Caption=EXIF version 951 | UseDefault=1 952 | State=131809 953 | [{14B81DA1-0135-4D31-96D9-6CBFC9671A99}18248] 954 | Caption=Event 955 | UseDefault=1 956 | State=131809 957 | [{14B81DA1-0135-4D31-96D9-6CBFC9671A99}37380] 958 | Caption=Exposure bias 959 | UseDefault=1 960 | State=131810 961 | [{14B81DA1-0135-4D31-96D9-6CBFC9671A99}34850] 962 | Caption=Exposure program 963 | UseDefault=1 964 | State=131809 965 | [{14B81DA1-0135-4D31-96D9-6CBFC9671A99}33434] 966 | Caption=Exposure time 967 | UseDefault=1 968 | State=131810 969 | [{14B81DA1-0135-4D31-96D9-6CBFC9671A99}33437] 970 | Caption=F-stop 971 | UseDefault=1 972 | State=131810 973 | [{14B81DA1-0135-4D31-96D9-6CBFC9671A99}37385] 974 | Caption=Flash mode 975 | UseDefault=1 976 | State=131809 977 | [{14B81DA1-0135-4D31-96D9-6CBFC9671A99}37386] 978 | Caption=Focal length 979 | UseDefault=1 980 | State=131810 981 | [{A0E74609-B84D-4F49-B860-462BD9971F98}100] 982 | Caption=35mm focal length 983 | UseDefault=1 984 | State=131810 985 | [{14B81DA1-0135-4D31-96D9-6CBFC9671A99}34855] 986 | Caption=ISO speed 987 | UseDefault=1 988 | State=131810 989 | [{E6DDCAF7-29C5-4F0A-9A68-D19412EC7090}100] 990 | Caption=Lens maker 991 | UseDefault=1 992 | State=131809 993 | [{E1277516-2B5F-4869-89B1-2E585BD38B7A}100] 994 | Caption=Lens model 995 | UseDefault=1 996 | State=131809 997 | [{14B81DA1-0135-4D31-96D9-6CBFC9671A99}37384] 998 | Caption=Light source 999 | UseDefault=1 1000 | State=131809 1001 | [{08F6D7C2-E3F2-44FC-AF1E-5AA5C81A2D3E}100] 1002 | Caption=Max aperture 1003 | UseDefault=1 1004 | State=131810 1005 | [{14B81DA1-0135-4D31-96D9-6CBFC9671A99}37383] 1006 | Caption=Metering mode 1007 | UseDefault=1 1008 | State=131809 1009 | [{14B81DA1-0135-4D31-96D9-6CBFC9671A99}274] 1010 | Caption=Orientation 1011 | UseDefault=1 1012 | State=131809 1013 | [{E8309B6E-084C-49B4-B1FC-90A80331B638}100] 1014 | Caption=People 1015 | UseDefault=1 1016 | State=131809 1017 | [{6D217F6D-3F6A-4825-B470-5F03CA2FBE9B}100] 1018 | Caption=Program mode 1019 | UseDefault=1 1020 | State=131809 1021 | [{49237325-A95A-4F67-B211-816B2D45D2E0}100] 1022 | Caption=Saturation 1023 | UseDefault=1 1024 | State=131809 1025 | [{14B81DA1-0135-4D31-96D9-6CBFC9671A99}37382] 1026 | Caption=Subject distance 1027 | UseDefault=1 1028 | State=131810 1029 | [{EE3D3D8A-5381-4CFA-B13B-AAF66B5F4EC9}100] 1030 | Caption=White balance 1031 | UseDefault=1 1032 | State=131809 1033 | [{9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4}5] 1034 | Caption=Priority 1035 | UseDefault=1 1036 | State=131809 1037 | [{39A7F922-477C-48DE-8BC8-B28441E342E3}100] 1038 | Caption=Project 1039 | UseDefault=1 1040 | State=131809 1041 | [{6D748DE2-8D38-4CC3-AC60-F009B057C557}7] 1042 | Caption=Channel number 1043 | UseDefault=1 1044 | State=131810 1045 | [{6D748DE2-8D38-4CC3-AC60-F009B057C557}12] 1046 | Caption=Closed captioning 1047 | UseDefault=1 1048 | State=131810 1049 | [{6D748DE2-8D38-4CC3-AC60-F009B057C557}13] 1050 | Caption=Rerun 1051 | UseDefault=1 1052 | State=131810 1053 | [{6D748DE2-8D38-4CC3-AC60-F009B057C557}14] 1054 | Caption=SAP 1055 | UseDefault=1 1056 | State=131810 1057 | [{4684FE97-8765-4842-9C13-F006447B178C}100] 1058 | Caption=Broadcast date 1059 | UseDefault=1 1060 | State=131811 1061 | [{A5477F61-7A82-4ECA-9DDE-98B69B2479B3}100] 1062 | Caption=Recording time 1063 | UseDefault=1 1064 | State=131811 1065 | [{6D748DE2-8D38-4CC3-AC60-F009B057C557}5] 1066 | Caption=Station call sign 1067 | UseDefault=1 1068 | State=131809 1069 | [{1B5439E7-EBA1-4AF8-BDD7-7AF1D4549493}100] 1070 | Caption=Station name 1071 | UseDefault=1 1072 | State=131809 1073 | [{560C36C0-503A-11CF-BAA1-00004C752A9A}2] 1074 | Caption=Summary 1075 | UseDefault=1 1076 | State=641 1077 | [{560C36C0-503A-11CF-BAA1-00004C752A9A}3] 1078 | Caption=Snippets 1079 | UseDefault=1 1080 | State=131809 1081 | [{560C36C0-503A-11CF-BAA1-00004C752A9A}4] 1082 | Caption=Auto summary 1083 | UseDefault=1 1084 | State=131809 1085 | [{49691C90-7E17-101A-A91C-08002B2ECDA9}3] 1086 | Caption=Search ranking 1087 | UseDefault=1 1088 | State=131810 1089 | [{F8D3F6AC-4874-42CB-BE59-AB454B30716A}100] 1090 | Caption=Sensitivity 1091 | UseDefault=1 1092 | State=131809 1093 | [{841E4F90-FF59-4D16-8947-E81BBFFAB36D}6] 1094 | Caption=Support link 1095 | UseDefault=1 1096 | State=131809 1097 | [{668CDFA5-7A1B-4323-AE4B-E527393A1D81}100] 1098 | Caption=Source 1099 | UseDefault=1 1100 | State=131809 1101 | [{48FD6EC8-8A12-4CDF-A03E-4EC5A511EDDE}100] 1102 | Caption=Start date 1103 | UseDefault=1 1104 | State=131811 1105 | [{D37D52C6-261C-4303-82B3-08B926AC6F12}100] 1106 | Caption=Billing information 1107 | UseDefault=1 1108 | State=131809 1109 | [{084D8A0A-E6D5-40DE-BF1F-C8820E7C877C}100] 1110 | Caption=Complete 1111 | UseDefault=1 1112 | State=131809 1113 | [{08C7CC5F-60F2-4494-AD75-55E3E0B5ADD0}100] 1114 | Caption=Task owner 1115 | UseDefault=1 1116 | State=131809 1117 | [{28636AA6-953D-11D2-B5D6-00C04FD918D0}14] 1118 | Caption=Total file size 1119 | UseDefault=1 1120 | State=131810 1121 | [{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}9] 1122 | Caption=Legal trademarks 1123 | UseDefault=1 1124 | State=131809 1125 | [{64440491-4C8B-11D1-8B70-080036B11A03}10] 1126 | Caption=Video compression 1127 | UseDefault=1 1128 | State=131809 1129 | [{64440492-4C8B-11D1-8B70-080036B11A03}20] 1130 | Caption=Directors 1131 | UseDefault=1 1132 | State=131809 1133 | [{64440491-4C8B-11D1-8B70-080036B11A03}8] 1134 | Caption=Data rate 1135 | UseDefault=1 1136 | State=131810 1137 | [{64440491-4C8B-11D1-8B70-080036B11A03}4] 1138 | Caption=Frame height 1139 | UseDefault=1 1140 | State=131810 1141 | [{64440491-4C8B-11D1-8B70-080036B11A03}6] 1142 | Caption=Frame rate 1143 | UseDefault=1 1144 | State=131810 1145 | [{64440491-4C8B-11D1-8B70-080036B11A03}3] 1146 | Caption=Frame width 1147 | UseDefault=1 1148 | State=131810 1149 | [{64440491-4C8B-11D1-8B70-080036B11A03}43] 1150 | Caption=Total bitrate 1151 | UseDefault=1 1152 | State=131810 1153 | [{14B81DA1-0135-4D31-96D9-6CBFC9671A99}18258] 1154 | Caption=Date imported 1155 | UseDefault=1 1156 | State=131747 1157 | [{EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902}100] 1158 | Caption=Shared 1159 | UseDefault=1 1160 | State=674 1161 | [{EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902}200] 1162 | Caption=Shared with 1163 | UseDefault=1 1164 | State=673 1165 | -------------------------------------------------------------------------------- /plugins/ShellDetails/ShellDetails.wdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/plugins/ShellDetails/ShellDetails.wdx -------------------------------------------------------------------------------- /plugins/ShellDetails/liesmich.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/plugins/ShellDetails/liesmich.htm -------------------------------------------------------------------------------- /plugins/ShellDetails/pluginst.inf: -------------------------------------------------------------------------------- 1 | [plugininstall] 2 | description=ShellDetails displays all Windows Explorer fields in Total Commander. 3 | descriptiondeu=ShellDetails zeigt alle Windows Explorer-Felder im Total Commander an. 4 | descriptionfra=ShellDetails montre tous les champs disponibles de l' Explorateur Windows dans Total Commander. 5 | type=wdx 6 | file=ShellDetails.wdx 7 | defaultdir=ShellDetails -------------------------------------------------------------------------------- /plugins/ShellDetails/readme.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ShellDetails 6 | 7 | 8 | 9 |
10 |

ShellDetails 1.22

11 |

ShellDetails is a content plugin for Total Commander.

12 |

Content

13 |
    14 |
  1. Plugin description
  2. 15 |
  3. System requirements
  4. 16 |
  5. Use
  6. 17 |
  7. Configuration 18 |
      19 |
    1. Directories for field search
    2. 20 |
    3. Field settings
    4. 21 |
    5. ShellDetails.ini location
    6. 22 |
    23 |
  8. 24 |
  9. Troubleshooting
  10. 25 |
  11. Known bugs and limitations
  12. 26 |
  13. Author contact
  14. 27 |
  15. License
  16. 28 |
29 |

1. Plugin description

30 |

ShellDetails displays all Windows Explorer fields in Total Commander.
31 | In addition to standard fields like Name, Size, Type, Attributes, several date/time fields and many others are available.
32 | The Owner of a file can be displayed as well as (number of) Pages in documents like TIFF or DOC.
33 | Especially interesting for searching are meta data information like Author, Title, Category and Comment.
34 | For music files fields like Copyright, Interpreter, Album Title, Year, Title Number, Song Category, Length and Protected should be relevant. Some of these fields are also supported for video files.
35 | In the category pictures there are the fields Camera Model, Picture Captured On and Dimensions. Not only dimensions of JPEG pictures are supported. Many other picture formats are supported as well.
36 | We also have the properties of applications and libraries like Company, Description, File Version, Product Name and Product Version.
37 | These are just the internal fields. If you have any ShellExtensions installed that provide additional fields they will be displayed as well. Here are some examples:

38 | 43 |

Hint: The field names used here are taken from a German Windows XP installation. I translated them to English. The original English names will be different for some fields. Some field names are slidely different on Windows 2000.

44 |

2. System requirements

45 |

You need Total Commander 6.50 or higher for this plugin.
46 | The current supported operating systems are Windows 2000, XP and 2003.
47 | If you install ShellDetails on an older operating system no fields are provided.

48 |

Shell extensions are currently not supported on Windows Vista and Windows 7.

49 |

3. Use

50 |

ShellDetail is a content plug-in. Alle plug-ins of this type can be used in the same way. An overview on how to use content plug-ins can be found in the Total Commander Wiki.

51 |

4. Configuration

52 |

4.1 Directories for field search

53 |

Which fields are available for displaying differs from directory to directory. For this reason the plugin offers to set the directories where to search for fields. As an example the fields provided by the program TortoiseCVS are only available in directories which are under CVS control. If TortoiseCVS is used and the directory C:\MyProject is under CVS control you may add this line to your ShellDetails.ini configuration file:

54 |
[Directories] 
 55 | Dir_1=C:\MyProject
 56 | 
57 |

It's not necessary to add an additional directory which contains the common directories. If no directory is set by the user ShellDetails will search for fields in the Windows directory.

58 |

4.2 Field Settings

59 |

ShellDetails will create a settings file called ShellDetails.ini. You can use it to define datatype conversions (casting), calculations and other settings. Each section is named with a unique name to identify the field. You don't have to and should not edit the section titles. It can contain the following entries:

60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 93 | 94 | 95 | 96 | 97 | 98 | 99 |
Default Value Possible valuesDescription
UseDefault=10, 1Set to 0 will enable custom casting and calculations. Otherwise the default field type will be used.
Cast=12, 5

Cast the field type into another field type. Supported casts are currently:
75 | Numeric --> Date
76 | Numeric --> Floating point number
77 | String --> Numeric

78 |

Allowed values for the target field type are Numeric (2) and Date (5) .

Operator=4747The only allowed settings here is 47 which stands for /. That means division is currently the only supported operation.
Processing=00, 1, 2, 3 Define how the values are displayed in a custom column view.
89 | 0=Same as Explorer.
90 | 1=Foreground
91 | 2=Background automatically
92 | 3=Background on demand
Caption The caption which is displayed to the user in Total Commander.
100 |

Here are some useful examples for built-in Explorer fields:

101 |
;Displays the file size as KB.
102 | [{B725F130-47EF-101A-A5F1-02608C9EEBAC}12]
103 | UseDefault=0
104 | Cast=2
105 | Operator=47
106 | Operand=1024
107 |
;Displays the length of video and audio files as time value.
108 | [{64440490-4C8B-11D1-8B70-080036B11A03}3]
109 | UseDefault=0
110 | Cast=5
111 | Operator=47
112 | Operand=10000000
113 |
;Displays the bitrate for audio files as kbits/sec. The field will be shown "on demand".
114 | [{64440490-4C8B-11D1-8B70-080036B11A03}4]
115 | UseDefault=0
116 | Cast=2
117 | Operator=47
118 | Operand=1000
119 | Processing=3
120 |
;Corrects the Explorer error that the original image date is extracted as string value.
121 | [{14B81DA1-0135-4D31-96D9-6CBFC9671A99}36867]
122 | UseDefault=0
123 | Cast=10
124 |
;Untitled field caption set to "Width" and casted to numeric value.
125 | [{6444048F-4C8B-11D1-8B70-080036B11A03}3]
UseDefault=0
Caption=Width
Cast=2
126 |
;Cast fhe "Fragment" field to a numeric value to enable search for this field.
127 | [{242ED098-D606-4FA8-9DDE-89AEDFE4EAD7}0]
Caption=Fragments
UseDefault=0
Cast=2
State=98 128 |
129 |

4.3 ShellDetails.ini location

130 |

ShellDetails.ini will be saved in the same directory as Wincmd.ini by default.
131 | If you don't like this location you can simply move the file to one of the following destinations:

132 |
    133 |
  • In a subdirectory called ShellDetails relative to the directory where Wincmd.ini is located
  • 134 |
  • Plugin directory
  • 135 |
  • Total Commander directory
  • 136 |
137 |

5. Troubleshooting

138 |
    139 |
  1. Question: A field is not provided by the plugin but can be selected in Explorer column configuration. What can I do?
    140 | Answer: Please check section 3. Directories for field search. This section explains how to add the missing fields.
  2. 141 |
  3. Question: A field is not displayed or not displayed as expected. What can I do?
    142 | Answer: Please start your Windows Explorer and add this column there. If the column values aren't shown here too then it's defintely not a bug in my plugin. In all other cases please report the problem to me.
  4. 143 |
144 |

6. Known bugs and limitations

145 |
    146 |
  1. Date values display differs by a few seconds. This is caused by the way the column interface provided by Windows stores the date values. Windows Explorer has the same problem.
  2. 147 |
  3. If you have a single file in a directory and the file information to be displayed is updated you need to reenter the directory.
  4. 148 |
149 |

7. Contact

150 |

There is a thread in the Total Commander forum which can be used to discuss problems, bug and suggestions.

151 |
152 | 153 | 154 | -------------------------------------------------------------------------------- /plugins/ShellDetails/styles/layout.css: -------------------------------------------------------------------------------- 1 | /* Generated by CaScadeS, a stylesheet editor for Mozilla Composer */ 2 | 3 | body { background-color: rgb(147, 225, 255); 4 | font-family: Tahoma,Verdana,Arial,Helvetica; 5 | } 6 | 7 | h1 { 8 | font-size: 2.5em; 9 | margin: 0em; 10 | padding-top: 0em; 11 | padding-right: 0em; 12 | padding-bottom: 0.4em; 13 | padding-left: 0em; 14 | } 15 | 16 | h2 { 17 | font-size: 2em; 18 | margin: 0em 0em 0.5em 0em; 19 | padding-top: 0.7em; 20 | padding-right: 0em; 21 | padding-bottom: 0em; 22 | padding-left: 0em; 23 | } 24 | 25 | h3 { 26 | font-size: 1.5em; 27 | margin:0.3em 0em 0em 0em; 28 | padding-top: 0.2em; 29 | padding-right: 0em; 30 | padding-bottom: 0.2em; 31 | padding-left: 0em; 32 | } 33 | 34 | h4 { 35 | font-size: 1.25em; 36 | margin:0.3em 0em 0em 0em; 37 | padding:0em; 38 | } 39 | 40 | h5 { 41 | font-size: 1.1em; 42 | margin:0em; 43 | padding:0em; 44 | } 45 | 46 | h6 { 47 | font-size: 1em; 48 | margin:0em; 49 | padding:0em; 50 | } 51 | 52 | table { border: 2px solid rgb(0, 102, 140); 53 | margin: 0em 0em 0em 0em; 54 | -x-border-x-spacing: 0em; 55 | -x-border-y-spacing: 0em; 56 | } 57 | 58 | table.plain { 59 | border: 2px solid rgb(0, 0, 0); 60 | margin: 2em 0em 0em; 61 | 62 | -x-border-x-spacing: 0em; 63 | -x-border-y-spacing: 0em; 64 | font-size: small; 65 | } 66 | 67 | th { padding: 0.5em; 68 | background-color: rgb(0, 102, 140); 69 | color: rgb(242, 242, 255); 70 | text-align: left; 71 | } 72 | 73 | td { border-bottom-style: solid; 74 | border-bottom-color: rgb(0, 102, 140); 75 | border-bottom-width: thin; 76 | padding: 0em; 77 | } 78 | 79 | div#content { border: thin solid rgb(0, 102, 140); 80 | margin: 2% auto; 81 | padding: 4em; 82 | width: 800px; 83 | background-color: rgb(242, 252, 255); 84 | } 85 | 86 | div#topic { border: thin solid rgb(0, 102, 140); 87 | margin: 1% auto; 88 | padding: 2em; 89 | width: 700px; 90 | background-color: rgb(242, 252, 255); 91 | } 92 | 93 | ul#navigation { margin: 0em; 94 | list-style-type: none; 95 | list-style-image: none; 96 | list-style-position: outside; 97 | text-indent: 1em; 98 | line-height: 1.4em; 99 | } 100 | 101 | ul#navigation h2 { margin: 1em 0em 0.4em; 102 | text-indent: 0em; 103 | } 104 | 105 | table#image { border: 0em none ; 106 | padding: 0em; 107 | -x-border-x-spacing: 0em; 108 | -x-border-y-spacing: 0em; 109 | opacity: 1; 110 | } 111 | 112 | td#image { border: 0em none ; 113 | margin-right: 1em; 114 | padding: 0em; 115 | -x-border-x-spacing: 0em; 116 | -x-border-y-spacing: 0em; 117 | } 118 | 119 | td#image_caption { border: 0em none ; 120 | margin: 0em; 121 | padding: 0.5em; 122 | -x-border-x-spacing: 0em; 123 | -x-border-y-spacing: 0em; 124 | background-color: rgb(0, 102, 140); 125 | color: rgb(242, 242, 255); 126 | text-align: right; 127 | font-weight: bold; 128 | font-size: smaller; 129 | } 130 | 131 | div#topnavi { 132 | border-bottom: thin dashed rgb(0, 102, 140); 133 | padding-right: 0em; 134 | background-color: rgb(242, 252, 255); 135 | line-height: 2em; 136 | width: 100%; 137 | } 138 | 139 | div#language { 140 | text-align: right; 141 | } 142 | #content p { 143 | padding: 0px; 144 | margin: 0px; 145 | } 146 | .news_item { 147 | background-color: #FDFFFF; 148 | text-indent: 0px; 149 | } 150 | -------------------------------------------------------------------------------- /plugins/Sub.ahk: -------------------------------------------------------------------------------- 1 | ; Author: majkinetor 2 | ; Version: 1.0 3 | ; Description: Extracts substring from file name from str1 up to the str2. 4 | ; 5 | ; Usage: =Sub.[|]str1.str2 (both string1 and str2 are optional) 6 | ; Use "|" sign as first char if you want to remove str1 from the result. 7 | ; If the str1 is not found, position 1 will be used. 8 | Sub: 9 | if #3 = 10 | { 11 | #Res := #fn 12 | return 13 | } 14 | 15 | #flag := 0 16 | if * = 124 ;if first char is | remove it and set the flag 17 | #1 := SubStr(#1,2), #flag := 1 18 | Sub1 := (#1 = "") ? 1 : InStr(#fn, #1) ;if user omited str1 use 1, else its position in the string 19 | if Sub1 && #flag ;if there was |, adjust 20 | Sub1 += StrLen(#1) 21 | IfEqual, Sub1, 0, SetEnv, Sub1, 1 ;if nothing was found, set to 1 22 | 23 | Sub2 := (#2 = "") ? StrLen(#fn)+1 : InStr(#fn, #2, false, Sub1+1) 24 | if !Sub2 25 | Sub2 := StrLen(#fn) + 1 26 | #Res := SubStr(#fn, Sub1, Sub2-Sub1) 27 | 28 | return 29 | 30 | S_GetFields: 31 | #Res = * 32 | return -------------------------------------------------------------------------------- /plugins/Ver.ahk: -------------------------------------------------------------------------------- 1 | ;Author: majkinetor 2 | ;Version: 1.0 3 | ;Description: Very simple plugin for demonstration purposes. Returns file version. 4 | Ver: 5 | FileGetVersion #Res, %#fp% 6 | return -------------------------------------------------------------------------------- /plugins/WdHash/ReadMe.en.txt: -------------------------------------------------------------------------------- 1 | wdHash is a simple content-plugin for the Total Commander (http://ghisler.com) that intended for calculation of checksums (hashes) for any file. Checksums can be used to control correctness of a file transfer on the network, for example, and wdHash allows to output them in tooltips above the files in the file panel or in custom columns. Besides, the checksums calculated by wdHash can be used at Multi-Rename-Tool and for filesearch. 2 | wdHash can initially calculate checksums using the CRC32, MD5 and SHA1 algorithms. But one of the key feature of this plugin is that amount of supported algorithms can be easily increased by adding extra second-level plugins. One can download a number of additional second level plugins from the homepage of the wdHash (http://slsoft.narod.ru/wdhash.html). There are plugins that add support of various modifications of the such algorithms as Haval, RipeMD, SHA, MD, Tiger, etc. 3 | The second feature of the wdHash is its ability to work in a background. This makes its usage more convenient and allows to reduce delays when waiting for calculation of hashe in such situations as calculation of long checksums for the files having the big size. 4 | 5 | All comments about the plugin and suggestions on improvement of its functionality can be sended to me via e-mail (slsoft@yandex.ru). Additional contact information can be found on the following page: http://slsoft.narod.ru/contacts.html. 6 | 7 | Yours faithfully, Sergey Larin, 8 | the developer of the wdHash and 9 | other programs presented on http://slsoft.narod.ru -------------------------------------------------------------------------------- /plugins/WdHash/ReadMe.txt: -------------------------------------------------------------------------------- 1 | wdHash is a simple content-plugin for the Total Commander (http://ghisler.com) that intended for calculation of checksums (hashes) for any file. Checksums can be used to control correctness of a file transfer on the network, for example, and wdHash allows to output them in tooltips above the files in the file panel or in custom columns. Besides, the checksums calculated by wdHash can be used at Multi-Rename-Tool and for filesearch. 2 | wdHash can initially calculate checksums using the CRC32, MD5 and SHA1 algorithms. But one of the key feature of this plugin is that amount of supported algorithms can be easily increased by adding extra second-level plugins. One can download a number of additional second level plugins from the homepage of the wdHash (http://slsoft.narod.ru/wdhash.html). There are plugins that add support of various modifications of the such algorithms as Haval, RipeMD, SHA, MD, Tiger, etc. 3 | The second feature of the wdHash is its ability to work in a background. This makes its usage more convenient and allows to reduce delays when waiting for calculation of hashe in such situations as calculation of long checksums for the files having the big size. 4 | 5 | All comments about the plugin and suggestions on improvement of its functionality can be sended to me via e-mail (slsoft@yandex.ru). Additional contact information can be found on the following page: http://slsoft.narod.ru/contacts.html. 6 | 7 | Yours faithfully, Sergey Larin, 8 | the developer of the wdHash and 9 | other programs presented on http://slsoft.narod.ru -------------------------------------------------------------------------------- /plugins/WdHash/hashes/CRC32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/plugins/WdHash/hashes/CRC32.dll -------------------------------------------------------------------------------- /plugins/WdHash/hashes/MD5.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/plugins/WdHash/hashes/MD5.dll -------------------------------------------------------------------------------- /plugins/WdHash/hashes/SHA1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/plugins/WdHash/hashes/SHA1.dll -------------------------------------------------------------------------------- /plugins/WdHash/pluginst.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/plugins/WdHash/pluginst.inf -------------------------------------------------------------------------------- /plugins/WdHash/wdHash.wdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/plugins/WdHash/wdHash.wdx -------------------------------------------------------------------------------- /plugins/_Hash/File.ahk: -------------------------------------------------------------------------------- 1 | File_ReadMemory(sFile, pBuffer, nSize = 512, bAppend = False) 2 | { 3 | If !(1 + hFile := File_CreateFile(sFile, 4, 0x40000000, 1)) 4 | Return "File not created/opened!" 5 | File_SetFilePointer(hFile, bAppend ? 2 : 0) 6 | nSize := File_WriteFile(hFile, pBuffer, nSize) 7 | File_SetEndOfFile(hFile) 8 | File_CloseHandle(hFile) 9 | Return nSize 10 | } 11 | 12 | File_WriteMemory(sFile, ByRef sBuffer, nSize = 0) 13 | { 14 | If !(1 + hFile := File_CreateFile(sFile, 3, 0x80000000, 1)) 15 | Return "File not found!" 16 | VarSetCapacity(sBuffer, nSize += nSize ? 0 : File_GetFileSize(hFile)) 17 | nSize := File_ReadFile(hFile, &sBuffer, nSize) 18 | VarSetCapacity(sBuffer, -1) 19 | File_CloseHandle(hFile) 20 | Return nSize 21 | } 22 | 23 | 24 | File_CreateFile(sFile, nCreate = 3, nAccess = 0x1F01FF, nShare = 7, bFolder = False) 25 | { 26 | /* 27 | CREATE_NEW = 1 28 | CREATE_ALWAYS = 2 29 | OPEN_EXISTING = 3 30 | OPEN_ALWAYS = 4 31 | 32 | GENERIC_READ = 0x80000000 33 | GENERIC_WRITE = 0x40000000 34 | GENERIC_EXECUTE = 0x20000000 35 | GENERIC_ALL = 0x10000000 36 | 37 | FILE_SHARE_READ = 1 38 | FILE_SHARE_WRITE = 2 39 | FILE_SHARE_DELETE = 4 40 | */ 41 | Return DllCall("CreateFile", "Uint", &sFile, "Uint", nAccess, "Uint", nShare, "Uint", 0, "Uint", nCreate, "Uint", bFolder ? 0x02000000 : 0, "Uint", 0) 42 | } 43 | 44 | File_DeleteFile(sFile) 45 | { 46 | Return DllCall("DeleteFile", "Uint", &sFile) 47 | } 48 | 49 | File_ReadFile(hFile, pBuffer, nSize = 1024) 50 | { 51 | DllCall("ReadFile", "Uint", hFile, "Uint", pBuffer, "Uint", nSize, "UintP", nSize, "Uint", 0) 52 | Return nSize 53 | } 54 | 55 | File_WriteFile(hFile, pBuffer, nSize = 1024) 56 | { 57 | DllCall("WriteFile", "Uint", hFile, "Uint", pBuffer, "Uint", nSize, "UintP", nSize, "Uint", 0) 58 | Return nSize 59 | } 60 | 61 | File_GetFileSize(hFile) 62 | { 63 | DllCall("GetFileSizeEx", "Uint", hFile, "int64P", nSize) 64 | Return nSize 65 | } 66 | 67 | File_SetEndOfFile(hFile) 68 | { 69 | Return DllCall("SetEndOfFile", "Uint", hFile) 70 | } 71 | 72 | File_SetFilePointer(hFile, nPos = 0, nMove = 0) 73 | { 74 | /* 75 | FILE_BEGIN = 0 76 | FILE_CURRENT = 1 77 | FILE_END = 2 78 | */ 79 | Return DllCall("SetFilePointerEx", "Uint", hFile, "int64", nMove, "Uint", 0, "Uint", nPos) 80 | } 81 | 82 | File_CloseHandle(Handle) 83 | { 84 | Return DllCall("CloseHandle", "Uint", Handle) 85 | } 86 | 87 | 88 | File_InternetOpen(sAgent = "AutoHotkey", nType = 4) 89 | { 90 | If !DllCall("GetModuleHandle", "str", "wininet") 91 | DllCall("LoadLibrary" , "str", "wininet") 92 | Return DllCall("wininet\InternetOpenA", "str", sAgent, "Uint", nType, "Uint", 0, "Uint", 0, "Uint", 0) 93 | } 94 | 95 | File_InternetOpenUrl(hInet, sUrl, nFlags = 0, pHeaders = 0) 96 | { 97 | Return DllCall("wininet\InternetOpenUrlA", "Uint", hInet, "Uint", &sUrl, "Uint", pHeaders, "Uint", -1, "Uint", nFlags | 0x80000000, "Uint", 0) ; INTERNET_FLAG_RELOAD = 0x80000000 98 | } 99 | 100 | File_InternetReadFile(hFile, pBuffer, nSize = 1024) 101 | { 102 | DllCall("wininet\InternetReadFile", "Uint", hFile, "Uint", pBuffer, "Uint", nSize, "UintP", nSize) 103 | Return nSize 104 | } 105 | 106 | File_InternetWriteFile(hFile, pBuffer, nSize = 1024) 107 | { 108 | DllCall("wininet\InternetWriteFile", "Uint", hFile, "Uint", pBuffer, "Uint", nSize, "UintP", nSize) 109 | Return nSize 110 | } 111 | 112 | File_InternetSetFilePointer(hFile, nPos = 0, nMove = 0) 113 | { 114 | Return DllCall("wininet\InternetSetFilePointer", "Uint", hFile, "Uint", nMove, "Uint", 0, "Uint", nPos, "Uint", 0) 115 | } 116 | 117 | File_InternetCloseHandle(Handle) 118 | { 119 | Return DllCall("wininet\InternetCloseHandle", "Uint", Handle) 120 | } 121 | -------------------------------------------------------------------------------- /plugins/_Hash/Hash.ahk: -------------------------------------------------------------------------------- 1 | Hash(pData, nSize, SID = "CRC32", nInitial = 0) 2 | { 3 | CALG_MD5 := 0x8003 4 | CALG_SHA := CALG_SHA1 := 0x8004 5 | If Not CALG_%SID% 6 | { 7 | FormatI := A_FormatInteger 8 | SetFormat, Integer, H 9 | sHash := DllCall("ntdll\RtlComputeCrc32", "Uint", nInitial, "Uint", pData, "Uint", nSize, "Uint") 10 | SetFormat, Integer, %FormatI% 11 | StringTrimLeft, sHash, sHash, 2 12 | StringUpper, sHash, sHash 13 | Return SubStr(0000000 . sHash, -7) 14 | } 15 | 16 | DllCall("advapi32\CryptAcquireContextA", "UintP", hProv, "Uint", 0, "Uint", 0, "Uint", 1, "Uint", 0xF0000000) 17 | DllCall("advapi32\CryptCreateHash", "Uint", hProv, "Uint", CALG_%SID%, "Uint", 0, "Uint", 0, "UintP", hHash) 18 | DllCall("advapi32\CryptHashData", "Uint", hHash, "Uint", pData, "Uint", nSize, "Uint", 0) 19 | DllCall("advapi32\CryptGetHashParam", "Uint", hHash, "Uint", 2, "Uint", 0, "UintP", nSize, "Uint", 0) 20 | VarSetCapacity(HashVal, nSize, 0) 21 | DllCall("advapi32\CryptGetHashParam", "Uint", hHash, "Uint", 2, "Uint", &HashVal, "UintP", nSize, "Uint", 0) 22 | DllCall("advapi32\CryptDestroyHash", "Uint", hHash) 23 | DllCall("advapi32\CryptReleaseContext", "Uint", hProv, "Uint", 0) 24 | 25 | FormatI := A_FormatInteger 26 | SetFormat, Integer, H 27 | Loop, %nSize% 28 | sHash .= SubStr(*(&HashVal + A_Index - 1), -1) 29 | SetFormat, Integer, %FormatI% 30 | StringReplace, sHash, sHash, x, 0, All 31 | StringUpper, sHash, sHash 32 | Return sHash 33 | } 34 | -------------------------------------------------------------------------------- /plugins/filesys/cputil.wdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/plugins/filesys/cputil.wdx -------------------------------------------------------------------------------- /plugins/filesys/cputil1.tbl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/plugins/filesys/cputil1.tbl -------------------------------------------------------------------------------- /plugins/filesys/cputil2.tbl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/plugins/filesys/cputil2.tbl -------------------------------------------------------------------------------- /plugins/myplugin: -------------------------------------------------------------------------------- 1 | ; Globals 2 | ; ------------------------------------ 3 | ; #Res - result 4 | ; 5 | ; #fn - file name without extension 6 | ; #fp - file path 7 | ; #fe - file extension 8 | ; #fd - file directory 9 | ; #no - file number in the list 10 | ; #flag - prev|real 11 | ; 12 | ; #1 - field or param1 if GetFields returns * 13 | ; #2 - unit or param2 if GetFields returns * 14 | ; #3 - contains entire user string, if GetFields returns * 15 | ; 16 | ; #tmp - temporary placeholder (you can also use any of the above unused globals) 17 | ;====================================================================================== 18 | 19 | 20 | MyPlugin: 21 | #Res := "My Plugin " #no 22 | return 23 | 24 | MyPlugin_GetFields: 25 | #Res = 26 | (LTrim 27 | field1 28 | field2|unit21|unit22 29 | ) 30 | return -------------------------------------------------------------------------------- /res/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/res/icon.ico -------------------------------------------------------------------------------- /res/menus.ini: -------------------------------------------------------------------------------- 1 | [FileName] 2 | Name=[N] 3 | Ext=[E] 4 | - 5 | Parent dir=[P] 6 | Grandparent dir=[G] 7 | 8 | [Counter] 9 | Basic=[C] 10 | Set start=[C10] 11 | Set start && increment=[C10+5] 12 | Set start, increment && width=[C10+5:3] 13 | 14 | [DateTime] 15 | Date= 16 | Year= 17 | Month=[M] 18 | Day=[D] 19 | - 20 | Time=[t] 21 | Hour, 24=[h] 22 | Minutes=[m] 23 | Seconds=[s] 24 | 25 | [Date] 26 | dd.mm.yyyy=[D].[M].[Y] 27 | mm.dd.yyyy=[M].[D].[Y] 28 | mm.dd.yy=[M].[D].[y] 29 | - 30 | yy.mm.dd=[y].[M].[D] 31 | yyyy.mm.dd=[Y].[M].[D] 32 | 33 | [Year] 34 | 4 digits=[Y] 35 | 2 digits=[y] 36 | 37 | [Range] 38 | Nth char=[N3] 39 | - 40 | From n to m=[N3-5] 41 | From n to end=[N3-] 42 | From n to -m=[N3--2] 43 | From -n to -m=[N-5-3] 44 | From -n to end=[N-5-] 45 | - 46 | From n, m chars=[N2,3] 47 | From -n, m chars=[N-3,2] 48 | - 49 | Entire path=[1-] 50 | Path from n to m=[3-10] 51 | Drive=[1] 52 | 53 | [Case] 54 | Uppercase=[U] 55 | Lowercase=[L] 56 | First letter of each word=[F] 57 | Unchanged=[n] -------------------------------------------------------------------------------- /temp/MRS Schematic.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/temp/MRS Schematic.bmp -------------------------------------------------------------------------------- /temp/MRS Schematic.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/temp/MRS Schematic.docx -------------------------------------------------------------------------------- /temp/MRS Schematic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/temp/MRS Schematic.gif -------------------------------------------------------------------------------- /temp/MRS-Index.txt: -------------------------------------------------------------------------------- 1 | h1. Multi Rename Script 2 | 3 | h3. Overview 4 | 5 | Multi-Rename Script(MRS) is open source application for massive file renaming. It is not limited to finite number of rename actions. You can rename files based on any criteria and you can write your own. Its up to you if its going to be simple file name manipulation or complex one, like using database or Internet to get information about the new file name. 6 | 7 | MRS is influenced by Total Commander's (TC) Multi-Rename Tool. File name masks from TC will generally work unchanged. TC content plugins are also supported and automatically recognized if you have normal TC installation. This feature alone opens the world to Explorer's Shell Extensions which can be used as rename mask providers. Its not necessary to have Total Commander installed for any of the MRS functionality. 8 | 9 | Additionally, MRS has its native plugin interface using AutoHotKey language. With basic programming experience you can extend file-rename operations. To create/change plugin or even MRS itself, nothing else but text editor is needed. 10 | 11 | 12 | 13 | h3. Features 14 | 15 | * Big number of file rename operations. 16 | * AHK plugins and support for Total Commander "content plugins":Content. 17 | * Perl "regular expressions":AHKre search & replace. 18 | * Real time preview for all files in the list. 19 | * Undo, Presets, MRUs, configurable menus. 20 | * No file limit, works equally fast with any number of files. 21 | * Command line driving and Explorer Shell Extension. 22 | * Unicode. 23 | * Open source, developed in "AutoHotKey":AHK script so you can change any part of the program quickly. 24 | 25 | 26 | h3. Installation 27 | 28 | MRS is portable application. Just unpack the archive to the directory of your choice. 29 | In some systems you will have to add MRS.exe in Data Execution Prevention (DEP) list. You can do so using "System" Control Panel applet (_Advanced -> Performance section -> Data Execution Prevention_ tab). 30 | 31 | To uninstall MRS, simply delete the directory. If you enabled shell extension you need to disable it first. 32 | 33 | 34 | h3. Integration 35 | 36 | Although MRS can be used standalone, its the best to integrate it with your file manager. 37 | 38 | *Explorer* 39 | Enable Shell Extension ( _?->Settings->Enable Shell Extension_ ). 40 | 41 | *Total Commander* 42 | Edit Start menu ( _Start->Change Start Menu_ ) and use following settings: 43 | 44 | bc. Title: Multi-Rename Script 45 | Command: \MRS.exe 46 | Parameters: AutoHotKey.ini %UL 47 | Start In: 48 | 49 | @%UL@ parameter will make TC send Unicode List of files to MRS (requires TC 7.5++). 50 | 51 | You can also recall preset directly from the TC menu to be applied as soon as you activate the menu item, without showing the MRS GUI. To do so specify MRS preset after the @%UL@ parameter or write new preset directly. For instance, to add counter to selected files using TC file list order, use above settings with following Parameters: 52 | 53 | bc. Parameters: AutoHotKey.ini %UL "[C] [N]" 54 | 55 | 56 | For other file managers procedure should be similar. See Command Line section for additional details. 57 | 58 | h3. Usage 59 | 60 | *Rename* 61 | In MRS, you build up a new file names using name-masks, search & replace and casing operations. File name mask is the string describing how to build up a new file name based on the currently processed file name and its position in the file list. Basic masks are always written between [ ]. Anything not among angular brackets is literal. To build up complete mask you concatenate basic masks and literal words. For instance, file name mask: 62 | 63 | bc. No=[C:2] Name=[N4,10] 64 | 65 | renames files in the list so that new file names contain some literals (@No= Name=@), file number in the list specified with 2 digits (@[C:2]@) and 10 characters of original file name starting from 4th character (@[N4,10]@). The result for 2 files in the list is for instance: 66 | 67 | bc. "AFX-Lisbon Acid.mp3" ---> "No=01 Name=Lisabon Acid.mp3" 68 | "AFX-Pitcard.Mp3" ---> "No=02 Name=Pitcard.Mp3" 69 | 70 | 71 | There are 2 unrelated file masks, one that will be expanded to the new file name and one that will form the new file extension (File Extension Mask). You specify them in _File name mask_ and _Ext mask_ GUI fields. Both masks work the same way. 72 | 73 | After the mask, file name is processed with regular expression (RE) search & replace. What you get is converted to appropriate case selected from the _Case_ combo box. 74 | 75 | In the file list, you can see real time preview for your current rename operation. Once you build the mask you can press Start button to rename all files in the list. You can always restore previous names with Undo operation, even if you restart the application. 76 | 77 | *Report* 78 | You can use MRS to generate file and directory reports using plugins. The difference between renaming and reporting operation is simply that you don't use @Start@ button but @Editor Preview@ instead to show generated text. This means that you can use all charachters desired, not only those allowed for the file names. For example, the following mask generates CSV file with details about each file in the list containing the file/directory name, number of files in the diretory, owner, full path, and creation date: 79 | 80 | bc. [N];[=DirSizeCalc.File Count (on demand)] files;[=ShellDetails.Owner];[1-];[=ShellDetails.Date Created] 81 | 82 | 83 | 84 | h3. Interface elements 85 | 86 | *File name mask* 87 | File Name Mask. You can enter mask by typing, or you can expand MRS interface using expander on the middle of the GUI to select mask functions from mask categories. 88 | 89 | *Ext mask* 90 | File Extension Mask. All masks used for a file name can be used here. 91 | 92 | *Search & Replace* 93 | Enter search and replace strings here. You can specify multiple criteria by using | separator (not with RE option enabled). 94 | For instance: 95 | Search for: @ä|ö|ü|@ Replace with: @ae|oe|ue@ 96 | 97 | If RE option is turned on search string is specified as PERL regular expression and you can use backreferences like @$1@ in the replace field. There are number of regular expression options that can be set at the beginning of the search string followed by an close-parenthesis. For instance, the pattern @i)abc.*123@ would turn on the case-insensitive option and search for "abc" followed by "123". 98 | 99 | *Case* 100 | Specify case here to be applied finanally. To apply case on the parts of the file name, use case masks ( @[U], [L]@ ... ). 101 | 102 | 103 | *Expander* 104 | Pressing the little button on the middle of the top side of ListView control will expand user interface. 105 | Expanded interface contains buttons that will let you select rename-mask using categories. Button _Plugins_ will show the menu with list of installed plugins. 106 | AHK plugins are shown bellow Total Commander plugins delimited by separator. 107 | 108 | There is also combo box with presets you saved. Type the name and press ENTER to save the preset. Type the preset name or use the combox box to select the preset. You can delete selected preset by pressing @DEL@ key. Pressing @F12@ will load default preset. 109 | 110 | You can change/add/remove entries from the button menus by editing @res\menus.ini@ file. The format of this file is self explanatory. 111 | 112 | *File List* 113 | This is the list of files to be renamed. Double click the file to create range mask. 114 | 115 | You can add files using command line or drag & drop. 116 | If you specify file name with the list of files as command line parameter, it will be used to populate the file list. The input file must contain one full file path per line. 117 | 118 | You can also add files to the list by dropping them with the mouse. If you drop files again, you will add to the current list unless you hold the @SHIFT@ key. 119 | To remove selected files from the list, select them and press @DELETE@ key. 120 | 121 | Double click the file in the list to set the @N@ mask range based on its name. 122 | 123 | *Start* 124 | Launch rename operation. All renamed files will be removed from the list. Files that can not be renamed due to any kind of error will stay in the list and their Error column will contan error description. 125 | 126 | *Undo* 127 | Undo the last operation. There is only 1 undo and it will not be lost if you restart MRS. 128 | 129 | *Reload* 130 | Reload the result of the pervious rename operation to the list. 131 | 132 | *Preview in editor* 133 | Show preview for all files in the list in the editor. You can use this feature to edit the result manually before doing actual renaming. To do this, save preview in the FileInfo.txt under plugins folder, and use @[=FileInfo]@ as file-rename mask. 134 | 135 | h3. Command line 136 | 137 | MRS accepts 2 command line arguments: 138 | 139 | bc. MRS.exe AutoHotKey.ini [fileList] [presetDef] 140 | 141 | @AutoHotKey.ini@ 142 | Must be set as the first parameter. 143 | 144 | @fileList@ 145 | This is list of full system paths of files you want to rename, each on new line. 146 | 147 | @presetDef@ 148 | This is preset definition to be used immediately on startup. 149 | Preset definition is string containing file mask, extension mask, search string, replace string, RE flag and case option separated by ">" symbol. For instance @[N]>[E]@ is the same as you set file mask to [N] and extension mask to @[E]@ and leaving all other options unchanged in GUI. 150 | 151 | Alternatively u can use preset name by specifying ">" as the first character; for instance, you can write @">Artist - Title"@ on command line to rename files in the @fileList@ using already saved preset named @Artist - Title@. Note that you must use quotation to specify preset name or it will be understood as command line redirection. 152 | The same preset definition is used in MRS configuration file to store presets and last used mask, so you can also copy/paste it from there. 153 | 154 | If presetDef is present on the command line, only progress bar will be shown and application will exit immediately after completing operation. GUI will be shown only if errors occured and it will contain list of problematic files with error descriptions. 155 | 156 | 157 | h3. Using plugins 158 | 159 | Plugins extend the set of basic mask functions. Plugin may provide fields that can be used to specify what information to return about the file. Additionally, fields may have units to choose different format for the field data or specific information part. 160 | To specify plugin in file mask, use @[=plugin.field.unit]@ notation. For instance mask: 161 | 162 | @[N] [=Hash.CRC32] [=File.size.MB]MB ver[=Ver]@ 163 | 164 | will append crc32, file size in megabytes and version to the original file name. 165 | 166 | You can select range from plugin data using syntax: 167 | 168 | @[=FileInfo:4-9]@ 169 | 170 | where range is used the same way as with @[N]@ mask. 171 | 172 | TC plugin ShellDetails provides data from Explorer's shell extensions. 173 | 174 | 175 | h3. Installing plugins 176 | 177 | AHK plugins are single AHK script files and they have .ahk extension. To install AHK plugin, simply copy it to the plugins folder and restart the application. To disable plugin, change its extension to anything but .ahk. 178 | 179 | About TC content plugins, MRS will try to find location of the @wincmd.ini@ using system registry and if that fails, @COMMANDER_PATH@ environment variable. It will then load all plugins found in TC configuration file. To override this behavior, set location of the @wincmd.ini@ in the MRS configuration file, @MRS.ini@ (Section: @Config@, Key: @tcIni@). 180 | 181 | If you don't have TC installed you can still use its content plugins. To install plugin without TC, simply copy it (or its folder) to @\plugins@ folder. To use always plugins from the MRS plugins folder, no matter configuration of your local TC installation, set @tcIni=!@ in MRS.ini @Config@ section. 182 | 183 | To verify plugin installation expand MRS interface and click _Plugins_ button. All installed plugins should be in the list. 184 | 185 | 186 | h3. Writing plugins 187 | 188 | To Create AHK plugin nothing but the text editor is needed. Plugin interface is very simple: 189 | 190 | * Name the file by the plugin. Don't use single character as plugin name nor spaces. 191 | * Plugin must implement 1 subroutine, with the same name as its own. It will receive some parameters about current file name that MRS is processing and it must return the result in the @#Res@ variable. @#fn, #fe, #fp, #fd, #no@ contain file name, file extension, file path, file directory and file number respectively. 192 | * If it has more then 1 field, it must specify field names in the GetFields subroutine separated by new lines (in @#Res@ variable, again). You can use "*" here to say that plugin accepts anything as field name (this can be used to pass arbitrary parameter to the plugin). MRS will later pass the filed name to the plugin as @#1@ parameter to its main subroutine. To specify field unit, set units after the field name using "|" as separator. 193 | * Use @\plugins\myplugin@ file as a template for new plugin. You can use any AutoHotKey function when creating AHK plugin. Check out AHK documentation for details. 194 | * Total commander plugins are dll's so programming tools are required. Check out TC's content plugin SDK for more information. 195 | 196 | h3. Masks 197 | 198 | All masks except plugin names and fields are case sensitive. White space is allowed between mask name and its parameters. 199 | Maks are written betwen angular brackets: @[mask]@ 200 | 201 | |_. mask|_. description| 202 | |\2=. File name| 203 | |N n-m|From n to m, no m means "end", no n means "start"| 204 | |N n,m|From n, m.| 205 | |E n-m|Extension| 206 | |C s+i:w|Counter S-start, i-increment, w-width| 207 | |P|Parent dir| 208 | |G|Grandparent dir| 209 | |\2=. Date Time| 210 | |Y|Year in 4 digit form| 211 | |y|Year in 2 digit form| 212 | |M|Month, 2 digit| 213 | |D|Day, 2 digit| 214 | |t|Time, as defined in current country settings. : is replaced by a dot| 215 | |h|Hours, always in 24 hour 2 digit format| 216 | |m|Minutes, in 2 digit format| 217 | |s|Seconds, in 2 digit format| 218 | |\2=. Case| 219 | |U|All characters after this position in uppercase| 220 | |L|All characters after this position in lowercase| 221 | |F|First letter of each word uppercase after this position, all others lowercase| 222 | |n|All characters after this position again as in original name (upper/lowercase unchanged)| 223 | |\2=. Plugins| 224 | |=Plugin|/3. 3 ways to call plugins. Range can be specified with ':' using N notation: [=plugin:range]| 225 | |=Plugin.field| 226 | |=Plugin.field.unit| 227 | |\2=. Special| 228 | |[|Opening square bracket| 229 | |]|Closing square bracket| 230 | 231 | 232 | h3. About 233 | 234 | MRS is free, open source application. You are encouraged to modify any part of it and share it. If you write cool plugin consider sharing it (via forum for instance) and if its of general usability I will consider including it in the future versions. 235 | 236 | 237 | 238 | |*Developed by*:|Miodrag Milić| 239 | |*License*:|"Unlicense":LIC| 240 | |*Contact*:| miodrag.milic@gmail.com| 241 | |*Location*:| Belgrade, Serbia| 242 | 243 | 244 | 245 | _Last Changed: 04/05/2010_ 246 | 247 | 248 | [LIC]http://unlicense.org/UNLICENSE 249 | [AHK]http://www.AutoHotkey.com 250 | [AHKre]http://www.autohotkey.com/docs/misc/RegEx-QuickRef.htm 251 | [Content]http://www.totalcmd.net/directory/content.html 252 | -------------------------------------------------------------------------------- /temp/MRS-WritePlugins.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/temp/MRS-WritePlugins.txt -------------------------------------------------------------------------------- /temp/TC Content Plugins SDK/contentplugin.HLP: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/temp/TC Content Plugins SDK/contentplugin.HLP -------------------------------------------------------------------------------- /temp/TC Content Plugins SDK/winhlp32.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/majkinetor/multi-rename-script/10c5d20aa3e3ecff2de5e5b3a459e29f6bff5321/temp/TC Content Plugins SDK/winhlp32.exe -------------------------------------------------------------------------------- /temp/Textile 2 Html/style.css: -------------------------------------------------------------------------------- 1 | BODY { 2 | font-family : Arial, Tahoma, Helvetica, sans-serif; 3 | margin-left : 8%; 4 | margin-right : 5%; 5 | } 6 | 7 | PRE { 8 | margin-left: 5%; 9 | } 10 | 11 | H3 { 12 | border-bottom: solid; 13 | border-width: 1px; 14 | padding: 5px; 15 | color : #990000; 16 | font-family : Verdana, Tahoma, Arial, Helvetica, sans-serif; 17 | font-size : 140%; 18 | margin-left : -5%; 19 | margin-top : 2em; 20 | } 21 | 22 | BLOCKQUOTE { 23 | margin-left : 0; 24 | } 25 | 26 | TH { 27 | background-color : #FFFFFF; 28 | } 29 | 30 | TD { 31 | background-color : #F0F0F0; 32 | } 33 | -------------------------------------------------------------------------------- /temp/Textile 2 Html/textilePrev.php: -------------------------------------------------------------------------------- 1 | ' . 15 | $textile->TextileThis($data) . ''; 16 | 17 | 18 | $fileOut = getenv('TEMP') . "\_mm_textile_preview.html"; 19 | if (file_exists($fileOut)) unlink($fileOut); 20 | 21 | if (!$hOut = fopen($fileOut, 'a')){ 22 | echo "Cannot open file for writting"; 23 | exit; 24 | } 25 | 26 | if (fwrite($hOut, $data) === FALSE) { 27 | echo "Cannot write to file ($fileOut)"; 28 | exit; 29 | } 30 | fclose($hOut); 31 | exec($fileOut); 32 | ?> 33 | --------------------------------------------------------------------------------