|
|
Ac Script - overviewOverview Ac Script is a simple, procedural scripting solution designed especially for Ac Browser Plus. Any file with an extension ".acscript" will be treated as Ac Script. You can create those scripts in any text editor (e.g. Notepad) or by using internal Ac Script Editor (Scripts | Ac Script Editor menu command). You can then add them for example to the 'scripts' folder or to the toolbar. The project is in a very early stage. Example (not very useful, but simple)Example is the best teacher, so let's start with one: 1. open some unimportant folder, where you can safely make some changes
(precisely: renaming selected file) var $sPathLower=strlower($acb_focused_path);
Acb_Rename($acb_focused_path,$sPathLower);
Acb_BwRefresh();
MessageBox("done!");
4. Click 'Run' button. This script simply renames a file/folder under cursor (focused), making it 'lower case', that is, if 'A FILE.TXT' is under cursor (focused) it will rename it to 'a file.txt'. First, it uses function 'strlower' with currently focused path as an argument, and remembers the result in a '$sPathLower'. Then it uses Acb_Rename (SrcPath, DestPath) function to rename the file. Finally - it refreshes currently active browse window and displays a message. More examplesYou can find more examples by browsing the 'Scripts' folder located in your Ac Browser Plus installation directory (look for .acscript files). Short function and variable referenceNote, that this document is in progress. Before the script starts, AcB initializes the following variables: $acb_selected_paths : an array of selected paths. $acb_focused_path : focused path (file/folder under cursor), string Please note, that most of AcB's functions work with full paths (e.g.
"c:\windows\notepad.exe"), not file names (e.g. " List of functions:List of Ac Script function declarations is
here. DNM Script"Ac Script" is an extension for "DNM Script", which is described here. There is also a Wiki being developed. Scripts menuIf you want to know how the 'Scripts' menu is created and how to modify it see Folder based GUI and menus. All links
|
|
Copyright Konrad Papala; [ACB::Help Online] |