https://fileexplorer.codeplex.com/SourceControl/latest#src/FileExplorer3/app/FileExplorer3.WPF/Scripts/v2/ExplorerGoTo.cs

public static IScriptCommand ExplorerGotoStartupPathOrFirstRoot(string explorerVariable = "{Explorer}", 
    string profilesVariable = "{Profiles}",
    string rootDirectoriesVariable = "{RootDirectories}", 
    string startupPathVariable = "{StartupPath}", IScriptCommand nextCommand = null)
{
    string firstRootDirectoriesVariable = ParameterDic.CombineVariable(rootDirectoriesVariable, "[0]");
    return 
            ScriptCommands.RunCommandsInSequence(nextCommand,
            ScriptCommands.IfAssignedAndNotEmptyString(startupPathVariable,
                UIScriptCommands.ExplorerParseAndGoTo(explorerVariable, profilesVariable, startupPathVariable),
                UIScriptCommands.ExplorerGoTo(explorerVariable, firstRootDirectoriesVariable,
                    UIScriptCommands.DirectoryTreeToggleExpand(firstRootDirectoriesVariable))));
}

Last edited Aug 22, 2014 at 6:00 PM by lycj, version 1

Comments

No comments yet.