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

VBScrip to send special Keys

Status
Not open for further replies.

Robert0333

Technical User
Sep 27, 2017
3
US
I am making a macro for AS400 but when trying to send "[" I can not send the character. Showme the following error:
---------------------------
Error in the script on line 15. ECL37170: Invalid parameters. Unmatched keyword delimiters.. Would you like to edit the script?
---------------------------
Yes No
---------------------------

There is the code:


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

REM This line calls the macro subroutine
subSub1_

sub subSub1_()
autECLSession.autECLOIA.WaitForAppAvailable

autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "["

end sub
 
Guessing
Code:
[s]autECLSession.autECLPS.SendKeys "["[/s]
autECLSession.autECLOIA.SendKeys "["
 
Thank you,, but it doesn't work just give the next error:

---------------------------

---------------------------
Error in the script on line 15. Object doesn't support this property or method: 'autECLSession.autECLOIA.SendKeys'. Would you like to edit the script?
---------------------------
Yes No
---------------------------
 
You could use SetText instead (the only difference is that it does not send special characters):
[pre] autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SetText "["[/pre]


combo
 
autECLPS.SendKeys is right. However I rather suspect that PCOMMS use of "[keyword]" for a number of it functions probably means that seeing a single square bracket confuses it. Try sending it in curly brackets:

autECLSession.autECLPS.SendKeys "{[}"

(or see combo's response below)
 
To send keyword delimiter as text with SendKeys, double it:
[tt]autECLSession.autECLPS.SendKeys "[["[/tt]
or right
[tt]autECLSession.autECLPS.SendKeys "]]"[/tt]

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top