I have written a PCOMM macro to search text on a screen, however I am getting the following error on the searchtext line and I cannot figure out why. :
Error on line 19. Expected ')'
Line 19 contains If ( autECLSession.autECLPSObj.SearchText "ECOC", 1, row, col ) Then
Following is the complete macro:
Dim autECLPSObj as Object
Dim autECLConnList as Object
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)
subSub1_
sub subSub1_()
Dim x
row=1
col=1
For x = 1 To 5
autECLSession.autECLPS.SendKeys "[sysreq]"
If ( autECLSession.autECLPSObj.SearchText "ECOC", 1, row, col ) Then
Exit For
End If
Next
End Sub
PCOMM Macro error on SearchText
-
- Global moderator
- Posts: 3025
- Joined: Sun Jul 04, 2010 12:13 am
- Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
- Referer: Google
- Location: Pushing up the daisies (almost)
Re: PCOMM Macro error on SearchText
Don't have PCOMM and don't have 'access' to the manual...but...all your other methods seem to have arguments within parentheses e.g. object.method(parms) but you don't have for this particular statement. If you should then you are actually missing ( and ).
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
Regards
Nic
-
- Posts: 18
- Joined: Mon Nov 03, 2008 1:38 am
- Skillset: z/OS, CICS. DB2, Linux
- Referer: Internet
Re: PCOMM Macro error on SearchText
I have tried the following combinations which all give one error or the other on the same line. The last syntax is as per the IBM manual:
If ( autECLSession.autECLPSObj.SearchText("ECOC", 1, row, col )) Then
If ( autECLSession.autECLPSObj.SearchText("ECOC")) Then
the following syntax was from the IBM manual even this gives an error:
http://www-01.ibm.com/support/knowledge ... cess08.htm
If ( autECLSession.autECLPSObj.SearchText "ECOC",1 ,1, 1) Then
If ( autECLSession.autECLPSObj.SearchText("ECOC", 1, row, col )) Then
If ( autECLSession.autECLPSObj.SearchText("ECOC")) Then
the following syntax was from the IBM manual even this gives an error:
http://www-01.ibm.com/support/knowledge ... cess08.htm
If ( autECLSession.autECLPSObj.SearchText "ECOC",1 ,1, 1) Then
-
- Global moderator
- Posts: 3025
- Joined: Sun Jul 04, 2010 12:13 am
- Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
- Referer: Google
- Location: Pushing up the daisies (almost)
Re: PCOMM Macro error on SearchText
That is not what is in the manual. The manual has
What you have may well be the same thing in effect but I do not know.
Note also that there are typos within the document but the one documented is not related to you (as far as I know).
If ( autECLPSObj.SearchText "IBM", 1, row, col) Then
What you have may well be the same thing in effect but I do not know.
Note also that there are typos within the document but the one documented is not related to you (as far as I know).
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
Regards
Nic
-
- Posts: 18
- Joined: Mon Nov 03, 2008 1:38 am
- Skillset: z/OS, CICS. DB2, Linux
- Referer: Internet
Re: PCOMM Macro error on SearchText
I finally got it to work with the following syntax, I guess the row column would also work.
The IBM manual has an example without the brackets after searchText, I guess this was an error in the manual.
Working syntax:
if (autECLPSObj.SearchText ("ECOC")) Then
Thanks NicC for pointing me to the correct syntax.
The IBM manual has an example without the brackets after searchText, I guess this was an error in the manual.
Working syntax:
if (autECLPSObj.SearchText ("ECOC")) Then
Thanks NicC for pointing me to the correct syntax.
-
- Similar Topics
- Replies
- Views
- Last post
-
-
PCOMM 64-bit Automation Macro failing to update WindowsTitle
by suriPCOMM » Tue Aug 31, 2021 5:33 am » in Simulators & Emulators - 0
- 7975
-
by suriPCOMM
View the latest post
Tue Aug 31, 2021 5:33 am
-
-
- 9
- 2168
-
by futohomok
View the latest post
Wed Jun 21, 2023 1:26 pm
-
- 4
- 1352
-
by Jeff R
View the latest post
Fri Dec 30, 2022 8:51 pm
-
-
I can't get the LINK macro working properly
by chong_zhou » Fri Aug 21, 2020 10:53 pm » in Assembler - 13
- 7168
-
by steve-myers
View the latest post
Thu Aug 27, 2020 1:06 am
-
-
-
Can I run a ".qmc" macro in my Rexx program?
by Robledo » Thu Mar 10, 2022 1:28 pm » in CLIST & REXX - 17
- 5142
-
by enrico-sorichetti
View the latest post
Wed Mar 16, 2022 4:39 am
-