Code Comments
Programming Forum and web based access to our favorite programming groups.Hi APL experts, I am using APL+Win 3.6 on Windows 2000/XP. I want to run an APL function on the DOS command line (without opening the application window). On a DOS command line now I can do the following: c:\path\aplw "c:\aplwin36\tools\myWorkSpace.w3" 200M What I actually want to do is to run a function, which is defined in the wor kspace and takes one parameter. Eventually I want to run this in a script. How can I achieve this? Please help! Larry
Post Follow-up to this messageI think that 3.5 supports automation.
1. Copy this code & paste it in a text file.
set apl = createobject("APLW.WsEngine")
apl.SysCommand "load c:\Myws"
apl.Call "MyFn", 100
set apl = nothing
2. Change the workspace name, function name and argument as required.
3. Save the text file with extension VBS e.g. APL.vbs
4. Type the file name at the command prompt & press enter or double click on
the file name from within explorer.
Post Follow-up to this messageThanks AA2e72e for your reply! Yes. I did exactly the same as you described below. It worked! By the way, the APL 3.5 (or later) tech doc has more details on how to use A PL+Win as an ActiveX Server to achieve this. Thanks again!quote:
Originally posted by AA2e72e I think that 3.5 supports automation. 1. Copy this code & paste it in a text file. set apl = createobject("APLW.WsEngine") apl.SysCommand "load c:\Myws" apl.Call "MyFn", 100 set apl = nothing 2. Change the workspace name, function name and argument as required. 3. Save the text file with extension VBS e.g. APL.vbs 4. Type the file name at the command prompt & press enter or double click on the file na me from within explorer.
Post Follow-up to this messageThe code sample I gave you is using APL+Win as an ActiveX server! The Scripting Engine is the CLIENT and APL+Win is the SERVER. Unfortunately, APL+Win as an ActiveX server has different syntax depending o n whether the client is APL+Win (or another APL) or not APL. For a non apl c lient, things get a bit tenuous because of the differences in ANSI & AV but you do have the advantage that there is only one APL+Win session.
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.