Subscribe Bookmark RSS Feed

Run jsl script from vbs

geof

Community Trekker

Joined:

May 29, 2013

Hello

I woud like to run a script "run.jsl" from vbs. I tried something like:

Dim objJMP 

Dim objJSL 

Dim strfileName

strfileName = "D:\JMP\run.jsl"

Set objJMP = CreateObject("JMP.Application")
Set objJSL = objJMP.OpenDocument(strfileName)
objJMP.Visible = True
objJMP.RunCommand("run.jsl")

objJMP.Quit

But doens't work

Any idea?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Ok I found the solution.

add

//!   first line of the jsl script, so it will run automaticaly when you open the file

then the vbs below works ok

Dim objJMP 

Dim objJSL 

Dim strfileName

strfileName = "D:\JMP\run.jsl"

Set objJMP = CreateObject("JMP.Application")
Set objJSL = objJMP.OpenDocument(strfileName)
objJMP.Visible = True
objJMP.Quit

1 REPLY
Solution

Ok I found the solution.

add

//!   first line of the jsl script, so it will run automaticaly when you open the file

then the vbs below works ok

Dim objJMP 

Dim objJSL 

Dim strfileName

strfileName = "D:\JMP\run.jsl"

Set objJMP = CreateObject("JMP.Application")
Set objJSL = objJMP.OpenDocument(strfileName)
objJMP.Visible = True
objJMP.Quit