Jump to content

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!

Link to comment
Share on other sites

  • Moderators

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 

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

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

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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 (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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 (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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?

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...