INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

VBScrip to send special Keys

VBScrip to send special Keys

(OP)
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

RE: VBScrip to send special Keys

Guessing

CODE

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

RE: VBScrip to send special Keys

(OP)
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
---------------------------

RE: VBScrip to send special Keys

You could use SetText instead (the only difference is that it does not send special characters):
   autECLSession.autECLOIA.WaitForInputReady
   autECLSession.autECLPS.SetText "[" 

combo

RE: VBScrip to send special Keys

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)

RE: VBScrip to send special Keys

To send keyword delimiter as text with SendKeys, double it:
autECLSession.autECLPS.SendKeys "[["
or right
autECLSession.autECLPS.SendKeys "]]"

combo

RE: VBScrip to send special Keys

(OP)
Thank you, the option of Combo works!!!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close