Jump to content
kawliga751

invalid command name: "General

Recommended Posts

kawliga751

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
JLogan3o13

Moved to the appropriate forum, as the Dev forum clearly states:

Quote

Do not create AutoIt-related topics here, use the AutoIt General Help and Support 

 


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
water

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


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
kawliga751

no, the word "General" is not used anywhere

Share this post


Link to post
Share on other sites
water

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 (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
kawliga751

I did not, and there is a VBA associated but I'm less familiar with VBA than my meager knowledge of AUTOIT

Share this post


Link to post
Share on other sites
water

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 (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
iamtheky

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

×