Print Page | Close Window

script file

Printed From: CAD Forum
Category: EN
Forum Name: AutoCAD
Forum Description: Discussion about AutoCAD and AutoCAD LT, viewers, DWG and DWF formats, Design Review, AutoCAD 360, add-ons
URL: https://www.cadforum.cz/forum_en/forum_posts.asp?TID=5385
Printed Date: 31.May.2026 at 22:20


Topic: script file
Posted By: RJBPIII
Subject: script file
Date Posted: 28.Feb.2011 at 16:51
How can I run a script file from a macro. I have made a working .scr file, but have not figured out how to get a macro to run it. I tried the ^c^c "c:\file location information\filename.scr" and it tried to run each line seperate, If I just use the popup and click to open it, it will run the commands fine Would appreciate your assistance.

-------------
RJB Phillips III
richard.phillips@lucite.com
rphillips@Logicalsysinc.com



Replies:
Posted By: John Connor
Date Posted: 28.Feb.2011 at 16:56
I would think you could use your script file as a substitute for the macro.

-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: RJBPIII
Date Posted: 28.Feb.2011 at 17:10
I have a tool bar and was going to use one of the Icons to run the .scr file could you explain how to do that direct?

-------------
RJB Phillips III
richard.phillips@lucite.com
rphillips@Logicalsysinc.com


Posted By: John Connor
Date Posted: 28.Feb.2011 at 17:16

Run the macro from the toolbar icon.  Why do you need a script?  Seems redundant.



-------------
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>



Posted By: RJBPIII
Date Posted: 03.Mar.2011 at 20:33
I never could get the macro to work, but I did get the script file do do what I wanted. In using MicroStation, I have an Icon which will do the same as Zoom Extnets, Save both the file and the file settings and then close the file. I got a .scr file to do this, but could never figure out how to get the macro to preform these functions. I had the advantage in the Microstation VBA to record what I did and then go back and rename the recorded functions macro to something I wanted and then tie the recorded vba via run VBA "macroname" I am now assigned Autocad11 drawings to be done and I wanted to have some of the features I lost?
I was an electrician for over 40years and now I am a drafter, doing both types of drawings, only trying to learn short cuts. Thanks Richard
I will attach the .scr file if need to see

e
;
SAVE
;
close
;
That is what  I have, is it possible to put comments in .scr files?


-------------
RJB Phillips III
richard.phillips@lucite.com
rphillips@Logicalsysinc.com


Posted By: CarlB
Date Posted: 03.Mar.2011 at 21:04

A macro to run a script should look more like:

 
^c^c_script;"c:\file location information\filename.scr";
 
or, without quotes
 
^c^c_script;c:\file location information\filename.scr;
 
and yes you can have comments in script file; start the line with a semicolon


Posted By: RJBPIII
Date Posted: 11.Mar.2011 at 21:25
Thank you so much for the reply, I have saved the information to try out.Smile

-------------
RJB Phillips III
richard.phillips@lucite.com
rphillips@Logicalsysinc.com


Posted By: RJBPIII
Date Posted: 16.Mar.2011 at 18:56
When you show the ^C is that using the symbol above the 6 key and just a capitol C ? I did not get to work this week and have a chance to try it out, I do apprecate any assistane. Did 2002 allow .scr files? That is what I am running at hope. I never used any .scr until the company gave me 2011 to work with. I had been just doing Microstation up till then.

-------------
RJB Phillips III
richard.phillips@lucite.com
rphillips@Logicalsysinc.com



Print Page | Close Window