-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introducing SPSL the SuperPuTTY Scripting Language #558
Comments
…nched, or restored from auto layout * Better handling when a new session process is unable to start due to command line arguments or other reasons causing process to not start. should fix unhandled exception in Issue #528
One thing to note from commit 0b35374 When executing scripts during the start of a session, if for example you are using the OPENSESSION script command to open the same session it WILL create an endless loop, first time I did it with a test script it made me laugh when I realized what I did. I am not sure if I should add logic to prevent such things from happening since the application is actually doing exactly what it was told to do. |
Just wanted to leave a note that this feature set as it currently stands is very very useful for my job. Aside from the SENDKEY {SPACE} not working well, this would make programming our equipment via serial connection very quick. I can rig a script based off of our Frequencies and other parameters for technicians out in the field. If the Spacebar (for the two option selection) would work this would be a great replacement (as everyone uses Putty) I was able to do a spacebar by using SENDLINE " " |
More or less exactly what I need, but currently it's executing script the moment I open a session. Workaround for me is to start script with SLEEP, but as how long login takes varies between sites this is not very reliable. Would it be possible to add an option to wait until login complete or some kind of expect behavior? |
while be intersting to add readline with read windows box for reading the line. with that they are not oblige to store password in spsl script... |
How to use it with any session by default? |
great idea. |
It would be awesome if there were a quicker way of executing a script. I'd like to be able to set a config option as to the directory where all my scripts are and they can be loaded on opening of SuperPutty into a toolbar or something so all I have to do is click a button to execute the script instead of having to load it each time by finding the file. |
+1 to @DaLouuu's comment about spsl not sending the CR with SENDLINE or explicitly with SENDKEY {ENTER} - not sure if this is an incompatibility with MinTTY or something else, because the full text of the SENDLINE command is sent and sits there waiting on the terminal input for me to hit the Enter key. |
Thanks for this, I've been able to use this to save a couple keystrokes while creating a local user on Cisco devices. #!/bin/spsl If anyone can suggest a way for me to verify if the username was successfully added based on the output of the show command that would be appreciated. Ideally I would like to save config then exit the session if successful or leave the session open if unsuccessful. That part is easy enough with SPSL but the verification part is where i'm stumped. |
Hi:
This just seems like a lot of steps to run a script. My Suggestion would be to have a visible scrolling list , kind of like that "Sesstions" list . But instead of sessions it would be a scrolling list of all the scripts in a specified directory. Thanks |
I'll see what I can come up with!
… |
I use this often and the scripts are amazing. Question on this and I feel its asking too much, but better to be asked then not asked. Would there be any possible way to get an expect type behavior where if X is not the next line response it kills the script? |
how do I send a SHIFT+Insert combo? I tried SENDKEY +{INS} but not working. |
The ability to add multiple scripts that run consecutively would be nice. Alternatively, if you could invoke a script from inside another script, that would work. Often times, I'm logging onto a server to access one of a few specific applications, It would be nice to be able to have one login script, and then a set of scripts for logging into those applications. That way, if my password changes, I only have to change the login script. |
Hey, I really need the <%Var(Session.HostName)%> feature to work. It would make automating my database backups possible. Will this ever be activated? |
¿How can i use "OPENSESSION"? it's like: |
Its OPENSESSION <session name> (from your sessions list)
Regards,
Jim
From: VictorGarcia9 ***@***.***>
Sent: Friday, June 23, 2023 3:19 PM
To: jimradford/superputty ***@***.***>
Cc: Jim Radford ***@***.***>; Author ***@***.***>
Subject: Re: [jimradford/superputty] Introducing SPSL the SuperPuTTY Scripting Language (#558)
¿How can i use "OPENSESSION"? it's like:
OPENSESSION 0.0.0.0
¿or maybe it's OPENSESSESION EXAMPLE?
—
Reply to this email directly, view it on GitHub <#558 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AB4ZXW5GTIQA6GAAELILAZ3XMYI4TANCNFSM4BSBMNIQ> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/AB4ZXW2MMNFYXDGEJIFJ6GLXMYI4TA5CNFSM4BSBMNI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOL6VSG4A.gif> Message ID: ***@***.*** ***@***.***> >
|
I've worked up a working prototype of a very basic scripting language for use in the script sender from the toolbar to aid in automation tasks.
I use the term "language" loosely since what it actually currently does is modify the behavior of the commands being sent. It is still very infant in its design and concept and I want more feedback to know what kinds of things users would like to see.
Execution Behavior
Lines are read from a text based script and executed in order they appear. The script runs in a single thread to prevent the application from becoming unresponsive when sleep or commands that would block the main application thread are encountered. It runs until its done. There are no loops or comparative operators currently implemented. When the last line is ran the script execution finishes.
Commands
These are predefined functions with arguments that can be passed. For example SENDCHAR t when encountered would send the single character t to selected sessions.
Replaceable Variables
Variables when wrapped in a specific format can be replaced at run time to dynamically change the information being sent to a terminal. For example <%Var(Session.Name)%> would be replaced with the name of the session the data is being sent to. For example SENDLINE echo <%Var(Session.Name)%> might send the command "echo router1.core-fe0-1.foo.com" to the terminal and be specific to the session where the command is being sent.
Running a script when a session is launched
It only makes sense to be able to associate a script file with a session and automatically run the script when the session is launched.
See the Wiki for the language reference and examples
Please note everything could change before this functionality is included in a release and supported as such and appropriately documented. I want the language to be robust and not conflicting with existing functionality and workflows. Consider this an Alpha developer feature.
The text was updated successfully, but these errors were encountered: