Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A couple of Newbie questions...

Status
Not open for further replies.

Cyph3rM0nk

Programmer
Mar 19, 2004
5
US
Hello all,

I did a search for all of these topics, but I could not find anything on them, so I apologize if I missed something.

Anyhow, I have a couple of questions. I am an intermediate level programmer in both VB(A) & C++, and I just recently written my first macro in VBA for Excel to send and receive data from an Attachmate Extra! Personal Client session (thanks to everyone on this list for some VERY helpful posts).

Anyhow, my 1st question is this. How do I clear a field of data from the terminal window without manually having to send a bunch of blank spaces? I tried Sendkeys(<clear>), but that didn't do what I wanted. I also tried SendKeys(<END>), but that didn't work either.

Second, I looked all through the Attachmate help file, but I couldn't find any sort of comprehensive list of Methods, Properties and Objects for all exposed Attachmate Extra! objects and collections. Does anyone here know of a list online where all of these Objects, Methods and Properties can be looked up with explanations on what they do and how they work?

Thanks a bunch!

Cyph3r_M0nk
 
Update!

Sorry, wouldn't you know, but 2 minutes after I posted this question, I found the Index of Extra! Objects in the Extra! help file... lol

However, my first question still stands (unless of course, I figure that out in another 2 minutes as well... =)

Thanks!

Cyph3r_M0nk
 
Glad you're on your way.

Your looking for Sess0.Screen.sendKeys("<EraseEOF>")

If you lookup the sendkeys in help, you should have a cross reference to a list of keys that can be sent. Most are guessable.

Also, you may want to use this loop to wait for screen changes. It's very helpful.

Do While sess0.Screen.OIA.Xstatus <> 0
DoEvents
Loop

This will wait for the "X Clock" to disappear before returning control to the program flow.

calculus
 
Hey, thanks for the info... That helps alot...

Just curious though... do you think there is a noticeable time difference between using the SendKeys("<EraseEOF>")/X Clock method and using SendString?

With the 1st one, I have to wait on the system, but with the second one I don't, right?

Thanks again!

Cyph3r_M0nk
 
If you have 'SendString' then your are on a version prior to 6.5. In version 6.5+ the method is PutString.

I'm not clear on your question. There is no way to use SendString (or Putstring) to clear a field. You can send the field the right number of spaces, but that doesn't accomplish the same thing. You'll have a string of spaces verses an empty field.

I just gave you the 'X Clock' method to help you along as you said you hadn't yet found all the useful functions in Extra.

calculus
 
Hi Calculus,

I'm sorry... my mistake... I meant PutString, not SendString...

Basically, since i'm still new to this, I wanted your opinion on what you think is better the methodology..

Basically, I'm pulling part numbers from an Excel file and looking them up via the terminal window, and then assigning the data from a couple of fields back into Excel.

Since I need to clear the screen before I can do another search, I have been using PutString to fill each field with spaces to effectively 'clear' it, before I PutString the next set of numbers.

My question, however, is about which you think is the 'better' way of doing it. Using MoveTo, then SendKeys("<EraseEOF>"), and then DoWhile XStatus <> 0, or just using PutString [n-spaces], rowIndex, colIndex.

The first has three steps, plus a pause, the 2nd is only one step without a pause, right? So is there a reason why I should use one instead of the other?

Sorry if I'm not explaining it very well...

Thanks!

Cyph3r_M0nk
 
The 2 methods are actually the same. The "pause" you're referring to with the XClock wait will be the same for both methods.

The only difference is that when sending spaces, you'll have spaces. When sending <EraseEOF> you'll have nothing in the field. This is a minor difference that your mainframe may not even notice. Some (mine for instance) consider spaces and nothing different and will give different results when <Enter> is pressed.

If your program is working with spaces then it's fine to leave that way. If the results are not what you want, then try the <EraseEOF> method.

calculus
 
Hi Cyph3rM0nk.

In your first post you looked for

--- quote ---
Second, I looked all through the Attachmate help file, but I couldn't find any sort of comprehensive list of Methods, Properties and Objects for all exposed Attachmate Extra! objects and collections. Does anyone here know of a list online where all of these Objects, Methods and Properties can be looked up with explanations on what they do and how they work?
--- end quote ---

And in your second post you found an answer.

Where did you find the file?

Regards
Erling
 
Well well.

Looking at all of the .hlp files, I also found the file.

EPC_OLE.HLP located at;

<CD-ROM>:\E!E\program files\Attachmate\E!E2K\ENU

on the first CD "Enterprise Emulation" version 7.11

/Erling
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top