|
4 Private Shell ScriptingPrivate Shell Scripting allows to automate interaction with server to solve complicated tasks quicker and/or without user intervention. Script consists of one or more steps that are performed by Private Shell one by one. Each step defines exactly one Private Shell action like connect, disconnect, close window, etc. Script engine begins execution of the next step only when the previous one has been completely executed (e.g. when you execute a Connect action, the next step will be executed only when the connection is established and authentication succeeds). Some actions allow transferring the execution control to another step thus introducing conditional execution and loops. To do it, each step may have a label to mark it as a target of a control transfer. If the destination step is not found when performing control transfer (i.e. specified label not found in the script), script execution stops and an error is displayed. Private Shell scripts are saved as text files and thus can be easily edited by third-party text editors, copied, transferred by e-mail, etc. By default, Private Shell scripts are saved in the following folder on your computer: C:\Documents and Settings\<user>\Application Data\Private Shell\Scripts\ where <user> is your Windows user name. This can be redefined in the pshell.ini configuration file (the ScriptsDir parameter). Since scripts are ordinary files, they are available to all Private Shell profiles at the same time. However, each profile can have its own hot key to run the same script. Generally, to create a script you must open the scripting tab of the settings dialog. As scripts are shared among Private Shell profiles, you'll get the same set of scripts by pressing the Settings button on the toolbar, by choosing the Profiles -> Edit profiles... menu item, etc. |