saving a script

Discussion in 'AutoCAD' started by satfj, Nov 9, 2004.

  1. satfj

    satfj Guest

    I wrote a script in Microsoft notepad, How should I save it as a SCR so AutoCAD can recognize the saved script when I run a script? The way I saved it is with the file extension .SCR but I'm not able to open it in AutoCAD script command.
    Thanks
     
    satfj, Nov 9, 2004
    #1
  2. satfj

    Rakesh Rao Guest

    What does you SCR file contain? A script syntax must be exactly the same
    syntax (even upto the last blank or space character, if required) as
    that of AutoCAD command otherwise it will not run.

    The extension is correct.

    Regards
    Rakesh

    --
    --
    - Rakesh Rao [ rakesh.rao (at)4d-technologies.com ]
    - Four Dimension Technologies
    [www.4d-technologies.com]
    - Get GeoTools, Work smarter: www.4d-technologies.com/geotools
    - Free Lisp downloads @ TechCenter: www.4d-technologies.com/techcenter
     
    Rakesh Rao, Nov 9, 2004
    #2
  3. satfj

    satfj Guest

    This is a script that opens and closes files....

    <open
    C:\Data Files\Atlantis\Autocad\Blocks\bararea
    close
    open
    C:\Data Files\Atlantis\Autocad\Blocks\box01
    close>

    But what is the right way to save the notepad file as? The SCR is not an option when saving as in notepad.

    Thanks
     
    satfj, Nov 9, 2004
    #3
  4. satfj

    spencer1971 Guest

    In the filename box add the ".scr" extension when saving

    Spence
     
    spencer1971, Nov 9, 2004
    #4
  5. Check the extension of the file (make sure extensions are displayed).
    In notepad, if the "Save as type" is set to (*.txt), and you enter
    "MyFile.scr" in the "File Name" the file will be saved as "MyFile.scr.txt"

    AutoCAD can recognize the saved script when I run a script? The way I saved
    it is with the file extension .SCR but I'm not able to open it in AutoCAD
    script command.
     
    Alan Henderson @ A'cad Solutions, Nov 9, 2004
    #5
  6. satfj

    Jason Wilder Guest

    try changing your directory path from Data Files to DataFiles - no space.
    Or enclose the path in quotes

    "C:\Data Files\Atlantis.... "

    the script if interpreting the space as a control point

    If you create it with notepad, however you do it, the file needs file.SCR
    extension.

    option when saving as in notepad.
     
    Jason Wilder, Nov 9, 2004
    #6
  7. satfj

    Dommy2Hotty Guest

    "Save as type" should actually be set to "All Files"
     
    Dommy2Hotty, Nov 9, 2004
    #7
  8. Well I feel like I'm beating a dead horse but if you enclose the name with
    extension in double quotes in the edit box the file will be saved without
    the txt extension regardless of the "Save as type"
     
    Patrick Hughes, Nov 10, 2004
    #8
  9. satfj

    satfj Guest

    I saved the notepad file with the extension SCR...When I go to windows explorer and right click on the file the properties file type is telling me its a Screen Saver.
     
    satfj, Nov 10, 2004
    #9
  10. Quite true, but it's amazing how many people don't know that feature and I
    was just check to make sure satfi knew.
     
    Alan Henderson @ A'cad Solutions, Nov 10, 2004
    #10
  11. I have the opposite "problem" (if it really is one). Installing AutoCAD
    (2004 ADT on an XP Pro system) has somehow designated the .SCR filetype as
    an AutoCAD Script, and even screen saver files are "labeled" that way in
    Windows Explorer. That means I can't double-click on a screen saver
    filename and preview it, because since it considers it an AutoCAD Script,
    the computer opens it up in Notepad, which of course shows a bunch of
    gobbledegook. I've tried to change the program associated with .SCR, but
    for some reason it doesn't appear on that list.

    BUT, screen savers still DO work under normal means, and they show up in the
    list in Display, for setting which one you want to use. (I guess if any
    AutoCAD Scripts were in those locations where Windows looks for screen
    savers, they'd probably show up on the list, too, and I wonder what would
    happen if you picked one for your screen saver....)

    Anyway, what Windows Explorer "calls" it shouldn't matter. If it's got the
    right filetype extension (without any additional .txt or something as
    discussed above), and if AutoCAD knows where to find it, and if it's written
    correctly, it should run.
     
    Kent Cooper, AIA, Nov 10, 2004
    #11
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.