Automation Script Contest: 3 Free Salamander Licenses

This is a place for users to discuss Altap Salamander. Please feel free to ask, answer questions, and express your opinion. Please do not post problems, bug reports or feature requests here.
User avatar
otrov
Posts: 110
Joined: 10 Feb 2010, 04:39

Re: Automation Script Contest: 3 Free Salamander Licenses

Post by otrov »

The Salamander object is not available outside the Automation script, it's only accessible through the Salamander global variable. You cannot instantiate it using Dispatch or any other mechanism the language provides. What are you trying to do?
OK, thanks for information
I was trying to run in friendlier environment then editor, like some Python shell. I thought that Automation plugin acts as a COM server and is available outside Salamander while Salamander is active.
User avatar
otrov
Posts: 110
Joined: 10 Feb 2010, 04:39

Re: Automation Script Contest: 3 Free Salamander Licenses

Post by otrov »

VirusTotal Python automation script: view or download
Uses standard Python libraries

VirusTotal has been recently acquired by Google, so it's here to stay.

Script allows virus check of suspected file, without opening browser or uploading contents. It calculates check-sum and communicates through VirusTotal API almost as suggested "by the book". In most cases suspected file is already indexed by VirusTotal:

1. If file is clean, simple dialog is shown:
Image

2. If file is reported as positive, additional check-box allows seeing the temporary result in default app for viewing .log files (Notepad):
Image Image

3. If file has not been indexed yet, upload confirmation dialog pops:
Image

and after uploading contents over HTTPS, it reports response message and link:
Image
User avatar
tukanos
Posts: 410
Joined: 21 Dec 2005, 19:14

Re: Automation Script Contest: 3 Free Salamander Licenses

Post by tukanos »

otrov wrote: 08 Oct 2012, 05:01 VirusTotal Python automation script: view or download
Uses standard Python libraries

VirusTotal has been recently acquired by Google, so it's here to stay.

Script allows virus check of suspected file, without opening browser or uploading contents. It calculates check-sum and communicates through VirusTotal API almost as suggested "by the book". In most cases suspected file is already indexed by VirusTotal:

1. If file is clean, simple dialog is shown:
Image

2. If file is reported as positive, additional check-box allows seeing the temporary result in default app for viewing .log files (Notepad):
Image Image

3. If file has not been indexed yet, upload confirmation dialog pops:
Image

and after uploading contents over HTTPS, it reports response message and link:
Image
This could come handy? The links are already broken. Could you provide fresh ones?
therube
Posts: 681
Joined: 14 Dec 2006, 06:22

Re: Automation Script Contest: 3 Free Salamander Licenses

Post by therube »

Different but (Nirsoft's) HashMyFiles can opened a hashed file to virustotal (website).
WinXP Pro SP3 or Win7 x86 | SS 2.54
User avatar
tukanos
Posts: 410
Joined: 21 Dec 2005, 19:14

Re: Automation Script Contest: 3 Free Salamander Licenses

Post by tukanos »

therube wrote: 11 Dec 2019, 18:50 Different but (Nirsoft's) HashMyFiles can opened a hashed file to virustotal (website).
Good idea, maybe I'll create an automation plugin myself. I only hate to re-invent a wheel.
User avatar
AD7
Posts: 611
Joined: 28 Jan 2006, 16:21

Re: Automation Script Contest: 3 Free Salamander Licenses

Post by AD7 »

th. wrote: 29 Mar 2010, 12:40
2. Use a script like this:

Code: Select all

' Go to Folder.vbs
' Add More Hot Paths
' Jun 25, 2024
Const version = "1.0.0"
Set Form1 = Salamander.Forms.Form("Go to Folder v"&version&": Press marked letter")
Form1.b1 = Salamander.Forms.Button("&Opera Next", 3)
Form1.b2 = Salamander.Forms.Button("&PotPlayer", 4)
Form1.b3 = Salamander.Forms.Button("&NirSoft", 5)
Form1.b4 = Salamander.Forms.Button("&Sysinternals", 6)
Form1.b4 = Salamander.Forms.Button("&VSCode", 7)
Form1.b5 = Salamander.Forms.Button("cancel", 2)
Result = Form1.Execute
Path = ""
Select Case Result
Case 3
    Path = "H:\Apps\Opera Next"
Case 4
    Path = "H:\Apps\PotPlayer"
Case 5
    Path = "H:\Apps\NirSoft Utils"
Case 6
    Path = "H:\Apps\Sysinternals\Sysinternals Suite"
Case 7
    Path = "H:\Apps\Visual Studio + Code"
End Select
If Path <> "" Then Salamander.SourcePanel.Path = Path
Result:
ASHotPaths2.jpg
Note: The button sizes and positions cannot be controlled from the script, so there is a limitation in the number of buttons that can be displayed on the screen.
How do I create more than 5 buttons? I need about 4 rows.
When I add more, it is ignored, see below.
Thanks.

EDIT: error in my code (bt4 is there 2x).
2024-06-25.png
2024-06-25.png (2.28 KiB) Viewed 20499 times
User avatar
AD7
Posts: 611
Joined: 28 Jan 2006, 16:21

Re: Automation Script Contest: 3 Free Salamander Licenses

Post by AD7 »

Done. As easy as drinking a glass of water.

My attempt: https://pastebin.com/ncYHzELE

Result. What I was trying to achieve:
Go to Folder.vbs.png
Go to Folder.vbs.png (5.5 KiB) Viewed 20406 times
User avatar
AD7
Posts: 611
Joined: 28 Jan 2006, 16:21

Re: Automation Script Contest: 3 Free Salamander Licenses

Post by AD7 »

Another way I tried is to use a simple redirect for each destination path (program in my case).

1. I created a folder called "A recent software" in the automation/scripts folder:

Code: Select all

C:\Program Files\Altap Salamander\plugins\automation\scripts\A latest software
2. Make a copy of "(dummy) template.vbs", my humble code:
https://pastebin.com/iKpwcpzA

3. Edit 2 places: APP_NAME & basePath. Create as many copies (.VBS) as you need. But not too many, like me: :lol:
https://imgur.com/a/IrPlI9N

And how does it look? terrible indeed :oops:
https://imgur.com/a/7CNIZpt

How do I use it?
I have a deeper folder structure on the external HDD. So navigating here and there is really boring.

I use a folder structure like this:
https://imgur.com/a/Wd1g0pb

I created CPU-Z.vbs and replace APP_NAME with CPU-Z & set basePath to path: "H:\Apps\CPU-Z"

Then when I select CPU-Z via the automation plugin, I jump to the folder with the latest version, in my case "H:\Apps\CPU-Z\v2.14"

So when I later add a new version folder in the form of "v1.2.30.2 [can be some text here]", it jumps to the latest version folder. Simple as that.
Post Reply