IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Can you do a SendKeys to a FieldList field number?


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Keith Malek

New User


Joined: 06 Feb 2014
Posts: 2
Location: Canada

PostPosted: Tue Feb 11, 2014 12:09 am
Reply with quote

Hello All,

I have a question that I can’t seem to find an answer for.
I’ve been programming for IBMPersonal Communications from VBA i.e.

autECLOIAObj.WaitForInputReady
autECLPSObj.SetCursorPos 6, 19
autECLOIAObj.WaitForInputReady
autECLPSObj.SendKeys "Hello World"

My question is, is there a way of sending text to a field number i.e.

autECLPSObj.autECLFieldList.Refresh(1)
If (Not autECLPSObj.autECLFieldList.Count = 0 ) Then
If ( autECLPSObj.autECLFieldList(1).Numeric ) Then
' do whatever
Endif
Endif

So something like (autECLPSObj. SendKeys.autECLFieldList(1) "Hello World") that way it sends "Hello World" to field number 1 in the presentation space.

I’m not sure If I am explaining it well or not. Please let me know.

Thank you in advance.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Tue Feb 11, 2014 2:19 am
Reply with quote

Do you have a good definition of what is returned from teh expression "autECLFieldList(1)"?

You MAY have to find a way to extend that reference until it returns a field object, like autECLPSObj. SendKeys.(autECLPSObj.autECLFieldList(1)) or something similar.

A lot of it depends on the object definitions. Do you have alink to the PCOMM object model library?
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Tue Feb 11, 2014 2:23 am
Reply with quote

A-ha!

The fieldlist object has a SetText method...

' Build the list and set the first field with some text
autECLPSObj.autECLFieldList.Refresh(1)
autECLPSObj.autECLFieldList(1).SetText("IBM is a cool company")
Back to top
View user's profile Send private message
Keith Malek

New User


Joined: 06 Feb 2014
Posts: 2
Location: Canada

PostPosted: Tue Feb 11, 2014 2:30 am
Reply with quote

Cool. Thank you all for your help.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Tue Feb 11, 2014 2:41 am
Reply with quote

If you were dead set to use Sendkeys, like if it's the only way to send special characters or something:

Use the FieldList object to get teh Row/Col of the field you want, then use them in the presentation space calls:

Dim Row as Long
Dim Col as Long

Row = autECLPSObj.autECLFieldList(1).StartRow
Col = autECLPSObj.autECLFieldList(1).StartCol


autECLPSObj.SendKeys "IBM is a really cool company", Row, Col

OR

autECLPSObj.SetCursorPos Row, Col
autECLPSObj.SendKeys "IBM is a really cool company"


OR

autECLPSObj.SetText("Hello World", Row, Col)


However, the manual warns that SetText can NOT send those PF Keys like [enter] and [PF1], so you probably want to use that Sendkey method.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Increase the number of columns in the... IBM Tools 3
Search our Forums:

Back to Top