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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IBM PCOMM : Need autECL systax for font/screen size change 1

Status
Not open for further replies.

Nath_rg

Programmer
Feb 22, 2018
3
0
0
SG
Hi All,

I am using IBM Pcomm application .I can able to change font/screen size settings by using application menu option Edit --> Preferences --> Appearance --> Font in restore mode. Here I am selecting Fixed Size and using Courier : 15 x 25 pixels and then the screen size will be change. Then after i have maximizing my screen ( In Maximize window this option is not enable in application menu). This is i am doing while open the application every time. I would like to automate this activity using Pcomm Macros using VBA script by using Host access class libraries or if any. Can you please help me to identify the correct class or syntax for this.

Thanks,
Nath.
 
could be file based config or registry perhaps? regmon, filemon, procmon etc.
would recommend asking the vendor, IBM on how to accomplish this

I Hear, I Forget
I See, I Remember
I Do, I Understand

Ronald McDonald
 
>using VBA script

VBA and VBScript are two different things. Which are you really interested in? Here's a VBA solution (not really the focus of this forum, though)

Direct from IBM

Code:
[blue]Dim PgSet as Object
Dim ConnList as Object
 
Set PgSet = CreateObject("PCOMM.autECLPageSettings")
Set ConnList = CreateObject("PCOMM.autECLConnList")
[green]' Initialize the connection[/green]
ConnList.Refresh
PgSet.SetConnectionByHandle(ConnList(1).Handle)
PgSet.FaceName = "Courier New" 'set the FaceName
PgSet. FontSize = 14 'set the FontSize[/blue]

Pretty certain pcomm has a macro recorder as well, so you could also try that to record the relevant code.
 
Hello Strongm,

Thanks for code snippet !!

Actually i am looking for VB Script coding. sorry for asking about VBA. I have modified slightly your code and try to execute this. But i have got an error like "Invalid for the connection type of the host session.." at "PgSet. FontSize = 14". Code is below

Process of running this macro.

1. Open the IBM PCOMM application in Restore mode.
2. Then exected the below script code.

Code:
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)

REM This line calls the macro subroutine
subFnt1

sub subFnt1()
Dim PgSet 
Dim ConnList 
 
Set PgSet = CreateObject("PCOMM.autECLPageSettings")
Set ConnList = CreateObject("PCOMM.autECLConnList")
' Initialize the connection
ConnList.Refresh
PgSet.SetConnectionByHandle(ConnList(1).Handle)
PgSet.FaceName = "Courier New" 'set the FaceName
[highlight #FCE94F]PgSet. FontSize = 14 'set the FontSize[/highlight] 
end sub


I have tried by recording the macro for this activity, But the code is not recorded for Menu level actions to this IBM PCOMM application.



Thanks,
Nath
 
Hi Strongm,

I have removed the space and executed again. But showing the same error.

Actually your code is working for FILE --> page setup and then choosing font. This is for outline font.

But i want the code for Edit --> Preferences --> Appearance --> Font. This is for to change the TSO screen size.

Thanks,
Nath
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top