Jump to content
kawliga751

invalid command name: "General

Recommended Posts

Let me start by saying that I am VERY new to Auotit but, I am trying to build a simple script to run some reports that are now done manually. I have the script built but 8 times out 10 I get an error "invalid command name: "General". The program does run sometimes but will not the majority of the time. When I run the command manually from the shortcut it always works but I can not login with Autoit or even cmd line without getting this pop up error.

 

Below is the login portion of the script.


$Login = 'xxxxxxx'
$Password = 'xxxxxxxx'
 

ShellExecute("C:\Program Files (x86)\Ericom Software\PowerTerm Enterprise\Sessions\mir00p10.PTS")
AutoItSetOption('MouseCoordMode', 0)
WinWait('(A) Soutwest P10 : PowerTerm Pro Enterprise Suite')
WinActivate('(A) Soutwest P10 : PowerTerm Pro Enterprise Suite')
Sleep(5000)
Send($Login)
Send('{Enter}')
Send($Password)
Send('{Enter}')

------------------------------------------------------------------------------------------------------------

Any help would be appreciated!

Share this post


Link to post
Share on other sites

Just a wild guess. "General" is the user name to login?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-03-02 - Version 1.3.5.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (2019-01-22 - Version 0.1.0.0) - Download - General Help & Support
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites

The ericson site states, that the product supports VBA (http://www.ericom.com/powerterm/pro-enterprise). Did you give VBA a try?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-03-02 - Version 1.3.5.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (2019-01-22 - Version 0.1.0.0) - Download - General Help & Support
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites

Visual Basic and Visual Basic for Applications (VBA) are very similar to AutoIt. I suspect, that the documentation of the product will contain a few examples how to use VBA.
So it might be easier to start with VBA.

On the other hand I would insert a Sleep after you entered the userid so the program can process the input:

$Login = 'xxxxxxx'
$Password = 'xxxxxxxx'

ShellExecute("C:\Program Files (x86)\Ericom Software\PowerTerm Enterprise\Sessions\mir00p10.PTS")
AutoItSetOption('MouseCoordMode', 0)
WinWait('(A) Soutwest P10 : PowerTerm Pro Enterprise Suite')
WinActivate('(A) Soutwest P10 : PowerTerm Pro Enterprise Suite')
Sleep(5000)
Send($Login)
Send('{Enter}')
Sleep(5000) ; <== Inserted
Send($Password)
Send('{Enter}')

Edit:
Details about the VBA feature: http://www.ericom.com/feature_pro.asp

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-03-02 - Version 1.3.5.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (2019-01-22 - Version 0.1.0.0) - Download - General Help & Support
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites

I am also curious as to the contents of the PTS file? Are you making changes to the General tab, maybe the parsing of that file is causing the issue?


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...