Jump to content

ObjGet throwing error


Rhidlor
 Share

Recommended Posts

So I'm trying to do some as400 automation and hit a wall when trying to get a COM object. The code on line 8 is failing, the as400.ws file opens with PCSWS.exe so I tried using that as the file path too but that didn't work either. Any and all help is greatly appreciated! 

 

$file = "C:\Users\Rhidlor\Desktop\as400.ws"

If Not FileExists($file) Then
   MsgBox(0, "Error", "Error finding file")
   Exit
EndIf

$object = ObjGet($file)

If @error Then
   MsgBox(0, "Error", "Error getting object")
   Exit
EndIf

$object.SendKeys("05")

 

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

×
×
  • Create New...