Typeerror: 'str' Object Is Not Callable With Win32com Interfacing With Attachmate
I'm using Python to try to automate Attachmate - EXTRA!, similar to how most do in VBA. I'm using the package pywin32 found here. I'm using the documentation of how OLE works with
Solution 1:
I use these functions to read and write on an Attachmate EXTRA! Screen
Try the following:
import win32com.client
defwrite(screen,row,col,text):
screen.row = row
screen.col = col
screen.SendKeys(text)
defread(screen,row,col,length,page=None):
if page isNone:
return screen.Area(row, col, row, col+length).value
else:
return screen.Area(row, col, row, col+length, page).value
deftest():
system = win32com.client.Dispatch("EXTRA.System")
sess0 = system.ActiveSession
screen = sess0.Screen
product = read(screen, 1, 1, 2)
print(product)
write(screen, 1, 79, "90")
Documentation:
Screen.Area(StartRow,StartCol,EndRow,EndCol[,Page][,Type])
Post a Comment for "Typeerror: 'str' Object Is Not Callable With Win32com Interfacing With Attachmate"