Automation Plugin

Support for developers of new plugins, third-party plugin announcements and discussions.
manison
Plugin Developer
Plugin Developer
Posts: 216
Joined: 09 Dec 2005, 23:23
Location: Ceske Budejovice, Czech Republic
Contact:

Automation Plugin

Post by manison »

Automation Plugin will let you execute scripts that will help you automate tasks that are not possible (or difficult) to do with Salamander itself. You can use any language supported by the Windows Script Host to write your scripts. Windows comes with JScript and VBScript engines preinstalled, however 3rd party scripting engines are available for languages such as Perl, PHP, Python, Ruby and others.

Installation
1. Extract the package to the Altap Salamander folder.
2. Go to Altap Salamander > Plugins > Plugins Manager…
3. Click Add.
4. Navigate to the folder containing the plugin and select automation.spl.
5. The plugin is now accessible in the Plugins > Automation menu.

Usage
For information how to run your scripts consult the help accessible from Help > Contents menu and locate the Plugins > Automation topic.
For documentation of the Salamander Object Model please see the Automation Plugin Reference topic in the help.
To explore the sample scripts please go to the plugins/automation/scripts subdirectory of the Altap Salamander installation folder.

This is the initial release of the plugin, the object model is going to be expanded based on the feedback.

UPDATE: Automation plugin is now part of Altap Salamander installation. Download latest Preview Build.

Download[/hide]
Last edited by manison on 03 Dec 2009, 15:00, edited 1 time in total.
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5229
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Automation Plugin

Post by Jan Rysavy »

Manison, this looks REALLY promising!

Just yesterday I saw this script: Easier Way to Take Ownership and Grant Access Files or Directories in Vista.

Such scripts could play nicely with your plugin.
manison
Plugin Developer
Plugin Developer
Posts: 216
Joined: 09 Dec 2005, 23:23
Location: Ceske Budejovice, Czech Republic
Contact:

Re: Automation Plugin

Post by manison »

Jan Rysavy wrote:Manison, this looks REALLY promising!
Thank you.
Jan Rysavy wrote:Just yesterday I saw this script: Easier Way to Take Ownership and Grant Access Files or Directories in Vista.

Such scripts could play nicely with your plugin.
Definitely, thanks for sharing.

BTW, don't any of you guys know a reliable way how to get Windows version from within a script?
User avatar
th.
Posts: 116
Joined: 04 Sep 2006, 23:09
Location: Germany

Re: Get Windows Version

Post by th. »

I do it like this:

Code: Select all

dim shell, strOS, strVerKey, strVersion
Set Shell = CreateObject("WScript.Shell")
strOS = shell.ExpandEnvironmentStrings("%OS%")
If strOS = "Windows_NT" Then
   strVerKey = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\"
   strVersion = Shell.regread(strVerKey & "ProductName") & " " & Shell.regread(strVerKey & "CurrentVersion") & "." & Shell.regread(strVerkey & "CurrentBuildNumber")
Else
  strVerKey = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\"
  strVersion = Shell.regread(strVerKey & "ProductName") & " " & Shell.regread(strVerKey & "VersionNumber")
End if
MsgBox strVersion
(Source: someone on the internet)
User avatar
SelfMan
Posts: 1142
Joined: 05 Apr 2006, 20:51
Contact:

Re: Automation Plugin

Post by SelfMan »

The system has also a "ver" command.
C:\>ver
Microsoft Windows XP [Version 5.1.2600]

More info about the usage in batch (*.bat/*.cmd) files is HERE.
manison
Plugin Developer
Plugin Developer
Posts: 216
Joined: 09 Dec 2005, 23:23
Location: Ceske Budejovice, Czech Republic
Contact:

Re: Automation Plugin

Post by manison »

Seems good, thank you guys.
Petr Solin
ALTAP Staff
ALTAP Staff
Posts: 1112
Joined: 08 Dec 2005, 09:13
Location: Novy Bor, Czech Republic
Contact:

Re: Automation Plugin

Post by Petr Solin »

Great idea! Very nice plugin!
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5229
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Automation Plugin

Post by Jan Rysavy »

Manison, what about a new command "Automation Menu" which will display menu with all scripts the same way as User Menu does?
menu.png
menu.png (34.89 KiB) Viewed 23132 times
Just idea based on http://forum.altap.cz/viewtopic.php?f=3&t=818
User avatar
th.
Posts: 116
Joined: 04 Sep 2006, 23:09
Location: Germany

Re: Automation Plugin

Post by th. »

Manison, what about a new command "Automation Menu" which will display menu with all scripts the same way as User Menu does?
Hmmm, then we would have 2 menus with "user generated content".
I'd prefer the ability to run a script from the user menu through the automation plugin.
Jan Rysavy
ALTAP Staff
ALTAP Staff
Posts: 5229
Joined: 08 Dec 2005, 06:34
Location: Novy Bor, Czech Republic
Contact:

Re: Automation Plugin

Post by Jan Rysavy »

It could be nice, but cannot be done now, without changing AS core and API. My proposal could be implemented on plugin side only.
User avatar
th.
Posts: 116
Joined: 04 Sep 2006, 23:09
Location: Germany

Re: Automation Plugin

Post by th. »

I'm having a problem with the plugin help. I can only access it if i open the automation.chm file directly, and even then the content is not displayed under Content -> Plugins, I can only find it via Index or Search.

I just wrote my first script for the feature mentioned here : http://forum.altap.cz/viewtopic.php?f=3&t=3534 (execute a remote shell on a computer listed by the network plugin). Works great, and now even with a hotkey instead of a context menu entry like with my old solution.

Thanks for the plugin, Manison!
Attachments
Remote Shell.txt
(375 Bytes) Downloaded 736 times
Petr Solin
ALTAP Staff
ALTAP Staff
Posts: 1112
Joined: 08 Dec 2005, 09:13
Location: Novy Bor, Czech Republic
Contact:

Re: Automation Plugin

Post by Petr Solin »

When automation.chm is copied to help\english directory of 2.53 beta 1 (PB 38) it works well. Unfortunatelly it cannot work with older versions (e.g. 2.52) because older helps do not contain automation.chm in its [MERGE FILES] section (required by HTML help).
manison
Plugin Developer
Plugin Developer
Posts: 216
Joined: 09 Dec 2005, 23:23
Location: Ceske Budejovice, Czech Republic
Contact:

Re: Automation Plugin

Post by manison »

th. wrote:I'm having a problem with the plugin help. I can only access it if i open the automation.chm file directly, and even then the content is not displayed under Content -> Plugins, I can only find it via Index or Search.
As Petr already mentioned, you need Preview Build 38 to integrate the Automation help smoothly with the Salamander. I can build standalone help file for you for earlier Salamander versions if interested.
th. wrote:I just wrote my first script for the feature mentioned here : http://forum.altap.cz/viewtopic.php?f=3&t=3534 (execute a remote shell on a computer listed by the network plugin). Works great, and now even with a hotkey instead of a context menu entry like with my old solution.
Excellent, thank you for sharing.
manison
Plugin Developer
Plugin Developer
Posts: 216
Joined: 09 Dec 2005, 23:23
Location: Ceske Budejovice, Czech Republic
Contact:

Re: Automation Plugin

Post by manison »

Jan Rysavy wrote:Manison, what about a new command "Automation Menu" which will display menu with all scripts the same way as User Menu does
Nice idea, putting on the to do list.
User avatar
th.
Posts: 116
Joined: 04 Sep 2006, 23:09
Location: Germany

Re: Automation Plugin

Post by th. »

Got the PB38 working now. Help is there as expected :D
Locked