/* ####################### */ /* ### Session Manager ### */ /* ####################### */ /* */ /* by FluxTorpedoe */ /* _______________________ */ /* version 4.a2 - 2015-06-20 */ /* Use/Modify freely */ /* ######################################################################################### */ /* ############################ FluxTorpedoe's (ir)Rationale ############################# */ /* ######################################################################################### */ // $Var = local variable; // $CAP_Var = global variable; // $FULLCAPVAR = permanent variable; // $*... = any string; $*d_... = delta string (to be added); $*b_... = binary value; $*l_... = list; $*a_...= array; $*n_... = number; // - - - // e.g. $PRE_Item = Item Name; $PRE_b_Item = Item exists ; $PRE_l_Items = List of items; // ----------------------------------------------------------------------------------------- */ "_Initialize" // ------------------<> Language file $SM_LANGUAGE_FILE = gettoken(listfolder(self("path"), self("base").".??"), 1, "|"); perm $SM_LANGUAGE_FILE = ($SM_LANGUAGE_FILE)? $SM_LANGUAGE_FILE : self("file"); // TRANSLATORS: Append the content of "SessionManager.en" at the end of your local language file and remove "//" below // perm $SM_LANGUAGE_FILE = "\Language+SM.lng"; /* ######################################################################################### */ /* ######################################################################################### */ // global $Clock_1; // Timer initialize (to help speed optimization) // $Clock_1 = now("ssfff"); global $GEN_SM_Version; $GEN_SM_Version = "4.a1"; // ------------------<> Version compatibility check end ( < "15.00.0518"), " ".i(1,01)." $GEN_SM_Version ".i(1,02)." v15.00.0518 ".i(1,03)." ".i(1,04)." 3.7 ".i(1,05)." "; // ------------------<> INI file initialization global $GEN_CurScript, $GEN_Ini; $GEN_CurScript = self("file"); $IniName = self("base").".ini"; $GEN_Ini = self("path")."\".$IniName; // ------------------<> Use alternate INI if exists("\[User]\$IniName") { $GEN_Ini = "\[User]\$IniName"; } // ------------------<> On first run, if XY not optimized, propose to update/tweak if (!exists("$GEN_Ini") && !getkey("TabsetsNoPaneActivation", "Settings")) { load("$GEN_CurScript", "_Options-Tweak"); } // --------------------------------------------------------->> INI // Create INI file on first run, or rebuild default INI file if it has been damaged global $DYN_InpSessLay; if !getkey("", "General", $GEN_Ini){ setkey("0", "Reserved", "General", $GEN_Ini); } if !getkey("", "Settings", $GEN_Ini){ setkey("1", "EnableLayouts", "Settings", $GEN_Ini); setkey("0", "AutoOptimizeTree", "Settings", $GEN_Ini); setkey("0", "AutoSave", "Settings", $GEN_Ini); setkey("0", "Confirmation", "Settings", $GEN_Ini); setkey("0", "SessionListOnTop", "Settings", $GEN_Ini); setkey("1", "InfoPanelPreview", "Settings", $GEN_Ini); setkey("0", "Xtras", "Settings", $GEN_Ini); setkey("0", "LayFallbackDef", "Settings", $GEN_Ini); setkey("0", "StdResetWithLay", "Settings", $GEN_Ini); setkey("0", "Separator", "Settings", $GEN_Ini); } if !getkey("", "Layout ¦‡¦-Default-¦‡¦", $GEN_Ini){ $DYN_InpSessLay = "¦‡¦-Default-¦‡¦"; load "$GEN_CurScript", "_Layout-Save"; setkey(toolbar(), "XTRA-Toolbar", "Layout ¦‡¦-Default-¦‡¦", $GEN_Ini); /* setkey("0", "XTRA-Catalog", "Layout ¦‡¦-Default-¦‡¦", $GEN_Ini); setkey("0", "XTRA-Tags", "Layout ¦‡¦-Default-¦‡¦", $GEN_Ini); setkey("0", "XTRA-TagsList", "Layout ¦‡¦-Default-¦‡¦", $GEN_Ini); setkey("0", "XTRA-FileAssoc", "Layout ¦‡¦-Default-¦‡¦", $GEN_Ini);*/ } if !getkey("", "Layout ¦‡¦-Last-¦‡¦", $GEN_Ini){ $DYN_InpSessLay = "¦‡¦-Last-¦‡¦"; load "$GEN_CurScript", "_Layout-Save"; setkey(toolbar(), "XTRA-Toolbar", "Layout ¦‡¦-Last-¦‡¦", $GEN_Ini); /* setkey("0", "XTRA-Catalog", "Layout ¦‡¦-Default-¦‡¦", $GEN_Ini); setkey("0", "XTRA-Tags", "Layout ¦‡¦-Default-¦‡¦", $GEN_Ini); setkey("0", "XTRA-TagsList", "Layout ¦‡¦-Default-¦‡¦", $GEN_Ini); setkey("0", "XTRA-FileAssoc", "Layout ¦‡¦-Default-¦‡¦", $GEN_Ini);*/ } // General - RESERVED (not needed anymore, maybe later...) // global $GEN_###; // $GEN_### = getkey("Reserved", "General", $GEN_Ini); // ---------------------------------------------------------<< // ------------------<> Settings global $STG_EnableLayouts, $STG_AutoOptimizeTree, $STG_AutoSave, $STG_Confirmation, $STG_SessionListOnTop, $STG_InfoPanelPreview, $STG_Xtras, $STG_LayFallbackDef, $STG_StdResetWithLay, $STG_Separator; $STG_EnableLayouts = getkey("EnableLayouts", "Settings", $GEN_Ini); $STG_AutoOptimizeTree = getkey("AutoOptimizeTree", "Settings", $GEN_Ini); $STG_AutoSave = getkey("AutoSave", "Settings", $GEN_Ini); $STG_Confirmation = getkey("Confirmation", "Settings", $GEN_Ini); $STG_SessionListOnTop = getkey("SessionListOnTop", "Settings", $GEN_Ini); $STG_InfoPanelPreview = getkey("InfoPanelPreview", "Settings", $GEN_Ini); $STG_Xtras = getkey("Xtras", "Settings", $GEN_Ini); $STG_LayFallbackDef = getkey("LayFallbackDef", "Settings", $GEN_Ini); $STG_StdResetWithLay = getkey("StdResetWithLay", "Settings", $GEN_Ini); $STG_Separator = getkey("Separator", "Settings", $GEN_Ini); // ------------------<> Layout variables global $GEN_LayUsed, $GEN_LayON; $GEN_LayUsed = (strlen(regexreplace(readfile("$GEN_Ini"), "[^\[]", "")) > 4 )? 1 : 0; // Check existence of user layouts (other than the 4 SM's default [Ini entries]) $GEN_LayON = ($STG_EnableLayouts && $GEN_LayUsed)? 1 : 0; // Layout loading is active /* ######################################################################################### */ /* ######################################################################################### */ // --------------------------------------------------------->> Variables declaration: generic global $PRE_l_AvailSess, // [$| ] List of available sessions (sep and end "|") $PRE_l_AvailSessDet, // [$| ] Detailed list of available sessions (w/ layout) (sep and end "|") $PRE_n_AvailSess, // [#|0] Number of available sessions $PRE_CurSess, // [$| ] Current session name if valid $PRE_CurSessInv, // [$| ] Current session name if inverted $PRE_CurSessLay, // [$| ] Current session name if valid and has layout $PRE_SessTab1, // [$| ] Pane 1 tabset name if from session (valid or not) $PRE_SessTab1Inv, // [$| ] Pane 1 tabset name if from session inverted $PRE_SessTab2, // [$| ] Pane 2 tabset name if from session (valid or not) $PRE_SessTab2Inv; // [$| ] Pane 2 tabset name if from session inverted global $PRE_AutoSave, // [$| ] Name of Autosaved session if exists $PRE_CurAutoSave; // [$| ] Current Autosaved session name if valid /* - FYI - Defined dynamically (Do not declare here) - $DYN_InpSess, // [$] Input session name to act upon $DYN_InpSessLay, // [$] Input layout-session name to act upon $DYN_b_InpSessLay, // [1|0] Input session has layout */ global // Visual affixes $GEN_LaySuffix, $GEN_AutoSaveSuffix, $GEN_TmpSession, $GEN_Icon_Lay; $GEN_LaySuffix = " ".i(1,06); // For detailed list (used for Delete+) $GEN_AutoSaveSuffix = " ".i(1,07); $GEN_TmpSession = i(1,08); $GEN_Icon_Lay = ":panelshow"; // Icon of inactive layout sessions, and layout menu entries // Use custom icon for active session (e.g. XYplorer\Data\Icons\SessionManager.ico) $CustomIcon = "\".self("base").".ico"; $CustomIcon_Std = exists($CustomIcon)? $CustomIcon: ":favs"; $CustomIcon_Lay = exists($CustomIcon)? $CustomIcon: ":favs"; // Use custom icon for active session with layout (e.g. XYplorer\Data\Icons\SessionManager_Layout.ico) $CustomIcon = "\".self("base")."_Layout.ico"; $CustomIcon_Lay = exists($CustomIcon)? $CustomIcon: $CustomIcon_Lay; $d_Icon_ActiveSession_Std = "|$CustomIcon_Std|1"; // Icon of active non-layout session $d_Icon_ActiveSession_Lay = "|$CustomIcon_Lay|1"; // Icon of active layout session // ---------------------------------------------------------<< // --------------------------------------------------------->> Variables declaration: current session $oset1 = gettoken(, -1, "\"); $oset2 = gettoken(, -1, "\"); $sset1 = regexreplace($oset1, "§(1|2)§_", ""); $sset2 = regexreplace($oset2, "§(1|2)§_", ""); $PRE_SessTab1 = ($sset1 != $oset1)? $sset1 : ""; $PRE_SessTab2 = ($sset2 != $oset2)? $sset2 : ""; $PRE_SessTab1Inv = ($oset1 Like "*§2§_*")? $sset1 : ""; $PRE_SessTab2Inv = ($oset2 Like "*§1§_*")? $sset2 : ""; $PRE_CurSessInv = ($PRE_SessTab1Inv && ($PRE_SessTab1Inv == $PRE_SessTab2Inv)) ? $PRE_SessTab1Inv : ""; $PRE_CurSess = (!$PRE_CurSessInv && ($PRE_SessTab1 == $PRE_SessTab2))? $PRE_SessTab1 : ""; $PRE_CurSessLay = (getkey("", "Layout ".replace($PRE_CurSess, $GEN_AutoSaveSuffix), $GEN_Ini))? replace($PRE_CurSess, $GEN_AutoSaveSuffix) : ""; // ---------------------------------------------> Xtras if $STG_Xtras { global $PRE_Xtra_Toolbar, $PRE_Xtra_Catalog, $PRE_Xtra_Tags, $PRE_Xtra_FileAssoc; if $PRE_CurSessLay { $Section = "Layout ".$PRE_CurSessLay; $PRE_Xtra_Toolbar = getkey("XTRA-Toolbar", $Section, $GEN_Ini); /* Xtras-WIP $PRE_Xtra_Catalog = getkey("XTRA-Catalog", $Section, $GEN_Ini); $PRE_Xtra_Tags = getkey("XTRA-Tags", $Section, $GEN_Ini); $PRE_Xtra_FileAssoc = getkey("XTRA-FileAssoc", $Section, $GEN_Ini); */ } } // ---------------------------------------------< // ---------------------------------------------------------<< // ------------------------------------------------------------------------<> Building-up list of sessions global $MEN_l_sessions, $MEN_About; set $d_xtra; $l_AllTabsets = folderreport("dirsrel", r, ."\Panes", , , "|"); $l_AllTabsets_1 = replace(regexmatches($l_AllTabsets, "§1§_[^\|]+", "|"), "§1§_"); $l_AllTabsets_2 = replace(regexmatches($l_AllTabsets, "§2§_[^\|]+", "|"), "§2§_"); if ($l_AllTabsets_1 != $l_AllTabsets_2) { // If incomplete sessions set $l_AllTabsets; foreach ($tsession, $l_AllTabsets_1, "|") { if (strpos($l_AllTabsets_2, "|".$tsession."|") != -1) { $l_AllTabsets = $tsession."|".$l_AllTabsets; } } } else { $l_AllTabsets = "|".$l_AllTabsets_1."|"; } status "Session Manager", , "progress"; // ------------------------------<> Order list of sessions $l_SessionsOrder = replace(formatlist(getkey("SessionsOrder", "General", $GEN_Ini), "v", "|"), "||", "|"); if $l_SessionsOrder { foreach ($tsession, $l_SessionsOrder, "|") { if ($tsession == "-") { $l_AllTabsets = "-|".$l_AllTabsets; } elseif ($l_AllTabsets Like "*|$tsession|*") { $l_AllTabsets = $tsession."|".replace($l_AllTabsets, "|".$tsession."|", "|"); } } } // ------------------------------<> Autosave identification if $STG_AutoSave { $AutoSaveChk = regexmatches($l_AllTabsets, "[^\|]+?(?=".$GEN_AutoSaveSuffix.")"); if $AutoSaveChk { $PRE_AutoSave = $AutoSaveChk; } } // ------------------------------------------------------------------------>>> Listing all (potential) sessions one by one foreach ($tsession, $l_AllTabsets, "|") { if $tsession { if ($tsession == "-") { $MEN_l_sessions = $MEN_l_sessions."-"; } else { // --------------------------------------------------------->> If valid session $d_Script = (getkey("Script", $tsession, $GEN_Ini))? " ®" : ""; // ------------------<> Iconize active session $d_SessAct = ($tsession == replace($PRE_CurSess, $GEN_AutoSaveSuffix))? "$d_Script$d_Icon_ActiveSession_Std" : $d_Script; // ---------------------------------------------> Layout sessions if ($GEN_LayON && getkey("", "Layout ".$tsession, $GEN_Ini)) { // ------------------------------> Xtras if $STG_Xtras { $d_xtra = getkey("XTRA-Toolbar", "Layout ".$tsession, $GEN_Ini)? " ¶": $d_xtra; /* Xtras-WIP $d_xtra = getkey("XTRA-Catalog", "Layout ".$tsession, $GEN_Ini)? "$d_xtra [C]": $d_xtra; $d_xtra = getkey("XTRA-Tags", "Layout ".$tsession, $GEN_Ini)? "$d_xtra [T]": $d_xtra; $d_xtra = getkey("XTRA-FileAssoc", "Layout ".$tsession, $GEN_Ini)? "$d_xtra [F]": $d_xtra; */ $d_xtra = replace($d_xtra, "] [", ","); } // ------------------------------< // ------------------<> Create detailed list of available sessions $PRE_l_AvailSessDet = $PRE_l_AvailSessDet.$tsession.$GEN_LaySuffix.$d_xtra."|"; // ------------------<> Iconize layout-sessions $d_SessAct = ($tsession == replace($PRE_CurSess, $GEN_AutoSaveSuffix))? $d_Script$d_xtra$d_Icon_ActiveSession_Lay : $d_Script.$d_xtra."|$GEN_Icon_Lay"; // ------------------<> Reset Xtras $d_xtra = ""; // ---------------------------------------------< // ---------------------------------------------> Regular sessions } else { $PRE_l_AvailSessDet = $PRE_l_AvailSessDet.$tsession."|"; } // ---------------------------------------------< if ($tsession UnLike "*$GEN_AutoSaveSuffix") { if ($STG_AutoSave && (($tsession == $PRE_AutoSave) || (!$PRE_AutoSave && ($tsession == $PRE_CurSess)))) { if ($tsession == replace($PRE_CurSess, $GEN_AutoSaveSuffix)) { $PRE_CurAutoSave = ($PRE_AutoSave)? $tsession : ""; $MEN_l_sessions = $MEN_l_sessions."$tsession$GEN_AutoSaveSuffix$d_SessAct"." global $DYN_InpSess; $DYN_InpSess = ""$tsession""; load(""$GEN_CurScript"", ""_Reset"");"; } else { $MEN_l_sessions = $MEN_l_sessions."$tsession$GEN_AutoSaveSuffix$d_SessAct"." global $DYN_InpSess; $DYN_InpSess = ""$tsession$GEN_AutoSaveSuffix""; load(""$GEN_CurScript"", ""_Load"");"; } } else { $action = ($tsession != $PRE_CurSess)? "_Load" : "_Reset"; $MEN_l_sessions = $MEN_l_sessions."$tsession$d_SessAct"." global $DYN_InpSess; $DYN_InpSess = ""$tsession""; load(""$GEN_CurScript"", ""$action"");"; } // ------------------------------<> Create list of available sessions $PRE_l_AvailSess = $PRE_l_AvailSess.$tsession."|"; $PRE_n_AvailSess++; } // ---------------------------------------------------------<< } } } // ------------------------------------------------------------------------<<< // ------------------------------------------------------------------------>>> Compiling and ordering list of sessions if $MEN_l_sessions { if ($STG_AutoSave && ($PRE_n_AvailSess < 2)) { $MEN_l_sessions = replace($MEN_l_sessions, $GEN_AutoSaveSuffix); } // ------------------<> Remove separators when ordered sessions are missing (manually deleted) $MEN_l_sessions = regexreplace($MEN_l_sessions, '"-"\s*"-"'); // ------------------<> Session list at bottom if !$STG_SessionListOnTop { if $STG_Separator { $MEN_l_sessions = "-"."               •••••••••••••••••••••"."-".$MEN_l_sessions; } else { $MEN_l_sessions = "-".$MEN_l_sessions; } } // ------------------<> Temporary session $TmpSession = regexmatches($MEN_l_sessions, '"'.$GEN_TmpSession.'.*\n.*\r\n'); if $TmpSession { if ($PRE_n_AvailSess > 1) { $MEN_l_sessions = replace($MEN_l_sessions, $TmpSession, "")."-".$TmpSession; } $MEN_l_sessions = regexreplace($MEN_l_sessions, '("-"\r\n\r\n){2}', "$1"); // Remove separator if no real session exists } // ------------------<> About $MEN_About = i(1,09)."|:info"; $MEN_About2 = i(1,10)."|:favs|1"; $MEN_About = ($PRE_CurSess)? $MEN_About : $MEN_About2; if !$STG_SessionListOnTop { $MEN_l_sessions = $MEN_l_sessions."-"."$MEN_About"." load(""$GEN_CurScript"", ""_About"");"; } // ------------------<> Session list on top if $STG_SessionListOnTop { if $STG_Separator { $MEN_l_sessions = $MEN_l_sessions."-""               •••••••••••••••••••••""-"; } else { $MEN_l_sessions = $MEN_l_sessions."-"; } } // ------------------<> About when no session exists } else { $MEN_About = i(1,10)."|:favs|1"; if !$STG_SessionListOnTop { $MEN_l_sessions = "-"."$MEN_About"." load(""$GEN_CurScript"", ""_About"");"; } } // ------------------------------------------------------------------------<<< /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* #######################*/ /* ### Main Functions ###*/ /* #######################*/ "MainMenu" global $GEN_CurScript, $GEN_LayON, $PRE_CurSess, $PRE_CurSessLay, $PRE_n_AvailSess, $GEN_TmpSession, $GEN_Icon_Lay; global $PRE_AutoSave, $GEN_AutoSaveSuffix, $PRE_CurAutoSave; global $STG_Confirmation, $STG_SessionListOnTop, $STG_EnableLayouts, $STG_StdResetWithLay, $STG_LayFallbackDef, $STG_AutoSave, $MEN_l_sessions, $MEN_About; $Menu = ""; $d_Conf = ($STG_Confirmation)? "..." : ""; if $STG_SessionListOnTop { $Menu = $Menu.$MEN_l_sessions; } // --------------------------------------------------------->> Reset and Update // ------------------------------<> If using valid session if $PRE_CurSess { // ------------------<> If temporary session if ($PRE_CurSess == $GEN_TmpSession) { $Menu = $Menu.'"'.i(2,01)."$d_Conf|:tabsets".'"'.." load(""$GEN_CurScript"", ""_Reset"");"; $Menu = $Menu.'"'.i(2,02)."$d_Conf|:tabsets".'"'.." load(""$GEN_CurScript"", ""_Update"");"; // ------------------<> If Autosave activated } elseif ($STG_AutoSave && (!$PRE_AutoSave || $PRE_CurAutoSave)) { // ------------------<> If session is autosave and has layout if ($GEN_LayON && $PRE_CurSessLay) { $Menu = $Menu.'"'.i(2,03)."$d_Conf|:tabsets".'"'.." load(""$GEN_CurScript"", ""_Reset"");"; $Menu = $Menu.'"'.i(2,04)."$d_Conf|:tabsets".'"'.." load(""$GEN_CurScript"", ""_Update"");"; // ------------------<> if session is autosave and doesn't have layout } else { $Menu = $Menu.'"'.i(2,05)."$d_Conf|:tabsets".'"'.." load(""$GEN_CurScript"", ""_Reset"");"; $Menu = $Menu.'"'.i(2,06)."$d_Conf|:tabsets".'"'.." load(""$GEN_CurScript"", ""_Update"");"; } // ------------------<> If layouts enabled and active session has layout } elseif ($GEN_LayON && $PRE_CurSessLay) { $Menu = $Menu.'"'.i(2,07)."$d_Conf|:tabsets".'"'.." load(""$GEN_CurScript"", ""_Reset"");"; $Menu = $Menu.'"'.i(2,08)."$d_Conf|:tabsets".'"'.." load(""$GEN_CurScript"", ""_Update"");"; } else { // ------------------<> If layouts enabled and active session doesn't have layout, but 'Reset with Default' ON if ((!$GEN_LayON && $STG_StdResetWithLay) || ($GEN_LayON && $STG_LayFallbackDef)) { $Menu = $Menu.'"'.i(2,09)."$d_Conf|:tabsets".'"'.." load(""$GEN_CurScript"", ""_Reset"");"; } else { $Menu = $Menu.'"'.i(2,10)."$d_Conf|:tabsets".'"'.." load(""$GEN_CurScript"", ""_Reset"");"; } $Menu = $Menu.'"'.i(2,11)."$d_Conf|:tabsets".'"'.." load(""$GEN_CurScript"", ""_Update"");"; } // ------------------------------<> If using invalid session } else { $Menu = $Menu.'"'.i(2,10)."$d_Conf".'"'.; $Menu = $Menu.'"'.i(2,11)."$d_Conf".'"'.; } // ---------------------------------------------------------<< // --------------------------------------------------------->> Autosave if ($STG_AutoSave && ($PRE_n_AvailSess > 1)) { $ResetAutoSave = " delete 1, 0, ""\Panes\§1§_$PRE_AutoSave$GEN_AutoSaveSuffix|\Panes\§2§_$PRE_AutoSave$GEN_AutoSaveSuffix""; wait 300; status ""Autosave reset successfully"";"; if (!$PRE_AutoSave || $PRE_CurAutoSave) { $Menu = $Menu.'"'.i(2,12).'"'.; } else { $Menu = $Menu.'"'.i(2,12)."|:queue".'"'..$ResetAutoSave; } } $Menu = $Menu."-"; // ---------------------------------------------------------<< // --------------------------------------------------------->> Save, SaveTemp, Rename, Delete // ------------------<> Save $Menu = $Menu.'"'.i(2,13)."...|:savesett".'"'.." load(""$GEN_CurScript"", ""_Save"");"; // ------------------<> Save temporary if ($PRE_CurSess != $GEN_TmpSession) { $Menu = $Menu.'"'.i(2,14).'"'.." load(""$GEN_CurScript"", ""_Save-Temporary"");"; } // ------------------<> Rename if ($PRE_CurSess && ($PRE_CurSess != $GEN_TmpSession)) { $Menu = $Menu.'"'.i(2,15)."...|:rename".'"'.." load(""$GEN_CurScript"", ""_Rename"");"; } else { $Menu = $Menu.'"'.i(2,15)."...".'"'.; } // ------------------<> Delete if $PRE_n_AvailSess { // if session active $Menu = $Menu.'"'.i(2,16)."...|:del".'"'.." load(""$GEN_CurScript"", ""_Delete"");"; } else { $Menu = $Menu.'"'.i(2,16)."...".'"'.; } $Menu = $Menu."-"; // ---------------------------------------------------------<< // ------------------<> Layout menu $Menu = $Menu.'"'.i(2,17).">|$GEN_Icon_Lay".'"'.." load(""$GEN_CurScript"", ""_LayoutSessions-Menu"");"; // ------------------<> Options menu $Menu = $Menu.'"'.i(2,18).">|:conf".'"'.." load(""$GEN_CurScript"", ""_Options-Menu"");"; if !$STG_SessionListOnTop { $Menu = $Menu.$MEN_l_sessions; } else { // ------------------<> About $Menu = $Menu."-"."$MEN_About"." load(""$GEN_CurScript"", ""_About"");"; } // global $Clock_1; // Timer Check // status eval(now("ssfff") - $Clock_1), "FF0000"; load($Menu, , s); /* ######################################################################################### */ /* ######################################################################################### */ "_Load" global $GEN_CurScript, $GEN_Ini, $GEN_LayON, $STG_AutoOptimizeTree, $STG_AutoSave, $STG_InfoPanelPreview, $STG_LayFallbackDef, $STG_StdResetWithLay, $STG_Xtras; global $PRE_CurSess, $PRE_CurSessLay, $PRE_CurSessInv, $PRE_SessTab1Inv, $PRE_SessTab2Inv, $PRE_AutoSave, $PRE_CurAutoSave, $GEN_AutoSaveSuffix; global $DYN_InpSess, $DYN_InpSessLay, $DYN_b_InpSessLay, $DYN_NoInput; global $PRE_Xtra_Toolbar, $PRE_Xtra_Catalog, $PRE_Xtra_Tags, $PRE_Xtra_FileAssoc; if !$GEN_CurScript { // If accessed externally from Catalog, CKS, UDC, etc. sub "_Initialize"; } // --------------------------------------------------------->> Autosave if $STG_AutoSave { if ($PRE_CurAutoSave && (($DYN_InpSess == $PRE_CurSess) || ($DYN_InpSess$GEN_AutoSaveSuffix == $PRE_CurSess))) { // Reset Autosave session to original $DYN_InpSess = $PRE_CurAutoSave; } elseif ((replace($DYN_InpSess, $GEN_AutoSaveSuffix) != replace($PRE_CurSess, $GEN_AutoSaveSuffix)) && (!$PRE_AutoSave || $PRE_CurAutoSave)) { if $PRE_CurAutoSave { // Update $PRE_CurAutoSave = $PRE_CurSess; $DYN_NoInput = 1; tabset("save", , 1); wait 10; tabset("save", , 2); } else { // Save tabset("saveas", "§1§_$PRE_CurSess$GEN_AutoSaveSuffix", 1); wait 10; tabset("saveas", "§2§_$PRE_CurSess$GEN_AutoSaveSuffix", 2); } } elseif ($DYN_InpSess == $PRE_AutoSave) { // If accessed externally and session has AutoSave, load AutoSave instead $DYN_InpSess = $PRE_AutoSave$GEN_AutoSaveSuffix; } } // ---------------------------------------------------------<< // --------------------------------------------------------->> Reset if trying to reload active session if (!$PRE_CurAutoSave && ($DYN_InpSess == $PRE_CurSess)) { sub "_Reset"; end 1==1, , 1; } // ---------------------------------------------------------<< // ------------------------------------------------------------------------>>> Loading if ($DYN_InpSess != "") { end ($PRE_CurSessInv == $DYN_InpSess), "".i(3,01)." '$DYN_InpSess' , ".i(3,02)." ".i(3,03)." '$DYN_InpSess' . "; // --------------------------------------------------------->> Layout // Load (and save previous if needed) $DYN_InpSessMaster = replace($DYN_InpSess, $GEN_AutoSaveSuffix); $DYN_b_InpSessLay = (getkey("", "Layout ".$DYN_InpSessMaster, $GEN_Ini))? 1 : 0; if (($GEN_LayON && ($PRE_CurSessLay || $DYN_b_InpSessLay || $STG_LayFallbackDef)) || (!$GEN_LayON && $STG_StdResetWithLay)) { if (($STG_LayFallbackDef && !$DYN_b_InpSessLay) || !$GEN_LayON) { // If 'Reset to default' or 'Fallback to default' ON $DYN_InpSessLay = "¦‡¦-Default-¦‡¦"; } else { $DYN_InpSessLay = (!$STG_LayFallbackDef && $PRE_CurSessLay && !$DYN_b_InpSessLay)? "¦‡¦-Last-¦‡¦" : $DYN_InpSessMaster; // ---------------------------------------------> Xtras if $STG_Xtras { if $DYN_b_InpSessLay { $DYN_Xtra_Toolbar = getkey("XTRA-Toolbar", "Layout ".$DYN_InpSessMaster, $GEN_Ini); /* Xtras-WIP $DYN_Xtra_Catalog = getkey("XTRA-Catalog", "Layout ".$DYN_InpSess, $GEN_Ini); $DYN_Xtra_Tags = getkey("XTRA-Tags", "Layout ".$DYN_InpSess, $GEN_Ini); $DYN_Xtra_FileAssoc = getkey("XTRA-FileAssoc", "Layout ".$DYN_InpSess, $GEN_Ini); */ if $DYN_Xtra_Toolbar { if !$PRE_Xtra_Toolbar {setkey(toolbar(), "XTRA-Toolbar", "Layout ¦‡¦-Last-¦‡¦", $GEN_Ini);} // Save last Toolbar toolbar($DYN_Xtra_Toolbar); // Load new Toolbar --- Visual BUG cause by button menu overlay } } } } if !$DYN_b_InpSessLay { if $PRE_Xtra_Toolbar {toolbar(getkey("XTRA-Toolbar", "Layout ¦‡¦-Last-¦‡¦", $GEN_Ini));} // Load last Toolbar } // ---------------------------------------------< load "$GEN_CurScript", "_Layout-Load"; } // ---------------------------------------------------------<< // --------------------------------------------------------->> Load or revert // (Check if session tabset is already loaded, to revert instead of load) $x = 1; $y = 2; $osetx = gettoken(eval(), -1, "\"); $ssetx = replace($osetx, "§".$x."§_", ""); $actionx = (($DYN_InpSess != $ssetx) || ($osetx == $ssetx))? "load" : "revert"; tabset($actionx, "§$x§_$DYN_InpSess", $x); wait 10; $osety = gettoken(eval(), -1, "\"); $ssety = replace($osety, "§".$y."§_", ""); $actiony = (($DYN_InpSess != $ssety) || ($osety == $ssety))? "load" : "revert"; tabset($actiony, "§$y§_$DYN_InpSess", $y); wait 10; if $STG_AutoOptimizeTree { #1040; // Optimize Tree #1010; // Fully Collapse } #482; // Refresh Tree (clean remaining unavailable drives) if ($actionx == "revert") && ($actionx == $actiony) { status i(0,01)." '$DYN_InpSess' ".i(0,02); } else { status i(0,01)." '$DYN_InpSess' ".i(0,04); } } // ---------------------------------------------------------<< if ($PRE_CurAutoSave && ($DYN_InpSess == $PRE_CurAutoSave)) { delete 1, 0, "\Panes\§1§_$PRE_CurAutoSave$GEN_AutoSaveSuffix|\Panes\§2§_$PRE_CurAutoSave$GEN_AutoSaveSuffix"; wait 300; status i(0,01)." '$PRE_CurAutoSave' ".i(0,02); } sub "_Xtras-Load"; // Toolbar, Sync /* ######################################################################################### */ /* ######################################################################################### */ "_Reset" global $GEN_CurScript, $GEN_Ini, $GEN_LayON, $PRE_CurSessLay, $PRE_CurSess; global $STG_AutoOptimizeTree, $STG_AutoSave, $STG_Confirmation, $STG_InfoPanelPreview, $STG_LayFallbackDef, $STG_StdResetWithLay, $STG_Xtras; global $DYN_InpSess, $DYN_InpSessLay, $PRE_CurAutoSave, $GEN_AutoSaveSuffix; if !$GEN_CurScript { // If accessed externally from Catalog, CKS, UDC, etc. sub "_Initialize"; } $d_WithLay = ($GEN_LayON && ($PRE_CurSessLay || $DYN_InpSessLay))? i(4,01) : i(4,02); $d_WithLay2 = ($GEN_LayON && ($PRE_CurSessLay || $DYN_InpSessLay))? i(4,03) : i(0,01); if $STG_Confirmation {end !confirm("$d_WithLay $PRE_CurSess ".i(4,04)." ");} // --------------------------------------------------------->> Autosave if ($STG_AutoSave && $PRE_CurAutoSave) { $DYN_InpSess = $PRE_CurAutoSave; sub "_Load"; delete 1, 0, "\Panes\§1§_$PRE_CurAutoSave$GEN_AutoSaveSuffix|\Panes\§2§_$PRE_CurAutoSave$GEN_AutoSaveSuffix"; wait 300; status "$d_WithLay2 '$PRE_CurAutoSave' ".i(0,02); end 1==1, , 1; } // ---------------------------------------------------------<< // --------------------------------------------------------->> Layout - Load $PRE_CurSessMaster = replace($PRE_CurSess, $GEN_AutoSaveSuffix); if ($GEN_LayON && ($PRE_CurSessLay || $STG_LayFallbackDef)) || (!$GEN_LayON && $STG_StdResetWithLay) { $DYN_InpSessLay = ($GEN_LayON && $PRE_CurSessLay)? $PRE_CurSessMaster : "¦‡¦-Default-¦‡¦"; load "$GEN_CurScript", "_Layout-Load"; // ---------------------------------------------> Xtras if $STG_Xtras { if $PRE_CurSessLay { $DYN_Xtra_Toolbar = getkey("XTRA-Toolbar", "Layout ".$PRE_CurSessMaster, $GEN_Ini); /* Xtras-WIP $DYN_Xtra_Catalog = getkey("XTRA-Catalog", "Layout ".$PRE_CurSess, $GEN_Ini); $DYN_Xtra_Tags = getkey("XTRA-Tags", "Layout ".$PRE_CurSess, $GEN_Ini); $DYN_Xtra_FileAssoc = getkey("XTRA-FileAssoc", "Layout ".$PRE_CurSess, $GEN_Ini); */ if $DYN_Xtra_Toolbar {toolbar($DYN_Xtra_Toolbar);} } } // ---------------------------------------------< } // ---------------------------------------------------------<< // --------------------------------------------------------->> Session - Load tabset("revert", , 1); wait 10; tabset("revert", , 2); wait 10; if $STG_AutoOptimizeTree { #1040; // Optimize Tree #1010; // Fully Collapse } #482; // Refresh Tree (clean remaining unavailable drives) // ---------------------------------------------------------<< $DYN_InpSess = $PRE_CurSessMaster; sub "_Xtras-Load"; // Toolbar, Sync status "$d_WithLay2 '$PRE_CurSess' ".i(0,02); /* ######################################################################################### */ /* ######################################################################################### */ "_Xtras-Load" global $GEN_Ini, $GEN_LayON, $GEN_AutoSaveSuffix, $DYN_InpSess, $STG_Xtras; // ------------------<> Xtras: SyncBrowse, SyncScroll if ($GEN_LayON && $STG_Xtras) { #813; // Pre-Force activation of Sync (which can be ON but deactivated) set $LayAct; $Section = "Layout ".$DYN_InpSess; $v_SS = get("#813"); $I_SS = getkey("SyncScroll", $Section, $GEN_Ini); $v_SB = get("#814"); $I_SB = getkey("SyncBrowse", $Section, $GEN_Ini); // Activate Sync Scroll $LayAct = ($v_SS != $I_SS + 0)? "$LayAct#813;" : $LayAct; // Activate Sync Browse $LayAct = ($v_SB != $I_SB + 0)? "$LayAct#814;" : $LayAct; if $LayAct {load($LayAct,,"s");} } // ------------------<> Autorun script $Script = getkey("Script", replace("$DYN_InpSess", $GEN_AutoSaveSuffix), $GEN_Ini); if $Script { if ($Script Like "::*") { // Run script load $Script, , "s"; } else { // Load script $Label = trim(gettoken($Script, 2, ","), ' "'); $Script = trim(gettoken($Script, 1, ","), ' "'); load $Script, $Label; } } /* ######################################################################################### */ /* ######################################################################################### */ "_Update" global $GEN_CurScript, $GEN_Ini, $GEN_LayON, $PRE_CurSess, $PRE_CurSessLay, $PRE_SessTab1, $PRE_SessTab2, $PRE_CurAutoSave, $GEN_AutoSaveSuffix; global $STG_Confirmation, $STG_AutoSave, $STG_Xtras, $DYN_InpSess, $DYN_NoInput, $DYN_InpSessLay; global $PRE_Xtra_Toolbar, $PRE_Xtra_Catalog, $PRE_Xtra_Tags, $PRE_Xtra_FileAssoc; $d_WithLay = ($GEN_LayON && ($PRE_CurSessLay || $DYN_InpSessLay))? i(4,01) : i(4,02); $d_WithLay2 = ($GEN_LayON && ($PRE_CurSessLay || $DYN_InpSessLay))? i(4,03) : i(0,01); // ------------------------------------------------------------------------>>> If valid session // (two current tabsets from a single session, and in their appropriate pane - i.e. §1§ in Pane1) if $PRE_CurSess { // --------------------------------------------------------->> Autosave if ($STG_AutoSave && $PRE_CurAutoSave) { delete 1, 0, "\Panes\§1§_$PRE_CurAutoSave|\Panes\§2§_$PRE_CurAutoSave"; tabset("saveas", "§1§_$PRE_CurAutoSave", 1); wait 10; tabset("saveas", "§2§_$PRE_CurAutoSave", 2); delete 1, 0, "\Panes\§1§_$PRE_CurAutoSave$GEN_AutoSaveSuffix|\Panes\§2§_$PRE_CurAutoSave$GEN_AutoSaveSuffix"; $PRE_CurSess = $PRE_CurAutoSave; // ---------------------------------------------------------<< // --------------------------------------------------------->> Session - Save } else { if (!$DYN_NoInput && $STG_Confirmation) {end !confirm("$d_WithLay $PRE_CurSess ".i(5,01)." ");} tabset("save", , 1); wait 10; tabset("save", , 2); wait 10; } // ---------------------------------------------------------<< // --------------------------------------------------------->> Layout - Save if (($GEN_LayON && $PRE_CurSessLay) || $DYN_InpSessLay) { // If session has layout, or coming from 'Save' with layout $DYN_InpSessLay = replace($PRE_CurSess, $GEN_AutoSaveSuffix); // ---------------------------------------------> Xtras if $STG_Xtras { if $PRE_Xtra_Toolbar {setkey(toolbar(), "XTRA-Toolbar", "Layout $PRE_CurSessLay", $GEN_Ini);} } // ---------------------------------------------< load "$GEN_CurScript", "_Layout-Save"; } // ---------------------------------------------------------<< wait 400; status "$d_WithLay2 '$PRE_CurSess' ".i(0,03); // ------------------------------------------------------------------------<<< // ------------------------------------------------------------------------>>> If invalid session } else { status i(5,02), "883333", "stop"; $d_Valid = ($PRE_SessTab1 || $PRE_SessTab2)? i(5,03) : i(5,04); msg "$d_Valid ".i(5,05)." ---> ".i(5,06)." "; sub "_About"; } // ------------------------------------------------------------------------<<< /* ######################################################################################### */ /* ######################################################################################### */ "_Delete" global $GEN_CurScript, $GEN_LaySuffix, $GEN_Ini, $PRE_l_AvailSessDet, $PRE_n_AvailSess, $PRE_SessTab1, $PRE_SessTab2, $PRE_CurAutoSave, $PRE_AutoSave, $GEN_AutoSaveSuffix; global $DYN_InpSessLay; // --------------------------------------------------------->> List available sessions not in use set $l_AvailSessDet; set $n_SessAvailDel; foreach($DelSess, $PRE_l_AvailSessDet, "|") { if ($DelSess && ($DelSess != $PRE_SessTab1) && ($DelSess != $PRE_SessTab1$GEN_LaySuffix) && ($DelSess != $PRE_SessTab2) && ($DelSess != $PRE_SessTab2$GEN_LaySuffix) && ($DelSess != $PRE_CurAutoSave) && ($DelSess UnLike "*$GEN_AutoSaveSuffix")) { $n_SessAvailDel++; $l_AvailSessDet = $l_AvailSessDet.$DelSess."|"; } } // ---------------------------------------------------------<< // --------------------------------------------------------->> Delete Validation if (!$n_SessAvailDel) { // End if only sessions are in use if ($PRE_n_AvailSess == 1) { if ($PRE_SessTab1 == $PRE_SessTab2) { // active session (valid or not) $d_NoDel = "".i(6,01)." $PRE_SessTab1 ".i(6,02)." ---> ".i(6,03); } else { $d_NoDel = "".i(6,04)." $PRE_SessTab1$PRE_SessTab2 ".i(6,02)." ---> ".i(6,05); } } elseif ($PRE_n_AvailSess == 2) { // 'if' shouldn't be needed. TBD $d_NoDel = "".i(6,06)." $PRE_SessTab1 $PRE_SessTab2 ".i(6,07)." ---> "i(6,08); } status i(6,09), "883333", "stop"; msg "$d_NoDel "; end 1==1; } // ---------------------------------------------------------<< // --------------------------------------------------------->> Delete Dialog if (!$PRE_SessTab1 && !$PRE_SessTab2) { $d = i(6,12); $d2 = 2; } elseif ($PRE_SessTab1 == $PRE_SessTab2) { // active session (valid or not) $d = i(4,02)." ".replace($PRE_SessTab1, $GEN_AutoSaveSuffix)." "; $d2 = 1; } elseif ($PRE_SessTab1 && $PRE_SessTab2) { $d = i(6,10)." ".i(6,11)." '$PRE_SessTab1' , ".i(6,11)." '$PRE_SessTab2' ."; $d2 = 1; } elseif (($PRE_SessTab1 && !$PRE_SessTab2) || (!$PRE_SessTab1 && $PRE_SessTab2)) { $d = i(6,10)." ".i(6,11)." '$PRE_SessTab1$PRE_SessTab2' ."; $d2 = 1; } // ---------------------------------------------------------<< $d_SessAvail = ($n_SessAvailDel > 1)? i(6,15) : i(6,06); $d3 = ($d2 == 1)? $d_SessAvail : i(6,16); $l_AvailSessDet = inputselect("$d".i(6,13)." $d3", $l_AvailSessDet, , 2, i(6,09), 350, 500, i(6,17)); // ------------------------------------------------------------------------>>> Delete Action if $l_AvailSessDet && ($l_AvailSessDet != i(6,09)) { // --------------------------------------------------------->> Session - Delete foreach ($InpSess, $l_AvailSessDet, "|") { $i++; $InpSessLay = $InpSess; $InpSess = replace($InpSess, $GEN_LaySuffix, ""); $InpSessLay = ($InpSess != $InpSessLay)? $InpSess : ""; delete 1, 0, "\Panes\§1§_$InpSess|\Panes\§2§_$InpSess"; if ($InpSess == $PRE_AutoSave) { // If session had autosave session delete 1, 0, "\Panes\§1§_$InpSess$GEN_AutoSaveSuffix|\Panes\§2§_$InpSess$GEN_AutoSaveSuffix"; } if getkey("Script", $InpSess, $GEN_Ini)) { // If session has associated script setkey("", "", $InpSess, $GEN_Ini); } // ---------------------------------------------------------<< // --------------------------------------------------------->> Layout - Delete if $InpSessLay { $DYN_InpSessLay = $InpSess; load "$GEN_CurScript", "_Layout-Delete"; } // ---------------------------------------------------------<< } // --------------------------------------------------------->> Clean session order list $l_AllTabsets = folderreport("dirsrel", "r", ."\Panes", , , "|")."|"; $l_SessionsOrder = getkey("SessionsOrder", "General", $GEN_Ini); if $l_SessionsOrder { foreach ($tsession, $l_SessionsOrder, "|") { if (($tsession != "-") && (($l_AllTabsets UnLikeI "*§1§_$tsession|*") || ($l_AllTabsets UnLikeI "*§2§_$tsession|*"))) { $l_SessionsOrder = replace($l_SessionsOrder."|", $tsession."|"); } } $l_SessionsOrder = trim(replacelist($l_SessionsOrder, "-|-,$GEN_TmpSession|", "-,", ","), "|-"); setkey("$l_SessionsOrder", "SessionsOrder", "General", $GEN_Ini); } // ---------------------------------------------------------<< wait 300; $del = i(0,01)." '$InpSess' ".i(0,06); $del2 = $i." ".i(6,18); $del = ($i == 1)? $del : $del2; status $del; // ------------------------------------------------------------------------<<< } else { wait 50; status i(6,09), "883333", "stop"; } /* ######################################################################################### */ /* ######################################################################################### */ "_Save" global $GEN_CurScript, $GEN_LayON, $PRE_l_AvailSess, $PRE_CurSess, $PRE_CurSessLay, $PRE_CurSessInv, $PRE_SessTab1, $PRE_SessTab2, $STG_EnableLayouts; global $DYN_NoInput, $DYN_InpSessLay; // ---------------------------------------------> Dialog text $d_Save1 = "".i(4,02)." $PRE_CurSess "; $d_Save1 = ($PRE_CurSess)? $d_Save1 : ""; $d_Save2 = "• ".i(7,01)." - ".i(7,02)." - ".i(7,03)." ".i(7,04).""; $d_Save2 = ($STG_EnableLayouts)? $d_Save2 : ""; $InpSess = input(i(7,05).$d_Save1, " ".i(7,06)." ".i(7,07)." • ".i(7,08)." $d_Save2 ", , , "§CANCEL§"); // ---------------------------------------------< $InpSess = trim($InpSess); // --------------------------------------------------------->> Layout - Detection if (substr($InpSess, 0, 1) == "?") { $InpSess = substr($InpSess, 1); $DYN_InpSessLay = $InpSess; } $d_CurWithLay = ($GEN_LayON && $PRE_CurSessLay)? i(4,01) : i(4,02); $d_InpWithLay = ($GEN_LayON && $DYN_InpSessLay)? i(4,03) : i(0,01); // ---------------------------------------------------------<< // ------------------<> Save validation $InvalidName = regexmatches($InpSess, '[\\/:\*\?"<>\|\[\]]', " "); end $InvalidName, " ".i(7,09)." $InvalidName ---> ".i(7,10)." "; if ($InpSess && ($InpSess != "§CANCEL§")) { // ------------------------------------------------------------------------>>> Conflict with current session if ($InpSess LikeI $PRE_SessTab1) || ($InpSess LikeI $PRE_SessTab2) { // If at least one loaded tabset belongs to the session to save // --------------------------------------------------------->> Update if $PRE_CurSess { // If saving name is name of current session $Update = confirm("$d_CurWithLay $PRE_CurSess ".i(5,01)." "); if $Update { $DYN_NoInput = 1; sub "_Update"; } else { status i(7,11), "883333", "stop"; } // ---------------------------------------------------------<< // --------------------------------------------------------->> Cancel // ------------------<> Inverted session } elseif $PRE_CurSessInv { status , , "stop"; msg "".i(7,12)." $PRE_CurSessInv ".i(7,13)." ---> ".i(7,14)." "; // ------------------<> One tabset in use } else { status , , "stop"; msg "".i(7,15)." ".recase($InpSess, t)." ".i(7,16)." ---> ".i(7,14)." "; } } else { // ---------------------------------------------------------<< // ------------------------------------------------------------------------<<< // ------------------------------------------------------------------------>>> Save action if ($PRE_l_AvailSess == replace($PRE_l_AvailSess, "|".$InpSess."|", "")) { // If session doesn't exist (i.e. no tabset exists with same name as sesion) // --------------------------------------------------------->> Layout - Save if $DYN_InpSessLay { load "$GEN_CurScript", "_Layout-Save"; } // ---------------------------------------------------------<< // --------------------------------------------------------->> Session - Save tabset("saveas", "§1§_$InpSess", 1); wait 10; tabset("saveas", "§2§_$InpSess", 2); wait 400; // DEBUG: status disappear with MiniTree,OptimizeTree+? status "$d_InpWithLay '$InpSess' ".i(0,05); // ---------------------------------------------------------<< } else { // Cancel if session already exists msg "".i(7,17)." '".recase($InpSess, t)."' ".i(7,18)." ".i(7,19)." "; wait 400; status i(7,11), "883333", "stop"; } } // ------------------------------------------------------------------------<<< } else { wait 400; status i(7,11), "883333", "stop"; } /* ######################################################################################### */ /* ######################################################################################### */ "_Save-Temporary" global $GEN_CurScript, $GEN_TmpSession, $PRE_CurSess, $PRE_CurSessLay, $PRE_CurSessInv, $PRE_SessTab1, $PRE_SessTab2, $PRE_SessTab1Inv, $DYN_InpSessLay; if !$GEN_CurScript { // If accessed externally from Catalog, CKS, UDC, etc. sub "_Initialize"; } $DYN_InpSessLay = $PRE_CurSessLay? $GEN_TmpSession : ""; // --------------------------------------------------------->> Update if ($GEN_TmpSession == $PRE_CurSess) { // If TMP is current session if $DYN_InpSessLay { load "$GEN_CurScript", "_Layout-Save"; } tabset("save", , 1); wait 10; tabset("save", , 2); // ---------------------------------------------------------<< // --------------------------------------------------------->> Cancel } elseif (($PRE_CurSessInv == $GEN_TmpSession) || ($InpSess LikeI $PRE_SessTab1) || ($InpSess LikeI $PRE_SessTab2)) { // If TMP inverted or tabset from TMP msg "".i(8,01)." ".i(8,02)." "; end 1==1; // ---------------------------------------------------------<< // --------------------------------------------------------->> Save - Temporary session } else { delete 1, 0, "\Panes\§1§_$GEN_TmpSession|\Panes\§2§_$GEN_TmpSession"; wait 300; if $DYN_InpSessLay { load "$GEN_CurScript", "_Layout-Save"; } if !$PRE_SessTab1Inv { tabset("saveas", "§1§_$GEN_TmpSession", 1); wait 10; tabset("saveas", "§2§_$GEN_TmpSession", 2); } else { tabset("saveas", "§2§_$GEN_TmpSession", 2); wait 10; tabset("saveas", "§1§_$GEN_TmpSession", 1); } } // ---------------------------------------------------------<< wait 400; // DEBUG: status disappear with MiniTree, OptimizeTree+? status i(8,03); /* ######################################################################################### */ /* ######################################################################################### */ "_Rename" global $GEN_CurScript, $GEN_Ini, $PRE_l_AvailSess, $PRE_CurSess, $PRE_CurSessLay, $PRE_SessTab1, $PRE_SessTab2, $PRE_AutoSave, $GEN_AutoSaveSuffix, $PRE_CurAutoSave; global $DYN_InpSessLay; if $PRE_CurSess { // If a valid session is active $PRE_CurSess = ($PRE_CurAutoSave)? $PRE_AutoSave : $PRE_CurSess; $InpSess = input(i(9,01)." '$PRE_CurSess'", "".i(9,02)." ".i(7,08)." ", $PRE_CurSess, , "§CANCEL§"); if ($InpSess && ($InpSess != "§CANCEL§")) { $InvalidName = regexmatches($InpSess, '[\\/:\*\?"<>\|\[\]]', " "); end $InvalidName, " ".i(7,09)." $InvalidName ---> ".i(9,03)." "; // ------------------------------------------------------------------------>>> Rename if (($InpSess UnLikeI $PRE_CurSess) && ($InpSess$GEN_AutoSaveSuffix UnLikeI $PRE_CurSess)) { // If new session name is different than current session name if ($PRE_l_AvailSess == replace($PRE_l_AvailSess, "|".$InpSess."|", "")) { // If session doesn't exist (i.e. no tabset exists with same name as sesion) $x = 1; $y = 1; if (get("pane") == 1) {$x = 2;} else {$y = 2;} $d_AutoSave = ($PRE_CurAutoSave)? $GEN_AutoSaveSuffix : ""; tabset("rename", "§$x§_$InpSess$d_AutoSave", $x); wait 10; tabset("rename", "§$y§_$InpSess$d_AutoSave", $y); if $PRE_CurAutoSave { renameitem("§1§_".$InpSess, "\Panes\§1§_$PRE_CurSess"); renameitem("§2§_".$InpSess, "\Panes\§2§_$PRE_CurSess"); } // --------------------------------------------------------->> Layout - Rename if $PRE_CurSessLay { $DYN_InpSessLay = replace($InpSess, $GEN_AutoSaveSuffix); load "$GEN_CurScript", "_Layout-Rename"; } // ---------------------------------------------------------<< $SessionsOrder = replace(getkey("SessionsOrder", "General", $GEN_Ini), "$PRE_CurSess", "$InpSess"); setkey("$SessionsOrder", "SessionsOrder", "General", $GEN_Ini); $Script = getkey("Script", $PRE_CurSess, $GEN_Ini); if $Script { setkey "", "", $PRE_CurSess, $GEN_Ini; setkey $Script, "Script", $InpSess, $GEN_Ini; } wait 500; status i(9,04)." '$PRE_CurSess' ".i(9,05)." '$InpSess'"; // ------------------------------------------------------------------------<<< // --------------------------------------------------------->> Cancel // ------------------<> Session already exists } else { msg "".i(7,17)." '".recase($InpSess, t)."' ".i(7,18)." ---> ".i(7,19)." "; status i(9,06), "883333", "stop"; } // ------------------<> Same name as current session } else { msg "".i(9,07)." '$PRE_CurSess' . "; status i(9,06), "883333", "stop"; } } else { wait 50; status i(9,06), "883333", "stop"; } // ------------------<> Invalid session } else { $d_Valid = ($PRE_SessTab1 || $PRE_SessTab2)? i(5,03) : i(5,04); msg "$d_Valid ---> ".i(9,08)." "; status i(9,06), "883333", "stop"; } // ---------------------------------------------------------<< /* ######################################################################################### */ /* ######################################################################################### */ "_ReorderSessionList" global $GEN_Ini, $GEN_TmpSession, $PRE_l_AvailSess, $DYN_SessionsOrder; $l_AllTabsets = folderreport("dirsrel", "r", ."\Panes", , , "|")."|"; $l_SessionsOrder = getkey("SessionsOrder", "General", $GEN_Ini); $l_AvailSess = $PRE_l_AvailSess; while ($i++ < 2) { // ------------------<> 1st: Clean original (INI) list // ------------------<> 2nd: Clean new user-input list if $l_SessionsOrder { foreach ($tsession, $l_SessionsOrder, "|") { if ($tsession != "-") { if (($l_AllTabsets UnLikeI "*§1§_$tsession|*") || ($l_AllTabsets UnLikeI "*§2§_$tsession|*")) { $l_SessionsOrder = replace("|$l_SessionsOrder|", "|$tsession|", "|"); } if (gettoken("|$l_SessionsOrder|", "count", "|$tsession|") > 2) { // Remove (improbable) duplicates $l_SessionsOrder = gettoken("|$l_SessionsOrder|", 1, "|$tsession|")."|$tsession".replace("|".gettoken("|$l_SessionsOrder|", 2, "|$tsession|", , 2), "$tsession|"); } $l_AvailSess = formatlist(replace("|$l_AvailSess|", "|$tsession|", "|"), "dents", "|"); } } $l_SessionsOrder = trim($l_SessionsOrder, "|")."|".replace($l_AvailSess, $GEN_TmpSession); } elseif ($i == 1) { $l_SessionsOrder = replace($PRE_l_AvailSess, "$GEN_TmpSession"); } $l_SessionsOrder = regexreplace(trim(regexreplace($l_SessionsOrder, "(-\|)+", "-|"), "|"), "(^-\|)|(\|-$)"); $l_AvailSess = replace(formatlist($l_SessionsOrder, "dents", "|"), "-|"); if ($i == 1) { $Input = input(i(10,01), i(10,02), replace("$l_SessionsOrder", "|", ""), "m", , 450, 600); $l_SessionsOrder = trim(formatlist(replace($Input, "", "|"), "e", "|"), "|"); } } $DYN_SessionsOrder = $l_SessionsOrder; /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ######################*/ /* ### Layout Menus ###*/ /* ######################*/ "_LayoutSessions-Menu" global $GEN_CurScript, $GEN_Ini, $GEN_LayON, $GEN_SM_Version, $GEN_LayUsed, $PRE_CurSess, $PRE_CurSessLay, $PRE_n_AvailSess, $GEN_Icon_Lay; global $GEN_AutoSaveSuffix, $PRE_AutoSave, $PRE_CurAutoSave; global $STG_EnableLayouts, $STG_Xtras, $STG_AutoSave; global $PRE_Xtra_Toolbar, $PRE_Xtra_Catalog, $PRE_Xtra_Tags, $PRE_Xtra_FileAssoc; $Menu = ""; // ------------------------------------------------------------------------>>>> Layouts - ON if $STG_EnableLayouts { // ------------------------------<> Use layouts $Menu = $Menu.'"'.i(11,01)." ".i(11,02)."||2".'"'.." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 1; $OPT_Setting = ""EnableLayouts""; load(""$GEN_CurScript"", ""_Options-Settings"");"; $Menu = $Menu."-"; // ------------------------------------------------------------------------>>> Simple menu - Xtras disabled if !$STG_Xtras { // --------------------------------------------------------->> Default layout // ------------------------------<> Reset default // CAUTION: Icon caption used by "_Layout-Reset" $Menu = $Menu.'"'.i(11,04)."|:autorefresh".'"'.." load(""$GEN_CurScript"", ""_Layout-Reset"");"; // ------------------------------<> Update default $Menu = $Menu.'"'.i(11,05)."|$GEN_Icon_Lay".'"'.." global $DYN_InpSessLay; $DYN_InpSessLay = ""¦‡¦-Default-¦‡¦""; load(""$GEN_CurScript"", ""_Layout-Save""); wait 400; status """.i(11,06).""";"; $Menu = $Menu."-"; // ---------------------------------------------------------<< // --------------------------------------------------------->> Current session layout // ------------------------------<> Autosave note if ($STG_AutoSave && (!$PRE_AutoSave || $PRE_CurAutoSave)) { $Menu = $Menu.'"'.i(11,07).'"'.; // Changes affect original session } if $PRE_CurSessLay { // ------------------------------<> Delete current // CAUTION: Icon caption used by "_Layout-Reset" $Menu = $Menu.'"'.i(11,08)."|:del".'"'.." load(""$GEN_CurScript"", ""_Layout-Reset""); global $DYN_InpSessLay; $DYN_InpSessLay = ""$PRE_CurSessLay""; load(""$GEN_CurScript"", ""_Layout-Delete""); wait 400; status """.i(11,09)." '$PRE_CurSessLay' ".i(11,10).""";"; // ------------------------------<> Update current $Menu = $Menu.'"'.i(11,13)."|$GEN_Icon_Lay".'"'.." global $DYN_InpSessLay; $DYN_InpSessLay = ""$PRE_CurSessLay""; if $PRE_Xtra_Toolbar {setkey(toolbar(), ""XTRA-Toolbar"", ""Layout $PRE_CurSessLay"", ""$GEN_Ini"");}; load(""$GEN_CurScript"", ""_Layout-Save""); wait 400; status """.i(11,09)." '$PRE_CurSessLay' ".i(11,11).""";"; } elseif $PRE_CurSess { // ------------------------------<> Save current $Menu = $Menu.'"'.i(11,14)."|$GEN_Icon_Lay".'"'.." end ((""$PRE_CurSess"" Like ""*[*"") || (""$PRE_CurSess"" Like ""*]*"")), """.i(11,15)." "";"; $Menu = $Menu." global $DYN_InpSessLay; $PRE_CurSessMaster = replace(""$PRE_CurSess"", ""$GEN_AutoSaveSuffix""); $DYN_InpSessLay = ""$PRE_CurSessMaster""; load(""$GEN_CurScript"", ""_Layout-Save""); wait 400; status """.i(11,09)." '$PRE_CurSessMaster' ".i(11,12).""";"; } else { // ------------------------------<> Invalid session note $Menu = $Menu.'"'.i(11,16).'"'.; // Load valid session to access options } // ---------------------------------------------------------<< // ------------------------------------------------------------------------<<< // ------------------------------------------------------------------------>>> Advanced menu - Xtras enabled } else { // --------------------------------------------------------->> Default layout $Menu = $Menu.'"'.i(11,17).'"'.; // DEFAULT LAYOUT $Menu = $Menu."-"; // ------------------------------<> Reset default $Menu = $Menu.'"'.i(11,04)."|:autorefresh".'"'.." global $DYN_InpSessLay, $DYN_b_InpSessLay; $DYN_InpSessLay = ""¦‡¦-Default-¦‡¦"";"; $Menu = $Menu." $DYN_b_InpSessLay = 0; load(""$GEN_CurScript"", ""_Layout-Load""); wait 400; status """.i(11,18).""";"; // ------------------------------<> Update default $Menu = $Menu.'"'.i(11,05)."|$GEN_Icon_Lay".'"'.." global $DYN_InpSessLay; $DYN_InpSessLay = ""¦‡¦-Default-¦‡¦""; load(""$GEN_CurScript"", ""_Layout-Save""); wait 400; status """.i(11,06).""";"; $Menu = $Menu."-"; // ---------------------------------------------> Xtras // ------------------<> Reload default toolbar $Menu = $Menu.'"'.i(11,19)."|:autorefresh".'"'.." toolbar(getkey(""XTRA-Toolbar"", ""Layout ¦‡¦-Default-¦‡¦"", ""$GEN_Ini"")); wait 400; status """.i(11,20).""";"; // ------------------<> Update default toolbar $Menu = $Menu.'"'.i(11,21)."|:ctb59".'"'.." setkey(toolbar(), ""XTRA-Toolbar"", ""Layout ¦‡¦-Default-¦‡¦"", ""$GEN_Ini""); wait 400; status """.i(11,22).""";"; /* Xtras-WIP $Menu = $Menu."--"; * $Menu = $Menu."Reload Default Catalog|%winsysdir%\shell32.dll /5"." "; * $Menu = $Menu."Reload Default Tags Database|%winsysdir%\shell32.dll /5"." "; */ // ---------------------------------------------< // ---------------------------------------------------------<< // --------------------------------------------------------->> Current session layout if $PRE_CurSess { if $STG_EnableLayouts { $Menu = $Menu."-"; $Menu = $Menu.'"'.i(11,23).'"'.; // CURRENT SESSION if ($STG_AutoSave && (!$PRE_AutoSave || $PRE_CurAutoSave)) { $Menu = $Menu.'"'.i(11,07).'"'.; } $Menu = $Menu."-"; // ---------------------------------------------> Regular session (no layout) if !$PRE_CurSessLay { // ------------------------------<> Save current $Menu = $Menu.'"'.i(11,14)."|$GEN_Icon_Lay".'"'.." end ((""$PRE_CurSess"" Like ""*[*"") || (""$PRE_CurSess"" Like ""*]*"")), """.i(11,15)." "";"; $Menu = $Menu." global $DYN_InpSessLay; $PRE_CurSessMaster = replace(""$PRE_CurSess"", ""$GEN_AutoSaveSuffix""); $DYN_InpSessLay = ""$PRE_CurSessMaster""; load(""$GEN_CurScript"", ""_Layout-Save""); wait 400; status """.i(11,09)." '$PRE_CurSessMaster' ".i(11,12).""";"; $Menu = $Menu."-"; // ------------------------------<> No layout note $Menu = $Menu.'"'.i(11,24).'"'.; // Load layout session to acces options // ---------------------------------------------< // ---------------------------------------------> Layout session } else { // ------------------------------<> Delete // CAUTION: Icon caption used by "_Layout-Reset" $Menu = $Menu.'"'.i(11,08)."|:del".'"'.." if (getkey(""XTRA-Toolbar"", ""Layout "".replace($PRE_CurSess, $GEN_AutoSaveSuffix), ""$GEN_Ini"")) {toolbar(getkey(""XTRA-Toolbar"", ""Layout ¦‡¦-Default-¦‡¦"", ""$GEN_Ini""));} load(""$GEN_CurScript"", ""_Layout-Reset""); global $DYN_InpSessLay; $DYN_InpSessLay = ""$PRE_CurSessLay""; load(""$GEN_CurScript"", ""_Layout-Delete""); wait 400; status """.i(11,09)." '$PRE_CurSessLay' ".i(11,10).""";"; // ------------------------------<> Update $Menu = $Menu.'"'.i(11,13)."|$GEN_Icon_Lay".'"'.." global $DYN_InpSessLay; $DYN_InpSessLay = ""$PRE_CurSessLay""; if $PRE_Xtra_Toolbar {setkey(toolbar(), ""XTRA-Toolbar"", ""Layout $PRE_CurSessLay"", ""$GEN_Ini"");}; load(""$GEN_CurScript"", ""_Layout-Save""); wait 400; status """.i(11,09)." '$PRE_CurSessLay' ".i(11,11).""";"; $Menu = $Menu."-"; // ---------------------------------------> Xtras if (getkey("XTRA-Toolbar", "Layout ".replace($PRE_CurSess, $GEN_AutoSaveSuffix), $GEN_Ini)) { // ------------------------------<> Remove toolbar $Menu = $Menu.'"'.i(11,25)."|:del".'"'.." toolbar(getkey(""XTRA-Toolbar"", ""Layout ¦‡¦-Default-¦‡¦"", ""$GEN_Ini"")); setkey("""", ""XTRA-Toolbar"", ""Layout $PRE_CurSessLay"", ""$GEN_Ini""); wait 400; status """.i(11,26).""";"; // ------------------------------<> Update toolbar $Menu = $Menu.'"'.i(11,27)."|:ctb59".'"'.." setkey(toolbar(), ""XTRA-Toolbar"", ""Layout $PRE_CurSessLay"", ""$GEN_Ini""); wait 400; status """.i(11,28).""";"; } else { // ------------------------------<> Save toolbar $Menu = $Menu.'"'.i(11,29)."|:ctb59".'"'.." setkey(toolbar(), ""XTRA-Toolbar"", ""Layout $PRE_CurSessLay"", ""$GEN_Ini""); wait 400; status """.i(11,30).""";"; } /* Xtras-WIP $Menu = $Menu."--"; // ----------------------- if ($PRE_CurSessLay && $STG_EnableLayouts) { * $Menu = $Menu."[C] Save Copy of &Catalog with Layout of Current Session|$GEN_Icon_Lay"." "; * $Menu = $Menu."Remove &Catalog from Layout of Current Session|:del"." "; } else { * $Menu = $Menu."[C] Save Copy of &Catalog with Layout of Current Session|$GEN_Icon_Lay"." "; * $Menu = $Menu."Remove &Catalog from Layout of Current Session|:del"." "; } $Menu = $Menu."--"; // ----------------------- if ($PRE_CurSessLay && $STG_EnableLayouts) { * $Menu = $Menu."[T] Save Copy of &Tags Database with Layout of Current Session|$GEN_Icon_Lay"." "; * $Menu = $Menu."Remove &Tags Database from Layout of Current Session|:del"." "; } else { * $Menu = $Menu."[T] Save Copy of &Tags Database with Layout of Current Session|$GEN_Icon_Lay"." "; * $Menu = $Menu."Remove &Tags Database from Layout of Current Session|:del"." "; } $Menu = $Menu."--"; // ----------------------- if ($PRE_CurSessLay && $STG_EnableLayouts) { * $Menu = $Menu."[F] Save &File Associations with Layout of Current Session|$GEN_Icon_Lay"." "; * $Menu = $Menu."Remove &File Associations from Layout of Current Session|:del"." "; } else { * $Menu = $Menu."[F] Save &File Associations with Layout of Current Session|$GEN_Icon_Lay"." "; * $Menu = $Menu."Remove &File Associations from Layout of Current Session|:del"." "; } */ // ---------------------------------------< } } else { // ------------------------------<> Not using layouts note $Menu = $Menu.'"'.i(11,31).'"'.; // Enable layouts to acces options } } else { // ---------------------------------------------------------<< // ------------------------------<> Invalid session note $Menu = $Menu.'"'.i(11,16).'"'.; // Load valid session to access options } } // ------------------------------------------------------------------------<<<< // ------------------------------------------------------------------------>>>> Layouts OFF } else { // ------------------------------<> Use layouts $Menu = $Menu.'"'.i(11,01)." ".i(11,03).'"'.." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 0; $OPT_Setting = ""EnableLayouts""; load(""$GEN_CurScript"", ""_Options-Settings"");"; $Menu = $Menu."-"; // ------------------------------<> Reset default $Menu = $Menu.'"'.i(11,04)."|:autorefresh".'"'.." global $DYN_InpSessLay, $DYN_b_InpSessLay; $DYN_InpSessLay = ""¦‡¦-Default-¦‡¦"";"; $Menu = $Menu." $DYN_b_InpSessLay = 0; load(""$GEN_CurScript"", ""_Layout-Load""); wait 400; status """.i(11,18).""";"; // ------------------------------<> Update default $Menu = $Menu.'"'.i(11,05)."|$GEN_Icon_Lay".'"'.." global $DYN_InpSessLay; $DYN_InpSessLay = ""¦‡¦-Default-¦‡¦""; load(""$GEN_CurScript"", ""_Layout-Save""); wait 400; status """.i(11,06).""";"; } // ------------------------------------------------------------------------<<<< $Menu = $Menu."-"; $Menu = $Menu.'"'.i(0,07).'"'.." status;"; status; load($Menu, , s); /* ######################################################################################### */ /* ######################################################################################### */ "_Layout-DefaultSave" global $PRE_CurSess; end (($PRE_CurSess Like "*[*") || ($PRE_CurSess Like "*]*")), " ".i(12,01)." ---> ".i(7,10)." "; // Invalid session name for layouts $DYN_InpSessLay = $PRE_CurSess; load "$GEN_CurScript", "_Layout-Save"; /* ######################################################################################### */ /* ######################################################################################### */ "_Layout-ToolbarSave" global $GEN_Ini, $PRE_CurSessLay; $Section = "Layout ".$PRE_CurSessLay; setkey(toolbar(), "XTRA-Toolbar", "Layout ".$PRE_CurSessLay, $GEN_Ini); /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ########################*/ /* ### Layout Manager ###*/ /* ########################*/ "_Layout-Load" global $GEN_Ini, $GEN_LayON, $STG_LayFallbackDef, $STG_StdResetWithLay, $STG_InfoPanelPreview, $PRE_CurSessLay; global $DYN_InpSess, $DYN_InpSessLay, $DYN_b_InpSessLay; set $LayAct; // ---------------------------------------------> Xtras layout features // Columns Manager Initiation // $XY_SaveNoCol = getkey("RememberListSettingsPerTabApply", "Settings"); // $XY_SaveNoCol = (($XY_SaveNoCol < 4) || (($XY_SaveNoCol > 7) && ($XY_SaveNoCol < 12)))? 1 : 0; // ---------------------------------------------< $Section = "Layout ".$DYN_InpSessLay; // ------------------<> Save current layout // If entering a layout-session AND leaving a Non-layout-session AND 'Fallback to Default' OFF if ($GEN_LayON && !$PRE_CurSessLay && $DYN_b_InpSessLay && !$STG_LayFallbackDef) { $DYN_InpSessLay = "¦‡¦-Last-¦‡¦"; // remember fallback layout (i.e. current unsaved layout) sub "_Layout-Save"; // to be loaded next time a non-layout-session is loaded } // ---------------------------------------------> Regular layout - Full XY default setlayout(getkey("FullLayout", $Section, $GEN_Ini)); // ---------------------------------------------< // ---------------------------------------------> Regular layout - Bonus features // $v = what is ('v'isually exists); $I = what must be (read from 'I'ni); $v_AP = get("pane"); $I_AP = getkey("ActivePane", $Section, $GEN_Ini); $v_SH = get("#312"); $I_SH = getkey("ShowSortHeaders", $Section, $GEN_Ini); // ------------------<> Restore active pane $LayAct = ($v_AP != $I_AP)? "$LayAct#802;" : $LayAct; // ------------------<> Show sort headers in all views $LayAct = ($v_SH != $I_SH + 0)? "$LayAct#312;" : $LayAct; // +0 needed for update when $I-SH key doesn't exist // ------------------<> Force Preview visible $LayAct = (get("#665") && $STG_InfoPanelPreview)? "$LayAct#1021;#1023;" : $LayAct; // #1021 switch to prevent IP close when preview already visible if $LayAct {load($LayAct,,"s");} // ---------------------------------------------< /* ######################################################################################### */ /* ######################################################################################### */ "_Layout-Save" global $GEN_Ini, $STG_Xtras; global $DYN_InpSessLay; $Section = "Layout ".$DYN_InpSessLay; // ------------------<> Regular layout - Full XY default setkey(setlayout(), "FullLayout", $Section, $GEN_Ini); // ------------------<> Regular layout - Bonus features setkey(get("pane"), "ActivePane", $Section, $GEN_Ini); setkey(get("#312"), "ShowSortHeaders", $Section, $GEN_Ini); // ------------------<> Xtras layout features if $STG_Xtras { setkey(get("#813"), "SyncScroll", $Section, $GEN_Ini); setkey(get("#814"), "SyncBrowse", $Section, $GEN_Ini); } /* ######################################################################################### */ /* ######################################################################################### */ "_Layout-Rename" global $GEN_Ini, $PRE_CurSessLay; global $DYN_InpSessLay; // ------------------<> Read old layout $LayIni = replace(readfile("$GEN_Ini"), $PRE_CurSessLay,"¦‡¦-#########-¦‡¦"); $LayIni = regexreplace($LayIni, "^(.|\n)*(\[Layout ¦‡¦-#########-¦‡¦\][^\[]*)(.|\n)*$", "$2"); // ------------------<> Delete old layout $Section = "Layout ".$PRE_CurSessLay; setkey("", "", $Section, $GEN_Ini); // ------------------<> Save renamed layout $LayIni = replace($LayIni, "¦‡¦-#########-¦‡¦", $DYN_InpSessLay); writefile("$GEN_Ini", $LayIni, "a"); /* ######################################################################################### */ /* ######################################################################################### */ "_Layout-Delete" global $GEN_Ini; global $DYN_InpSessLay; $Section = "Layout ".$DYN_InpSessLay; setkey("", "", $Section, $GEN_Ini); /* ######################################################################################### */ /* ######################################################################################### */ "_Layout-Reset" // ONLY USED for direct acces via CKS or Menu (TODO - Maybe not true anymore?) global $GEN_CurScript, $PRE_CurSessLay, $DYN_InpSessLay, $DYN_b_InpSessLay, $DYN_InfoPanel; if !$GEN_CurScript { // If accessed externally from Catalog, CKS, UDC, etc. sub "_Initialize"; } // ------------------<> CAUTION: uses icon from menu entries if ((caller("icon") == ":autorefresh") || (caller("icon") == ":del")) { // If accessed internaly $DYN_InpSessLay = "¦‡¦-Default-¦‡¦"; } else { $DYN_InpSessLay = !($PRE_CurSessLay)? "¦‡¦-Default-¦‡¦" : $PRE_CurSessLay; } $DYN_b_InpSessLay = 0; load($GEN_CurScript, "_Layout-Load"); wait 400; status i(11,18); /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* #######################*/ /* ### Options Menus ###*/ /* #######################*/ "_Options-Menu" global $GEN_CurScript, $GEN_Ini, $GEN_LayON, $GEN_SM_Version, $PRE_CurSess, $PRE_CurSessLay, $PRE_l_AvailSess, $PRE_n_AvailSess, $GEN_TmpSession, $GEN_Icon_Lay; global $PRE_CurAutoSave, $PRE_AutoSave, $GEN_AutoSaveSuffix; global $STG_EnableLayouts, $STG_AutoOptimizeTree, $STG_AutoSave, $STG_Confirmation, $STG_SessionListOnTop, $STG_InfoPanelPreview, $STG_Xtras, $STG_LayFallbackDef, $STG_StdResetWithLay, $STG_Separator; $Menu = ""; // --------------------------------------------------------->> Autosave // ------------------------------<> Disable Autosave if $STG_AutoSave { // ------------------<> Autosave of current session if $PRE_CurAutoSave { $Menu = $Menu.'"'.i(14,01)."|:del".'"'.; $Menu = $Menu." load(""$GEN_CurScript"", ""_Reset""); delete 1, 0, ""\Panes\§1§_$PRE_AutoSave$GEN_AutoSaveSuffix|\Panes\§2§_$PRE_AutoSave$GEN_AutoSaveSuffix"";"; $Menu = $Menu." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 1; $OPT_Setting = ""AutoSave""; load(""$GEN_CurScript"", ""_Options-Settings"");"; // ------------------<> Autosave of different session } else { $Menu = $Menu.'"'.i(14,02)."|:del".'"'.; $Menu = $Menu." delete 1, 0, ""\Panes\§1§_$PRE_AutoSave$GEN_AutoSaveSuffix|\Panes\§2§_$PRE_AutoSave$GEN_AutoSaveSuffix"";"; $Menu = $Menu." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 1; $OPT_Setting = ""AutoSave""; load(""$GEN_CurScript"", ""_Options-Settings"");"; } } else { // ------------------------------<> Enable Autosave $Menu = $Menu.'"'.i(14,03)."|:queue".'"'.." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 0; $OPT_Setting = ""AutoSave""; load(""$GEN_CurScript"", ""_Options-Settings"");"; } $Menu = $Menu."-"; // ---------------------------------------------------------<< // --------------------------------------------------------->> Associate script with session if ($PRE_CurSess) { $AutoScriptedSess = ($STG_AutoSave && $PRE_CurAutoSave)? $PRE_CurAutoSave : $PRE_CurSess; $ScriptEdition = " if ($Script != """.i(0,07).""") {if $Script {setkey(""$Script"", ""Script"", ""$AutoScriptedSess"", ""$GEN_Ini""); wait 300; status """.i(14,04).""";} else {setkey("""", """", ""$AutoScriptedSess"", ""$GEN_Ini""); wait 300; status """.i(14,05).""";}}"; if getkey("Script", "$AutoScriptedSess", $GEN_Ini) { // ------------------<> Edit script $Menu = $Menu.'"'.i(14,06)."|:steps".'"'.." $Script = input(""".i(14,07)." '$AutoScriptedSess'"", """.'• '.i(14,08).' ""::"" .- '.i(14,09).' ::msg ""Hello World""; • '.i(14,010).' - '.i(14,11).' RunAntivirus.xys - '.i(14,12).' ""Run App.xys"", ""My Antivirus"" • '.i(14,13).''.""", getkey(""Script"", ""$AutoScriptedSess"", ""$GEN_Ini""), , """.i(0,07).""");"; $Menu = $Menu$ScriptEdition; } else { // ------------------<> Associate script $Menu = $Menu.'"'.i(14,14)."|:steps".'"'.." $Script = input(""".i(14,15)." '$AutoScriptedSess'"", """.'• '.i(14,08).' ""::"" .- '.i(14,09).' ::msg ""Hello World""; • '.i(14,010).' - '.i(14,11).' RunAntivirus.xys - '.i(14,12).' ""Run App.xys"", ""My Antivirus"" '.""", , , """.i(0,07).""");"; $Menu = $Menu$ScriptEdition; } } else { // ------------------<> Invalid session note $Menu = $Menu.'"'.i(14,16)."|:steps".'"'.; // Script only available for valid session } // ---------------------------------------------------------<< // --------------------------------------------------------->> Reorder session list if ($PRE_n_AvailSess > 1) { $Menu = $Menu.'"'.i(14,17)."|:viewlist".'"'.." load(""$GEN_CurScript"", ""_ReorderSessionList"");"; $Menu = $Menu." global $DYN_SessionsOrder; setkey(""$DYN_SessionsOrder"", ""SessionsOrder"", ""General"", ""$GEN_Ini""); wait 500; status """.i(18).""";}"; } else { // ------------------<> Reorder disabled (only 1 session available) $Menu = $Menu.'"'.i(14,17)."|:viewlist".'"'.; } // ---------------------------------------------------------<< // --------------------------------------------------------->> Toggle XYplorer main menu $Menu = $Menu.'"'.i(14,19)."|\xyplorer.exe".'"'.." #1061;"; $Menu = $Menu."-"; // ---------------------------------------------------------<< // --------------------------------------------------------->> Copy code for CTB/CKS/UDC set $Code; $Code = $Code.chr(13); $Code = $Code." ".i(14,21).chr(13); $Code = $Code." ".i(14,22).chr(13); $Code = $Code." ".i(14,23).chr(13); $Code = $Code." ".i(14,24).chr(13); $Code = $Code." ".i(14,25).chr(13); $Code = $Code.''.chr(13); $Code = $Code.'• '.i(14,26).chr(13); $Code = $Code.' global $DYN_InpSess = "'.$PRE_CurSess.'"; load "SessionManager.xys", "_Load";'.chr(13); $Code = $Code.''.chr(13); $Code = $Code.'• '.i(14,27).chr(13); $Code = $Code.' load "SessionManager.xys", "_Reset";'.chr(13); $Code = $Code.''.chr(13); $Code = $Code.'• '.i(14,28).chr(13); $Code = $Code.' load "SessionManager.xys", "_Layout-Reset";'.chr(13); $Code = $Code.''.chr(13); $Code = $Code.'• '.i(14,29).chr(13); $Code = $Code.' load "SessionManager.xys", "_Save-Temporary";'.chr(13); $Menu = $Menu.'"'.i(14,20)."|:udc".'"'.." text '$Code', 650, 450, """.i(14,30).""";"; $Menu = $Menu."-"; // ---------------------------------------------------------<< // --------------------------------------------------------->> Strong separator if $STG_Separator { $Menu = $Menu."                                                               •••••••••••••••••••••••••••"; $Menu = $Menu."-"; } // ---------------------------------------------------------<< // --------------------------------------------------------->> Auto optimize tree if $STG_AutoOptimizeTree { $Menu = $Menu.'"'.i(14,31)."||2".'"'.." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 1; $OPT_Setting = ""AutoOptimizeTree""; load(""$GEN_CurScript"", ""_Options-Settings"");"; } else { $Menu = $Menu.'"'.i(14,31).'"'.." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 0; $OPT_Setting = ""AutoOptimizeTree""; load(""$GEN_CurScript"", ""_Options-Settings"");"; } $Menu = $Menu."-"; // ---------------------------------------------------------<< // --------------------------------------------------------->> Layout options - If using layouts if $GEN_LayON { // ------------------<> Standard fallback $Menu = $Menu.'"'.i(14,32).'"'.; // ------------------<> Layout fallback if $STG_LayFallbackDef { $Menu = $Menu.'"'.i(14,33)."||2".'"'.." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 1; $OPT_Setting = ""LayFallbackDef""; load(""$GEN_CurScript"", ""_Options-Settings"");"; } else { $Menu = $Menu.'"'.i(14,33).'"'.." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 0; $OPT_Setting = ""LayFallbackDef""; load(""$GEN_CurScript"", ""_Options-Settings"");"; } $Menu = $Menu."-"; // ------------------<> Info panel if $STG_InfoPanelPreview { $Menu = $Menu.'"'.i(14,34)."||2".'"'.." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 1; $OPT_Setting = ""InfoPanelPreview""; load(""$GEN_CurScript"", ""_Options-Settings"");"; } else { $Menu = $Menu.'"'.i(14,34).'"'.." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 0; $OPT_Setting = ""InfoPanelPreview""; load(""$GEN_CurScript"", ""_Options-Settings"");"; } // ------------------<> Xtras if $STG_Xtras { $Menu = $Menu.'"'.i(14,35)."||2".'"'.." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 1; $OPT_Setting = ""Xtras""; load(""$GEN_CurScript"", ""_Options-Settings"");"; } else { $Menu = $Menu.'"'.i(14,35).'"'.." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 0; $OPT_Setting = ""Xtras""; load(""$GEN_CurScript"", ""_Options-Settings"");"; } // ---------------------------------------------------------<< // --------------------------------------------------------->> Layout options - If not using layouts } else { // ------------------<> Standard fallback if $STG_StdResetWithLay { $Menu = $Menu.'"'.i(14,32)."||2".'"'.." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 1; $OPT_Setting = ""StdResetWithLay""; load(""$GEN_CurScript"", ""_Options-Settings"");"; } else { $Menu = $Menu.'"'.i(14,32).'"'.." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 0; $OPT_Setting = ""StdResetWithLay""; load(""$GEN_CurScript"", ""_Options-Settings"");"; } // ------------------<> Layout fallback $Menu = $Menu.'"'.i(14,33).'"'.; $Menu = $Menu."-"; // ------------------<> Info panel $Menu = $Menu.'"'.i(14,34).'"'.; // ------------------<> Xtras $Menu = $Menu.'"'.i(14,35).'"'.; } $Menu = $Menu."-"; // ---------------------------------------------------------<< // --------------------------------------------------------->> Interface // ------------------<> Sessions on top if $STG_SessionListOnTop { $Menu = $Menu.'"'.i(14,36)."||2".'"'.." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 1; $OPT_Setting = ""SessionListOnTop""; load(""$GEN_CurScript"", ""_Options-Settings"");"; } else { $Menu = $Menu.'"'.i(14,36).'"'.." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 0; $OPT_Setting = ""SessionListOnTop""; load(""$GEN_CurScript"", ""_Options-Settings"");"; } // ------------------<> Separator if $STG_Separator { $Menu = $Menu.'"'.i(14,37)."||2".'"'.." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 1; $OPT_Setting = ""Separator""; load(""$GEN_CurScript"", ""_Options-Settings"");"; } else { $Menu = $Menu.'"'.i(14,37).'"'.." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 0; $OPT_Setting = ""Separator""; load(""$GEN_CurScript"", ""_Options-Settings"");"; } // ------------------<> Confirmation if $STG_Confirmation { $Menu = $Menu.'"'.i(14,38)."||2".'"'.." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 1; $OPT_Setting = ""Confirmation""; load(""$GEN_CurScript"", ""_Options-Settings"");"; } else { $Menu = $Menu.'"'.i(14,38).'"'.." global $OPT_b_State, $OPT_Setting; $OPT_b_State = 0; $OPT_Setting = ""Confirmation""; load(""$GEN_CurScript"", ""_Options-Settings"");"; } $Menu = $Menu."-"; // ---------------------------------------------------------<< // --------------------------------------------------------->> Reduce flickering if !getkey("TabsetsNoPaneActivation", "Settings") { $Menu = $Menu.'"'.i(14,39)."|%winsysdir%\ieframe.dll /62".'"'.." load(""$GEN_CurScript"", ""_Options-Tweak"");"; } else { $Menu = $Menu.'"'.i(14,40)."||2".'"'.; } $Menu = $Menu."-"; // ---------------------------------------------------------<< // --------------------------------------------------------->> Help $Menu = $Menu.'"'.i(14,41)." Session Manager v$GEN_SM_Version|:info".'"'.." load(""$GEN_CurScript"", ""_Help"");"; $Menu = $Menu."-"; // ------------------<> Cancel $Menu = $Menu.'"'.i(0,07).'"'.." status;"; // ---------------------------------------------------------<< status; load($Menu, , s); /* ######################################################################################### */ /* ######################################################################################### */ "_Options-Settings" global $GEN_Ini; global $OPT_b_State, $OPT_Setting; if $OPT_b_State { setkey("0", $OPT_Setting, "Settings", $GEN_Ini); $d = i(15,02); } else { setkey("1", $OPT_Setting, "Settings", $GEN_Ini); $d = i(15,03); } if ($OPT_Setting == "Confirmation") { $status = i(15,07); } elseif ($OPT_Setting == "SessionListOnTop") { $status = i(15,08); } elseif ($OPT_Setting == "AutoOptimizeTree") { $status = i(15,09); } elseif ($OPT_Setting == "EnableLayouts") { $status = i(15,10); } elseif ($OPT_Setting == "LayFallbackDef") { $status = i(15,11); } elseif ($OPT_Setting == "StdResetWithLay") { $status = i(15,12); } elseif ($OPT_Setting == "InfoPanelPreview") { $status = i(15,13); } elseif ($OPT_Setting == "Xtras") { $status = i(15,14); } elseif ($OPT_Setting == "AutoSave") { $status = i(15,15); } elseif ($OPT_Setting == "Separator") { $status = i(15,16); } // ------------------<> Setting changed if (getkey($OPT_Setting, "Settings", $GEN_Ini) != $OPT_b_State) { wait 400; status i(15,01)." '".$status."' $d ".i(15,04); // ------------------<> Problem accessing INI } else { msg " ".i(15,05)." $GEN_INI ".i(15,01)." '".$status."' ".i(15,06).". "; wait 400; status i(15,01)." '".$status."' ".i(15,06), "883333", "stop"; } /* ######################################################################################### */ /* ######################################################################################### */ "_Options-Tweak" // Compatibility with updates from old XY versions (pane deactivation tweak) if confirm("".i(16,01)." TabsetsNoPaneActivation ".i(16,02)." ".i(16,03)." ---> ".i(16,04)." • ".i(16,05)." '".i(2,18)."' > '".i(14,39)."'. ") { #193; // Save configuration setkey("1", "TabsetsNoPaneActivation", "Settings"); status i(16,06)." 'TabsetsNoPaneActivation' ".i(0,06); wait 50; #190; // Restart without saving } else { status i(16,06)." 'TabsetsNoPaneActivation' ".i(16,07), , "stop"; } /* ######################################################################################### */ /* ######################################################################################### */ "_About" global $GEN_SM_Version, $GEN_CurScript, $GEN_Ini, $GEN_LayUsed, $PRE_CurSess, $PRE_CurSessInv, $PRE_SessTab1, $PRE_SessTab2; global $DYN_InpSessLay; $d_SM_Version = "Session Manager v$GEN_SM_Version ---------------------------"; // --------------------------------------------------------->> Analyze session/tabsets // ------------------<> Valid session if ($PRE_CurSess) { $SessStatus = $d_SM_Version.i(4,02)." $PRE_CurSess "; // ------------------<> Inverted session } elseif ($PRE_CurSessInv) { $SessStatus = $d_SM_Version.i(4,02)." $PRE_CurSessInv ".i(17,01)." ---> ".i(17,02)." "; // ------------------<> Mixed session } elseif ($PRE_SessTab1 && $PRE_SessTab2) { $SessStatus = $d_SM_Version.i(17,03)." ".i(17,04)." $PRE_SessTab1 ".i(17,05)." $PRE_SessTab2 "; // ------------------<> 1st session & 2nd tabset } elseif ($PRE_SessTab1 && !$PRE_SessTab2) { $SessStatus = $d_SM_Version.i(17,06)." ".i(17,04)." $PRE_SessTab1 ".i(17,07)." ".gettoken(, -1, "\")." "; // ------------------<> 1st tabset & 2nd session } elseif (!$PRE_SessTab1 && $PRE_SessTab2) { $SessStatus = $d_SM_Version.i(17,06)." ".i(17,08)." ".gettoken(, -1, "\")." ".i(17,05)." $PRE_SessTab2 "; // ------------------<> Tabsets only } else { $SessStatus = $d_SM_Version.i(17,09)." ".i(17,10)." ".gettoken(, -1, "\")." ".i(17,11)." ".gettoken(, -1, "\")." "; } // ---------------------------------------------------------<< // --------------------------------------------------------->> Check orphans // Unique tabsets previously belonging to a session (e.g. '§1§_MySession' present but not '§2§_MySession') $l_AllTabsets = folderreport(dirsrel, r, ."\Panes", , , "|")."|"; status "Session Manager", , "progress"; set $OrphSess; set $l_OrphSess; foreach ($tsession, $l_AllTabsets, "|") { if ($tsession && ($tsession Like "*§1§_*")) { $tsession = replace($tsession, "§1§_", ""); if ($l_AllTabsets == replace($l_AllTabsets, "§2§_".$tsession."|", "")) { $i++; $OrphSess = $OrphSess." §1§_".$tsession." "; $l_OrphSess = $l_OrphSess."§1§_".$tsession."|"; } } elseif ($tsession Like "*§2§_*") { $tsession = replace($tsession, "§2§_", ""); if ($l_AllTabsets == replace($l_AllTabsets, "§1§_".$tsession."|", "")) { $i++; $OrphSess = $OrphSess." §2§_".$tsession." "; $l_OrphSess = $l_OrphSess."§2§_".$tsession."|"; } } } // ---------------------------------------------------------<< // --------------------------------------------------------->> Clean orphan layouts automatically if $GEN_LayUsed { $l_LayIni = regexreplace(readfile("$GEN_Ini"), "\n(\w|\s).*\r", ""); // Remove everything but sections $l_LayIni = regexreplace($l_LayIni, "(\[General|\[Settings|.*¦‡¦)\]\r\n", ""); // Remove SessionManager Data $l_LayIni = regexreplace($l_LayIni, "\[Layout\s([^\]]+)\]\r\n", "$1|"); // Keep only session names foreach ($tlayout, $l_LayIni, "|") { if ($tlayout && ($l_AllTabsets == regexreplace($l_AllTabsets, "§(1|2)§_".$tlayout."|", ""))) { // Layout doesn't have a single corresponding session tabset $DYN_InpSessLay = $tlayout; load "$GEN_CurScript", "_Layout-Delete"; } } } // ---------------------------------------------------------<< // --------------------------------------------------------->> Clean orphan tabsets manually if ($i > 0) { $i = ($i > 1)? i(17,12) : i(17,13); // Orphan tabsets/tabset if (confirm("$SessStatus _________________________ $i, ".i(17,14)." $OrphSess---> ".i(17,15)." ")) { #340; #858; #523; // Open tabsets folder in new tab #1016; selectitems $l_OrphSess; } // ---------------------------------------------------------<< } else { msg "$SessStatus"; } status , , "ready"; /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ########################*/ /* ######## help ########*/ /* ########################*/ "_Help" // --- WORK IN PROGRESS + Obsolete code --- global $GEN_SM_Version, $STX_EnableLayouts, $STX_Confirmation, $STX_InfoPanelPreview, $STX_LayFallbackDef, $STX_StdResetWithLay; $STX_EnableLayouts = replace($STX_EnableLayouts, "&", ""); $STX_Confirmation = replace($STX_Confirmation, "&", ""); $STX_InfoPanelPreview = replace($STX_InfoPanelPreview, "&", ""); $STX_LayFallbackDef = replace($STX_LayFallbackDef, "&", ""); $STX_StdResetWithLay = replace($STX_StdResetWithLay, "&", ""); $Help = "
Session Manager   -   v".$GEN_SM_Version."

"; // $Help = $Help."

General

"; $Help = $Help."

--------- ### Work In Progress ### ---------

"; $Help = $Help."
Session Manager Homepage (Updates and Discussions)"; // --------- $Help = $Help."

• Main Concept

"; $Help = $Help."

Each session is composed of two tabsets.
Each tabset has the name of its session,
preceded by '§1§_' for pane 1 and '§2§_' for pane 2.
(e.g. Session 'Work' uses tabsets '§1§_Work' and '§2§_Work')

"; // --------- $Help = $Help."

• Settings

"; $Help = $Help."

- $STX_EnableLayouts

"; $Help = $Help."

- $STX_Confirmation

"; $Help = $Help."

- $STX_InfoPanelPreview

"; $Help = $Help."

- $STX_LayFallbackDef

"; $Help = $Help."

- $STX_StdResetWithLay

"; // --------- $Help = $Help.""; html($Help, 700, 650, "Session Manager Help"); "_Terminate" unset $SM_LANGUAGE_FILE; /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ########################*/ /* ###### Functions #####*/ /* ########################*/ function i($section, $key) { $value = gettoken(getkey("sm.00$key", $section, $SM_LANGUAGE_FILE), 4, "|"); return ($value)? $value : gettoken(getkey("sm.00$key", $section, caller("file")), 4, "|"); } /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ########################### ########################### */ /* ########################### Embedded Language ########################### */ /* ########################### ########################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### */ /* ######################################################################################### *//* ; ######################## ; ### Session Manager #### ; ######################## [Translation Notes] ;••• Sentences not ending with a "." dot are: menu entries; status text; or syntagmas of longer sentences ;••• I M P O R T A N T: If space needed before ":" use only non-breaking space " " - else menu breaks before colon [SessionManagerHeader] Language=English LanguageNameInEnglish=English Translator= Email= Website= Comments=(209l/1116w) SessionManagerVersion=4.a2 Date=2015-07-27 01:01:01 ; ############### ; ### Default ### ; ############### [0] ;••• Ex.: [Session] '$name' [reset successfully] sm.0001=00|Session|--|Session sm.0002=00|reset successfully|--|reset successfully sm.0003=00|updated successfully|--|updated successfully sm.0004=00|loaded successfully|--|loaded successfully sm.0005=00|saved successfully|--|saved successfully sm.0006=00|deleted successfully|--|deleted successfully sm.0007=00|Cancel|--|Cancel ; ################## ; ### Initialize ### ; ################## [1] sm.0001=00|Session Manager version:|--|Session Manager version: sm.0002=00|XYplorer minimum required version:|--|XYplorer minimum required version: sm.0003=00|Current XYplorer version:|--|Current XYplorer version: sm.0004=00|Please use latest Session Manager compatible version:|--|Please use latest Session Manager compatible version: sm.0005=00|or update XYplorer.|--|or update XYplorer. sm.0006=00|{Layout Session}|--|{Layout Session} sm.0007=00|— AutoSave —|--|— AutoSave — sm.0008=00|— Temporary Session —|--|— Temporary Session — sm.0009=00|About Current Session|--|About Current Session sm.0010=00|About Current Tabsets|--|About Current Tabsets ; ################ ; ### MainMenu ### ; ################ [2] sm.0001=00|Reset Temporary Session|--|Reset Temporary Session sm.0002=00|Update Temporary Session|--|Update Temporary Session sm.0003=00|Reset to Original Session (and Layout)|--|Reset to Original Session (and Layout) sm.0004=00|Update Original Session (and Layout)|--|Update Original Session (and Layout) sm.0005=00|Reset to Original Session|--|Reset to Original Session sm.0006=00|Update Original Session|--|Update Original Session sm.0007=00|Reset Session (and Layout)|--|Reset Session (and Layout) sm.0008=00|Update Session (and Layout)|--|Update Session (and Layout) sm.0009=00|Reset Session (with Default Layout)|--|Reset Session (with Default Layout) sm.0010=00|Reset Session|--|Reset Session sm.0011=00|Update Session|--|Update Session sm.0012=00|Reset Autosave to Current Session|--|Reset Autosave to Current Session sm.0013=00|Save Session as|--|Save Session as sm.0014=00|Save Temporary Session|--|Save Temporary Session sm.0015=00|Rename Session|--|Rename Session sm.0016=00|Delete Sessions|--|Delete Sessions sm.0017=00|Layout Tools|--|Layout Tools sm.0018=00|Options|--|Options ; ############ ; ### Load ### ; ############ [3] sm.0001=00|You're already using session|--|You're already using session sm.0002=00|but you've inverted its panes.|--|but you've inverted its panes. sm.0003=00|Please load another session before reloading session|--|Please load another session before reloading session ; ############# ; ### Reset ### ; ############# [4] sm.0001=00|You're currently using session (with layout):|--|You're currently using session (with layout): sm.0002=00|You're currently using session:|--|You're currently using session: sm.0003=00|Session (with layout)|--|Session (with layout) sm.0004=00|Are you sure you want to reset it?|--|Are you sure you want to reset it? ; ############## ; ### Update ### ; ############## [5] sm.0001=00|Are you sure you want to update it?|--|Are you sure you want to update it? sm.0002=00|No session to update|--|No session to update sm.0003=00|You're not using a valid session.|--|You're not using a valid session. sm.0004=00|You're not using a session.|--|You're not using a session. sm.0005=00|It wouldn't be wise to update the tabsets.|--|It wouldn't be wise to update the tabsets. sm.0006=00|Another window will open with the information about your current tabsets.|--|Another window will open with the information about your current tabsets. ; ############## ; ### Delete ### ; ############## [6] sm.0001=00|You're currently using the only session:|--|You're currently using the only session: sm.0002=00|It can't be deleted right now.|--|It can't be deleted right now. sm.0003=00|Load regular tabsets or save a new session first.|--|Load regular tabsets or save a new session first. sm.0004=00|You're currently using a tabset of the only session:|--|You're currently using a tabset of the only session: sm.0005=00|Load regular tabsets or save a new session first.|--|Load regular tabsets or save a new session first. sm.0006=00|You're currently using tabsets of the only two sessions:|--|You're currently using tabsets of the only two sessions: sm.0007=00|None of them can be deleted right now.|--|None of them can be deleted right now. sm.0008=00|Load regular tabsets or a single session first.|--|Load regular tabsets or a single session first. sm.0009=00|No session deleted|--|No session deleted ;••• Ex.: [You're currently using:] [- one tabset from session:] $Name [You can delete] [the other following sessions.] sm.0010=00|You're currently using:|--|You're currently using: sm.0011=00|- one tabset from session:|--|- one tabset from session: sm.0012=00|You're currently using tabsets.|--|You're currently using tabsets. sm.0013=00|You can delete|--|You can delete sm.0014=00|the following session:|--|the following session: sm.0015=00|the other following sessions:|--|the other following sessions: sm.0016=00|all sessions:|--|all sessions: sm.0017=00|Delete Sessions|--|Delete Sessions ;••• Ex.: 6 sessions deleted successfully sm.0018=00|sessions deleted successfully|--|sessions deleted successfully ; ############ ; ### Save ### ; ############ [7] sm.0001=00|To save a session with its layout, add a question mark '?' before its name.|--|To save a session with its layout, add a question mark '?' before its name. sm.0002=00|Ex1: My Session --> Save 'My Session' without layout.|--|Ex1: My Session --> Save 'My Session' without layout. sm.0003=00|Ex2: ?My Session --> Save 'My Session' with layout.|--|Ex2: ?My Session --> Save 'My Session' with layout. sm.0004=00|Note: Layouts can also be saved later in menu 'Layout Tools' > 'Save/Update Layout of Current Session'.|--|Note: Layouts can also be saved later in menu 'Layout Tools' > 'Save/Update Layout of Current Session'. sm.0005=00|Save & Use session|--|Save & Use session sm.0006=00|Enter the name of the tabsets session to save.|--|Enter the name of the tabsets session to save. sm.0007=00|This session will be in use after you press OK.|--|This session will be in use after you press OK. sm.0008=00|The name has to be a valid filename, and can not contain '[' or ']'.|--|The name has to be a valid filename, and can not contain '[' or ']'. sm.0009=00|Session name is invalid because it contains:|--|Session name is invalid because it contains: sm.0010=00|Save under a different name.|--|Save under a different name. sm.0011=00|No session saved|--|No session saved sm.0012=00|You're currently using an inverted session:|--|You're currently using an inverted session: sm.0013=00|It wouldn't be safe to overwrite this session.|--|It wouldn't be safe to overwrite this session. sm.0014=00|Try saving under a different name.|--|Try saving under a different name. sm.0015=00|You're currently using one tabset of session:|--|You're currently using one tabset of session: sm.0016=00|It wouldn't be safe to overwrite the whole session.|--|It wouldn't be safe to overwrite the whole session. sm.0017=00|Session|--|Session sm.0018=00|already exists.|--|already exists. sm.0019=00|Choose another name.|--|Choose another name. ; ###################### ; ### Save-Temporary ### ; ###################### [8] sm.0001=00|You're using an inverted Temporary Session.|--|You're using an inverted Temporary Session. sm.0002=00|It can't be overwritten.|--|It can't be overwritten. sm.0003=00|Temporary Session saved successfully|--|Temporary Session saved successfully ; ############## ; ### Rename ### ; ############## [9] sm.0001=00|Rename session:|--|Rename session: sm.0002=00|Enter a new session name.|--|Enter a new session name. sm.0003=00|Rename with a different name.|--|Rename with a different name. sm.0004=00|Session|--|Session sm.0005=00|successfully renamed to|--|successfully renamed to sm.0006=00|No session renamed|--|No session renamed sm.0007=00|The current session is already named|--|The current session is already named sm.0008=00|Reload a session before trying to rename.|--|Reload a session before trying to rename. ; ########################## ; ### ReorderSessionList ### ; ########################## [10] sm.0001=00|Write one or more session(s) name(s).|--|Write one or more session(s) name(s). sm.0002=00|One per line. '-' as separator. Empty to reset.|--|One per line. '-' as separator. Empty to reset. ; ###################### ; ### LayoutSessions ### ; ###################### [11] sm.0001=00|Use Layouts:|--|Use Layouts: sm.0002=00|ON|--|ON sm.0003=00|OFF|--|OFF sm.0004=00|Reset Layout to Default|--|Reset Layout to Default sm.0005=00|Update Default Layout|--|Update Default Layout sm.0006=00|Default layout updated successfully|--|Default layout updated successfully sm.0007=00|Autosave Note: Changes will Affect Original Session|--|Autosave Note: Changes will Affect Original Session sm.0008=00|Delete Complete Layout of Current Session (And Reset Layout to Default)|--|Delete Complete Layout of Current Session (And Reset Layout to Default) sm.0009=00|Layout of session|--|Layout of session sm.0010=00|deleted successfully|--|deleted successfully sm.0011=00|updated successfully|--|updated successfully sm.0012=00|saved successfully|--|saved successfully sm.0013=00|Update Layout of Current Session|--|Update Layout of Current Session sm.0014=00|Save Layout of Current Session|--|Save Layout of Current Session sm.0015=00|Layout sessions can't have '[' or ']' in their name. Save session under a different name.|--|Layout sessions can't have '[' or ']' in their name. Save session under a different name. sm.0016=00|Note: Load a Valid Session To Access More Options|--|Note: Load a Valid Session To Access More Options sm.0017=00|------------ DEFAULT LAYOUT ------------|--|------------ DEFAULT LAYOUT ------------ sm.0018=00|Layout reset to default|--|Layout reset to default sm.0019=00|Reload Default Toolbar|--|Reload Default Toolbar sm.0020=00|Toolbar reset to default|--|Toolbar reset to default sm.0021=00|Update Default Toolbar|--|Update Default Toolbar sm.0022=00|Default toolbar updated successfully|--|Default toolbar updated successfully sm.0023=00|------------ CURRENT SESSION ------------|--|------------ CURRENT SESSION ------------ sm.0024=00|Note: Load a Session With Layout To Access More Options|--|Note: Load a Session With Layout To Access More Options sm.0025=00|Remove Toolbar from Layout of Current Session (And Reset Default Toolbar)|--|Remove Toolbar from Layout of Current Session (And Reset Default Toolbar) sm.0026=00|Toolbar removed from layout successfully|--|Toolbar removed from layout successfully sm.0027=00|Update Toolbar in Layout of Current Session (Suffixed: ¶ )|--|Update Toolbar in Layout of Current Session (Suffixed: ¶ ) sm.0028=00|Toolbar updated (in layout) successfully|--|Toolbar updated (in layout) successfully sm.0029=00|Save Toolbar with Layout of Current Session (Will Be Suffixed: ¶ )|--|Save Toolbar with Layout of Current Session (Will Be Suffixed: ¶ ) sm.0030=00|Toolbar saved (in layout) successfully|--|Toolbar saved (in layout) successfully sm.0031=00|Note: Enable 'Use Layouts' to Access More Options|--|Note: Enable 'Use Layouts' to Access More Options ; ########################## ; ### Layout-DefaultSave ### ; ########################## [12] sm.0001=00|Sessions with '[' or ']' can't have a layout.|--|Sessions with '[' or ']' can't have a layout. ; #################### ; ### Options-Menu ### ; #################### [14] sm.0001=00|Disable Auto-Save (and Reset Session)|--|Disable Auto-Save (and Reset Session) sm.0002=00|Disable Auto-Save of Temporary Version of Session|--|Disable Auto-Save of Temporary Version of Session sm.0003=00|Enable Auto-Save of Temporary Version of Session on Session Change|--|Enable Auto-Save of Temporary Version of Session on Session Change sm.0004=00|Script associated successfully|--|Script associated successfully sm.0005=00|Script association removed successfully|--|Script association removed successfully sm.0006=00|Edit Script Associated with Current Session (Suffixed: ® )|--|Edit Script Associated with Current Session (Suffixed: ® ) sm.0007=00|Edit Script Associated with Session:|--|Edit Script Associated with Session: sm.0008=00|Enter script directly (like in Address Bar), preceded by|--|Enter script directly (like in Address Bar), preceded by sm.0009=00|Ex:|--|Ex: sm.0010=00|Or enter name of script file, with or without label.|--|Or enter name of script file, with or without label. sm.0011=00|Ex1:|--|Ex1: sm.0012=00|Ex2:|--|Ex2: sm.0013=00|Leave empty to remove script association from session.|--|Leave empty to remove script association from session. sm.0014=00|Associate Script with Current Session (Will Be Suffixed: ® )|--|Associate Script with Current Session (Will Be Suffixed: ® ) sm.0015=00|Associate Script with Session:|--|Associate Script with Session: sm.0016=00|Associate Script with Current Session (Only Available For Valid Sessions)|--|Associate Script with Current Session (Only Available For Valid Sessions) sm.0017=00|Reorder List of Sessions|--|Reorder List of Sessions sm.0018=00|Sessions reordered successfully|--|Sessions reordered successfully sm.0019=00|Toggle Visibility of XYplorer Main Menu|--|Toggle Visibility of XYplorer Main Menu sm.0020=00|Display Codes to Access Session Manager Straight From XYplorer (Catalogue, Buttons...)...|--|Display Codes to Access Session Manager Straight From XYplorer (Catalogue, Buttons...)... ;••• I M P O R T A N T: In entries 0021-0029, do not use straight single quote "'". If needed, use oblique quote "’". sm.0021=00| ---------------------------------------------------------------------|--| --------------------------------------------------------------------- sm.0022=00| --- Commands for external access from: ---|--| --- Commands for external access from: --- sm.0023=00| --- Catalog, Toolbar buttons (CTB), Keyboard shortcuts (CKS), ---|--| --- Catalog, Toolbar buttons (CTB), Keyboard shortcuts (CKS), --- sm.0024=00| --- User commands (UDC), Scripts... ---|--| --- User commands (UDC), Scripts... --- sm.0025=00| ---------------------------------------------------------------------|--| --------------------------------------------------------------------- sm.0026=00|Load current session:|--|Load current session: sm.0027=00|Reset current session:|--|Reset current session: sm.0028=00|Reset layout to default:|--|Reset layout to default: sm.0029=00|Save temporary session:|--|Save temporary session: sm.0030=00|Codes to copy and paste into Catalog, CTB, CKS, UDC, Scripts…|--|Codes to copy and paste into Catalog, CTB, CKS, UDC, Scripts… sm.0031=00|General: Auto-Optimize Tree on Session Change|--|General: Auto-Optimize Tree on Session Change sm.0032=00|Standard: Always Load Default Layout on Session Change|--|Standard: Always Load Default Layout on Session Change sm.0033=00|Layouts: Always Load Default Layout (Instead of Last) When Returning to Standard Sessions|--|Layouts: Always Load Default Layout (Instead of Last) When Returning to Standard Sessions sm.0034=00|Layouts: Activate Preview When Loading Layout Session With Info Panel Visible|--|Layouts: Activate Preview When Loading Layout Session With Info Panel Visible sm.0035=00|Layouts: Enable Advanced Layout Tools (With Toolbar And Auto-Sync Support)|--|Layouts: Enable Advanced Layout Tools (With Toolbar And Auto-Sync Support) sm.0036=00|Menu: Display List of Sessions on Top (Instead of Bottom)|--|Menu: Display List of Sessions on Top (Instead of Bottom) sm.0037=00|Menu: Display Separator Between List of Sessions and Rest of Menu|--|Menu: Display Separator Between List of Sessions and Rest of Menu sm.0038=00|Menu: Enable Confirmation Dialog for Reset and Update|--|Menu: Enable Confirmation Dialog for Reset and Update sm.0039=00|Tweak: Reduce Flickering...|--|Tweak: Reduce Flickering... sm.0040=00|Tweak: Flickering is reduced|--|Tweak: Flickering is reduced sm.0041=00|Help:|--|Help: ; ######################## ; ### Options-Settings ### ; ######################## [15] ;••• Ex.: [Setting] '[Confirmation Dialog]' [enabled] [successfully] sm.0001=00|Setting|--|Setting sm.0002=00|disabled|--|disabled sm.0003=00|enabled|--|enabled sm.0004=00|successfully|--|successfully sm.0005=00|Couldn't access INI file:|--|Couldn't access INI file: sm.0006=00|unchanged|--|unchanged sm.0007=00|Confirmation Dialog|--|Confirmation Dialog sm.0008=00|Session List on Top|--|Session List on Top sm.0009=00|Auto-Optimization of Tree|--|Auto-Optimization of Tree sm.0010=00|Use of Layouts|--|Use of Layouts sm.0011=00|Layout Fallback to Default|--|Layout Fallback to Default sm.0012=00|Reset Layout on Session Change|--|Reset Layout on Session Change sm.0013=00|Preview Activation on Layout Load|--|Preview Activation on Layout Load sm.0014=00|Advanced Layout Tools|--|Advanced Layout Tools sm.0015=00|Autosave|--|Autosave sm.0016=00|Separator|--|Separator ; ##################### ; ### Options-Tweak ### ; ##################### [16] sm.0001=00|A tweak is required for a smoother experience (less flickering):|--|A tweak is required for a smoother experience (less flickering): sm.0002=00|It is enabled by default on XYplorer installs, but is currently disabled.|--|It is enabled by default on XYplorer installs, but is currently disabled. sm.0003=00|Do you want to activate it now? (recommended)|--|Do you want to activate it now? (recommended) sm.0004=00|Your current configuration will be saved and XYplorer will restart.|--|Your current configuration will be saved and XYplorer will restart. sm.0005=00|Note: You can still activate it later in|--|Note: You can still activate it later in sm.0006=00|Tweak|--|Tweak sm.0007=00|unchanged|--|unchanged ; ############# ; ### About ### ; ############# [17] sm.0001=00|but you've inverted the tabsets.|--|but you've inverted the tabsets. sm.0002=00|It would be wise to save it to another name.|--|It would be wise to save it to another name. sm.0003=00|You've mixed your sessions.|--|You've mixed your sessions. sm.0004=00|Your first tabset is from session:|--|Your first tabset is from session: sm.0005=00|Your second tabset is from session:|--|Your second tabset is from session: sm.0006=00|You're not using a full session.|--|You're not using a full session. sm.0007=00|Your second tabset is a regular tabset:|--|Your second tabset is a regular tabset: sm.0008=00|Your first tabset is a regular tabset:|--|Your first tabset is a regular tabset: sm.0009=00|You're not using a session but two different tabsets.|--|You're not using a session but two different tabsets. sm.0010=00|Your first tabset is:|--|Your first tabset is: sm.0011=00|Your second tabset is:|--|Your second tabset is: sm.0012=00|The following tabsets are orphans|--|The following tabsets are orphans sm.0013=00|The following tabset is an orphan|--|The following tabset is an orphan sm.0014=00|and can no longer be used in a session:|--|and can no longer be used in a session: sm.0015=00|Do you want to open the tabsets folder (in a new tab)?|--|Do you want to open the tabsets folder (in a new tab)? ; ############ ; ### Help ### ; ############ [18] */