
If you add this, it would be possible to do file lists including subdirectories, etc.
Code: Select all
WScript.Sleep(1000);
WScript.Echo("Done");
Code: Select all
---------------------------
Salamander Automation Script Error
---------------------------
Line: 1
Column: 1
Error: 'WScript' is undefined
---------------------------
[OK]
---------------------------
Exactly. The WScript object is the root object for the Windows Script Host (wscript.exe or cscript.exe). The root object for the Automation plugin is the Salamander object.Jan Rysavy wrote:It's probably not implemented by Automation plugin.
Sure. However, regarding the Sleep method, since the Automation plugin runs on the main thread, the whole UI would be blocked. What is the Sleep supposed to be used for?Jan Rysavy wrote:Is there some way how to call Sleep() or Quit() methods? Could it be published by Salamander (root) object?
Have you checked the Salamander.Version property? It has the same value as the SalamanderVersion global plugin variable.Jan Rysavy wrote:It would be also great to get interface version from Salamander object so we can solve compatibility issues on script side (for example test minimal interface version).
I have some troubles with NTFS file system (Windows 7 x64). I'm deleting directory tree in destination and re-creating it immediately. When one of deleted directories is displayed in Salamander panel, I will get Access Denied error while re-creating phase (so directory is deleted and cannot be immediately created again). I wanted to try call sleep as dirty hack. Maybe we should publish methods to temporarily release Salamander file system change notifications (I will talk about it with Petr). The main thread is not a problem for me.manison wrote:Sure. However, regarding the Sleep method, since the Automation plugin runs on the main thread, the whole UI would be blocked. What is the Sleep supposed to be used for?Jan Rysavy wrote:Is there some way how to call Sleep() or Quit() methods? Could it be published by Salamander (root) object?
I mean version of Automation plugin API, is it available for scripts? So we can display message like "This script needs Automation plugin ver. XYZ and later"?manison wrote:Have you checked the Salamander.Version property? It has the same value as the SalamanderVersion global plugin variable.Jan Rysavy wrote:It would be also great to get interface version from Salamander object so we can solve compatibility issues on script side (for example test minimal interface version).
Ok, I will add the Sleep method to the interface.Jan Rysavy wrote:I have some troubles with NTFS file system (Windows 7 x64). I'm deleting directory tree in destination and re-creating it immediately. When one of deleted directories is displayed in Salamander panel, I will get Access Denied error while re-creating phase (so directory is deleted and cannot be immediately created again). I wanted to try call sleep as dirty hack. Maybe we should publish methods to temporarily release Salamander file system change notifications (I will talk about it with Petr). The main thread is not a problem for me.manison wrote:Sure. However, regarding the Sleep method, since the Automation plugin runs on the main thread, the whole UI would be blocked. What is the Sleep supposed to be used for?Jan Rysavy wrote:Is there some way how to call Sleep() or Quit() methods? Could it be published by Salamander (root) object?
Oh, I see now. Beginning the next version there will be the AutomationVersion property of the Salamander object.Jan Rysavy wrote:I mean version of Automation plugin API, is it available for scripts? So we can display message like "This script needs Automation plugin ver. XYZ and later"?manison wrote:Have you checked the Salamander.Version property? It has the same value as the SalamanderVersion global plugin variable.Jan Rysavy wrote:It would be also great to get interface version from Salamander object so we can solve compatibility issues on script side (for example test minimal interface version).
Thanks, I'll take a look.Jan Rysavy wrote:Small bug:
Automation doesn't display error message box when script could not be executed (was removed for example). It does nothing which could be misleading.
Is it possible to modify the contents of the plugin menu with the current plugin interface? I don't see another way but the CPluginInterfaceAbstract::Connect method.Jan Rysavy wrote:Some ideas:
New "Rescan" command to refresh cached script names. Now we must unload/reload Automation plugin? Another option could be refresh before Automation menu is displayed?
That should be easy, putting on my to do list.Jan Rysavy wrote:Add support for TRACE_I and TRACE_E messages so we can log traces from scripts. From next Preview Build Salamander version will be Trace Server part of default installation (for PB only, not for final version). Logging directly to text will be also supported trough the same TRACE_I / TRACE_E interface.
To focus a file you can set the Path property of the appropriate Panel object. For example (jscript):Jan Rysavy wrote:Option to focus item in panel so we can point out to created archive or another desired file.
Code: Select all
Salamander.SourcePanel.Path = "C:\\autoexec.bat";
Agreed, putting on the to do list.Jan Rysavy wrote:Last one: It would be great to have Progress dialog box (CSalamanderForOperationsAbstract) availabe so we can display operation progress and handle Cancel button.
Thank you!Jan Rysavy wrote:Automation plugin looks really great. I see big potential here...