--FUNCTIONS struct Myfunctions ( public fn saveini thedir theoutputfile = ( GetINISetting thedir "SectionName" "KeyName" -- create and set new ini file setINISetting theoutputfile "Usefull_Frames" "in1_ini" in1.text ), --Load Ini fn loadini thedir theimputfile = ( in1.text = getINISetting theimputfile "Usefull_Frames" "in1_ini" ), -- create Tool.ini fn createToolini = ( inidir = getdir #userscripts + "\\Tool" nameini = "Tool.ini" theoutput = inidir + "\\" + nameini GetINISetting inidir "SectionName" "KeyName" -- create and set Tool ini file setINISetting theoutput "Usefull_Frames" "in1_ini" "1" ), -- Clear All fn cleareditvar = ( in1.text = "" ), --Load tempini -- Load a parameter into the main funciton, get default if no one found fn loadtempini theparam theparamcategory = ( theparamini = theparam + "_ini" testtemp = getINISetting tempini theparamcategory theparamini count = testtemp.count if count == 0 then ( theparam = getINISetting Toolini theparamcategory theparamini ) else ( theparam = testtemp ) ), -- Lister des fichiers dans un dossier et les ajouter à une dropdownlist --directorylenghtplus = 1 si network path, 2 sinon fn listingfiles directory extension extensionlength directorylenghtplus thedropdownlist = ( ), -- bdigit d'un nombre: convertir un nombre en paddin XXXX (exemple: 1 -> 0001) return: string fn bdigit nb = ( ), fn getportename prox = ( ), --Assign le material d'"obj_shader_name" au layers correspondant a findthelayers fn assignmattolayer obj_shader_name findthelayers = ( ) ) --END FUNCTIONS ( try(DestroyDialog main)catch() -- GLOBAL VARS global inidir = getdir #userscripts + "\\Tool" global tempini = inidir + "\\_temp.ini" global Toolini = inidir + "\\Tool.ini" Myfunctions; clearListener() ) -- END VARS -- STARTING HERE if (doesFileExist tempini) == true then ( ) else ( ) -- EDITVAR ROLLOUT rollout editvar "Tool Settings " width:250 height:550 ( ) -- MAIN ROLLOUT rollout main "Tool - Create" width:250 height:200 ( ) createDialog main 250 125