Getting Finished Macro Code Into JDE 7.3 World Vision?

herring_fish

Member
In a nut shell, I need to get properly formatted macro code into JDE.

I was asked to write a program to send data from an Excel spread sheet to JDE World A7.3 World Vision. We are running it locally on Microsoft PC CAD work stations that are connected to intranet servers.

I don't know anything about JDE but know a little about Excel VB so I started there. I have completed a program that scans the cells in the rows of a purchase order spread sheet. The user sorts the entry sheet by vendor and clicks on a button. The program then writes a text file that mimics the JDE macro code. The code mimics filling out one page in JDE for every part number that goes to a particular vender, to complete the purchase order. Then the user would re-sort to the next vendor and repeat the process.

Appending the macro file externally:
I can't edit the macro file outside of JDE. Using note pad, I tried copy and pasting code into the macro file, that is on the C drive but when I do, JDE will not display the macro upon re-entering the program. I tried simply opening the file, back spacing and then re-entering the deleted character but that must corrupt the file as well. Inside JDE's macro editor, I can do all of the editing that I want and it works great but I can't do it externally. I don’t know if explicitly writing to the file form Excel will be any better than uning Notpad. I don't want the user to have to leave the program for every PO form that they want populated anyway. JDE reads the external macro file only on start-up.

Manually copying and pasting code:
I don't want the user to have to copy and paste the code into the macro editor because it is time consuming and there are too many chances for error.

Using Key Stroke Recording Software:
I haven't used that yet so a friend is trying to automate the copying and pasting but he can't get the focus to move into the Edit Macro window. I am also concerned that the program might get lost with different loaded program combinations and configurations.

Is there a better way of doing this?

This is a loose example of the macro code.
<font class="small">Code:</font><hr /><pre>
HostScreenSendKey( "Right Tab" )
HostCursorPut(13,32)
HostScreenPutString( "48231607")
HostCursorPut(13,32)
HostCursorPut(14,14)
HostScreenPutString( "48231607")
HostCursorPut(14,14)
HostCursorPut(14,60)
HostScreenPutString( "176.1")
HostCursorPut(14,60)
HostCursorPut(15,14)
HostScreenPutString( "SLIDE ROD RETAINER, REV. A")
HostCursorPut(15,14)
HostCursorPut(15,60)
HostScreenPutString( "2")
HostCursorPut(15,60)
HostCursorPut(17,60)
HostScreenPutString( "030212")
HostCursorPut(17,60)
HostCursorPut(22,43)
HostScreenPutString( "P")
HostCursorPut(22,43)
HostScreenSendKey( "Page Down" )
</pre><hr />
 
Back
Top