Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2186
  • Last Modified:

How can I place a edit-coppy append into a AS400 VBScript

This part of the code works..  I'm putting into clipboard a value from the screen.  I also need to do a copy append of the entire screen.  If I place another autECLMacro "[edit-copy]" it replaces the entire clipboard.

Thanks for the help
[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
 
   dim curcol,currow,maxcol,cval,startcol
   curcol = 6
   currow = autECLSession.autECLPS.CursorPosRow
   maxcol = autECLSession.autECLPS.NumCols
   startcol = autECLSession.autECLPS.CursorPosCol
 
do
   if (startcol = 6) then
     exit do
   elseif (startcol < 6) then
       autECLSession.autECLPS.SendKeys "[right]"
       startcol = startcol + 1
   elseif (startcol > 6) then
       autECLSession.autECLPS.SendKeys "[left]"
       startcol = startcol - 1
   end if
loop
 
do
   if (curcol > maxcol) then
     exit do
   end if
 
   cval = autECLSession.autECLPS.GetText(currow, curcol, 1)
   if (cval = "-") then
     exit do
   end if
   autECLMacro "[Mark Right]"
   curcol = curcol + 1
   loop
   autECLMacro "[edit-copy]"
 
end sub

Open in new window

0
DougAZ
Asked:
DougAZ
  • 2
1 Solution
 
Gary PattersonVP Technology / Senior Consultant Commented:
That's what [edit-copy] does, it replaces the clipboard contents with the current selection.

If you want to append to the clipboard without replacing it, (copy append), then you'd use [edit-copyappend].

You can see all of these in the client access Keyboard editor (Edit-Preferences-Keyboard-Customize).  Pick an unused key and map the function you want to it to see the ECLMacro name.

- Gary Patterson
0
 
DougAZAuthor Commented:
Thank you..  I did try that.. must of mis-typed it..  Thanks for the additional info very helpful.
0
 
Gary PattersonVP Technology / Senior Consultant Commented:
First time I tried it I think I tried [edit-copy-append] instead of [edit-copyappend].

Happy to help.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now