For some reason Sess0.Screen.SendKeys (sendCommand & "<Enter>") works but
Sess0.Screen.PutString sendCommand
Sess0.Screen.SendKeys ("<Enter>")
doesnt !
I have written numerous macros to get data from Attachmate to Excel which work great.
What I am struggling with is that after Attachmate is opened a simple logon script wont work unless Enter is pressed manually from the keyboard a number of times.
The username string is sent to Attachmate ok...
Ok guys the code below works, what was needed was the pause after sending the command to the router from Attachmate so the screen changed befor the code started to look for data at the specified screen positions.
As the router names have variable lengths I need to work out how to get the current...
Hi Skip, I tried your code but it gets stuck at DoEvents.
vzachin, yes an Attachmate Macro will work because the Waithostquiet statement works whereas when I use this in Excel VBA it appears to just wait for the timeout even though Attachmate has entered the command and retrieved all the data...
Hi Skip, you are right that I need to wait for the data to be returned. Unfortunately it would seem that the data needs to be returned before I can read what is on the screen at a specified location hence the waitforcursor doesn't seem to work nor does waitforstring.
I can get it to work 100%...
Hi Skip, the putstring command works fine, I don't believe I do need to specify the row an column as the cursor is always the right place for the command to be entered, the router is always waiting for a single line command. It's the copying of data from Attachmate to Excel that is my problem...
Well I enter one line or command at a time, that is what the router takes, only one line at a time, there is no moving fields or cursor.
When I Getstring as above it copies old data that is already on the screen from previous commands entered.
eg if I run my macro after logging on, the excel...
The cursor never moves from that row position, it cant be moved.
When I enter a command and then the screen fills with data the row is always 025. I can only move the cursor horizontally to a different column such as when typing a router command.
The row column indicator shows as 1(024,023)
The...
Dim Row As Integer
Dim Sessions, System As Object, Sess0 As Object
Set System = CreateObject("EXTRA.System")
Set Sessions = System.Sessions
Set Sess0 = System.ActiveSession
With Worksheets("Sheet1")
sendCommand = .Cells(2, 1)
'-----send data to...
With the help of this forum I've managed to write a short Macro that enters a router command into Attachmate from Excel and then copies the data returned back to Excel, my plan being to use this data to compile the next router command.
The problem is that the data that is copied back into Excel...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.