Jump to content

Script opening script


zera

Recommended Posts

How can I open multiple scripts using a master script?

 

Example of what i have now:

 

;Master Script

 

script

"C:/Documents/Test1.scr"

script

"C:/Documents/Test2.scr"

script

"C:/Documents/Test3.scr"

 

Thanks, any help is appreciated,

Link to comment
Share on other sites

when I last looked it was impossible. Calling a second script suspends the first one permanently.

 

There are ways round it but I can't remember what we used to do. I think the easiest was to wrap the calls into a LISP. Its a long time since I have used LISP but it was something like....

(c:defun Scripter
(command "script" "Test1.scr")
(command "script" "Test2.scr")
(command "script" "Test3.scr")
(princ)
)

 

then call scripter from the command line

Link to comment
Share on other sites

Dave,

The LISP loads successfully but just runs the last script in the line. Is there anyway to debug the lisp to run the scripts in succession?

 

(c:defun Scripter

(command "script" "Test1.scr")

(command "script" "Test2.scr")

(command "script" "Test3.scr")

(princ)

)

 

Eric

Link to comment
Share on other sites

Dave,

The LISP loads successfully but just runs the last script in the line. Is there anyway to debug the lisp to run the scripts in succession?

 

(c:defun Scripter

(command "script" "Test1.scr")

(command "script" "Test2.scr")

(command "script" "Test3.scr")

(princ)

)

 

Eric

I would suggest checking where all your scripts are located? Maybe just test3.scr is in your local directory? when I try it from the command line it asks:

Enter script file name

Documents\Drawing1.scr>:

 

**make sure they are in the right directory?

Link to comment
Share on other sites

Dave,

The LISP loads successfully but just runs the last script in the line. Is there anyway to debug the lisp to run the scripts in succession?

 

(c:defun Scripter

(command "script" "Test1.scr")

(command "script" "Test2.scr")

(command "script" "Test3.scr")

(princ)

)

 

Eric

TBH, its so long since I wrote LISP I can''t remember. I think I got it wrong above in that there should(?) be a () after Scripter in the first line.

 

And your script name can include the path you specified, UI was just being lazy.

 

Hopefully somebody with more experience will be along in a minute...

 

LEE!?

Link to comment
Share on other sites

untested...

(defun c:Scripter ()
(command "script" "Test1.scr")
(command "script" "Test2.scr")
(command "script" "Test3.scr")
(princ)
)

Link to comment
Share on other sites

(defun c:Scripter() ;is the first line that defines the new command Scripter

(command "script" "C:/Documents/Test1.scr") ; these next 3 lines call the script you need the file path

(command "script" "C:/Documents/Test2.scr")

(command "script" "C:/Documents/Test3.scr")

(princ)

)

;then call the command scripter from the command line

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...