/* Wild Card Helper Panel v.0.1 by Jorge Vásquez Pérez yorchWyorchnet.com https://yorchnet.com/ https://github.com/jorgevasquezp Changes 0.2: - None TODO: - Get artist initials in Windows too. */ (function createNullsFromPaths (thisObj) { /* Build UI */ function buildUI(thisObj) { var windowTitle = "WC Artist Helper"; var firstButton = "+1"; var secondButton = "own"; var thirdButton = "?"; var win = (thisObj instanceof Panel)? thisObj : new Window('palette', windowTitle); win.spacing = 0; win.margins = 4; var myButtonGroup = win.add ("group"); myButtonGroup.spacing = 4; myButtonGroup.margins = 0; myButtonGroup.orientation = "row"; win.button1 = myButtonGroup.add ("button", undefined, firstButton); win.button2 = myButtonGroup.add ("button", undefined, secondButton); win.button3 = myButtonGroup.add ("button", undefined, thirdButton); myButtonGroup.alignment = "center"; myButtonGroup.alignChildren = "center"; win.button1.onClick = function(){ versionUpSelectedComps(); } win.button2.onClick = function(){ button2Click(); } win.button3.onClick = function(){ button3Click(); } win.layout.layout(true); return win } // Show the Panel var w = buildUI(thisObj); if (w.toString() == "[object Panel]") { w; } else { w.show(); } /* General functions */ function pad(n,i){ //pad n with ceroes up to i places. if (String(n).length>=i){ return String(n) }else{ dif = i- (String(n)).length; padding = ""; for (p=0;p