ElPandaRojo1 Posted February 17, 2022 Posted February 17, 2022 I want to know if there is a possibility of automating the AS400 through the object I have already searched but I can't find the option that worked for me, I tried the following and it doesn't work. ;Code 1 $Obj_ConnMgr = ObjCreate("PCOMM.autECLConnMgr") $OBJ_EmulSession = ObjCreate("PCOMM.autECLSession") $OBJ_EmulSession.SetConnectionByName($nSession) ;Code 2 global $oOIA = ObjCreate("PCOMM.autECLOIA") $oOIA.SetconnectionByName("A") global $oPS = ObjCreate("PCOMM.autECLPS") $oPS.SetConnectionByName("A") I tried these two options but it doesn't work, of course taking into account that the AS400 session has already been started and it is in its main window. It throws me the following error
water Posted February 18, 2022 Posted February 18, 2022 I suggest to add a COM error handler to your script. That's the way to get a more detailed error description. Please see ObjEvent in the help file. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
Nine Posted February 18, 2022 Posted February 18, 2022 (edited) Your comp may not have access to those objects. Have you tested that they are effectively objects ? Add this after each ObjCreate : if not IsObj($yourObjectGoesHere) then exit MsgBox(0,"Error","Not an object") You may need to register the appropriate dll in order to access them (google is your friend). Edited February 18, 2022 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
junkew Posted February 19, 2022 Posted February 19, 2022 google: Host Access Class Library Automation Objects as400 Example for VBA with the com objects should not be hard to translate to AutoIt https://github.com/dentemple/VBA-Class-For-AS400-Automation-Objects Your example with $objCreateEmulSession is not the same variable as you have in code 1` $OBJ_EmulSession so it could be caused by not having initialized your variable at all. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
ElPandaRojo1 Posted February 21, 2022 Author Posted February 21, 2022 I have already searched but no external file appears to be able to do this, I get the following error, it does not create the object for this: Invalid class string
Gianni Posted February 21, 2022 Posted February 21, 2022 .. is it possible to use a 3270 Emulator for connection to an IBM AS/400 ?? if so then you could try something like explained here: https://www.autoitscript.com/forum/topic/177156-trying-to-read-the-data-in-mainframe-screen-but-not-able-to/?do=findComment&comment=1271339 Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
junkew Posted February 21, 2022 Posted February 21, 2022 (edited) With the information you give we probably can not help. I want to know if there is a possibility of automating the AS400 through the object Yes its possible So dozens of questions I can ask but as me and others do not have access to your environment you should try and search yourself Do you have a working terminal emulator on the PC you are trying to run this that connects to AS/400? I think you did but maybe do not run that in parallel. Are the HACL object libraries registered/installed on your PC? Are you running from 32 bits AutoIt? you should. Did you try any of the VBA examples you can find on the internet? See the link I gave earlier and try to run that from within Excel VBA ' Must be set independently Set pConnectionManager = CreateObject("PCOMM.autECLConnMgr") Set pSessionInformation = CreateObject("PCOMM.autECLSession") ' Note: autECLSession session must be set prior to sub-classing _ any additional classes under it. pSessionInformation.SetConnectionByName (sessionName) ' Can be connected to a higher object for convenience Set pConnectionList = pConnectionManager.autECLConnList Set pOperatorInformation = pSessionInformation.autECLOIA Set pPresentationSpace = pSessionInformation.autECLPS Set pWindowMetrics = pSessionInformation.autECLWinMetrics ' Recommended by the documentation, but not required pConnectionList.Refresh should then be $pConnectionManager = ObjCreate("PCOMM.autECLConnMgr") $pSessionInformation = ObjCreate("PCOMM.autECLSession") $pSessionInformation.SetConnectionByName ("A") ' Can be connected to a higher object for convenience $pConnectionList = pConnectionManager.autECLConnList $pOperatorInformation = pSessionInformation.autECLOIA $pPresentationSpace = pSessionInformation.autECLPS $pWindowMetrics = pSessionInformation.autECLWinMetrics ' Recommended by the documentation, but not required $pConnectionList.Refresh Edited February 21, 2022 by junkew FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
water Posted February 21, 2022 Posted February 21, 2022 PCOMM stands for IBM's Personal Communications product. This needs to be installed on the computer where you try to run your script. Can you please check the installed software? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
ad777 Posted February 24, 2022 Posted February 24, 2022 @ElPandaRojo1 you dont have PCOMM installed in your system that why you got error. Download PCOMM Fromhttps://www.ibm.com/resources/mrs/assets/packageList?source=RATLe-PCOM-EVAL&lang=en_US: -Register -Login -Choose IBM Personal Communications (PCOMM) 14.0.4 for Windows Multilingual Trial eAssembly14.00.01 -Click Continue --Download IBM Personal Communications (PCOMM) 14.0.4 for Windows Multilingual Trial eAssembly -Extract mtri0504.rar -Launch Setup.exe from:\mtri0504\mtri0504\combo\Disk1\Setup.exe -Enjoy using PCOMM obj. none
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