kawliga751 Posted June 5, 2017 Share Posted June 5, 2017 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 More sharing options...
Moderators JLogan3o13 Posted June 5, 2017 Moderators Share Posted June 5, 2017 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 More sharing options...
water Posted June 5, 2017 Share Posted June 5, 2017 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 - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
kawliga751 Posted June 5, 2017 Author Share Posted June 5, 2017 no, the word "General" is not used anywhere Link to comment Share on other sites More sharing options...
water Posted June 5, 2017 Share Posted June 5, 2017 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 - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
kawliga751 Posted June 5, 2017 Author Share Posted June 5, 2017 I did not, and there is a VBA associated but I'm less familiar with VBA than my meager knowledge of AUTOIT Link to comment Share on other sites More sharing options...
water Posted June 5, 2017 Share Posted June 5, 2017 (edited) 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 June 5, 2017 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 - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
iamtheky Posted June 5, 2017 Share Posted June 5, 2017 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now