Results 1 to 8 of 8

Thread: cancel or escape command in a script or menu command?!

  1. #1
    Member jcooke96119's Avatar
    Join Date
    2005-10
    Posts
    10
    Login to Give a bone
    0

    Default cancel or escape command in a script or menu command?!

    I currently have a menu that calls out to run a script, which in turn creates a new file using a template. that's all well and good. but for some reason the command craps out because it is asking you to load a file. all i need to do is have an escape/cancel command in the script so it exits the command and continue to what it needs to do!

    Should be simple, but... ?

  2. #2
    Certified AUGI Addict jaberwok's Avatar
    Join Date
    2000-12
    Location
    0,0,0 The Origin
    Posts
    8,570
    Login to Give a bone
    0

    Default Re: cancel or escape command in a script or menu command?!

    Could you elaborate?

    Seems to me if you do load a new file it will become active and the script will be left hanging but if you escape out of the command nothing will happen.
    One thing - have you set FILEDIA to 0 (off) ?

  3. #3
    Member jcooke96119's Avatar
    Join Date
    2005-10
    Posts
    10
    Login to Give a bone
    0

    Default Re: cancel or escape command in a script or menu command?!

    Ok. I'll try to elaborate.....

    The menu command runs a script. This script starts out by creating a new file using a template. When acad runs through opening the file it states that some menu will not load and subsequently asks "Enter name of menu file to load:"

    (This has something to do with our standard setup and the guy who set that all up has been unavailable. I figured asking here would be my best bet....)

    So. at this prompt, the script is unaware and starts entering in the next command.
    But, that's an unacceptable menu file and therefore ends the script.

    I need to have the script somehow cancel the "Enter name of menu file to load:" question and continue.

    Thanks for all your help.....

  4. #4
    Certified AUGI Addict jaberwok's Avatar
    Join Date
    2000-12
    Location
    0,0,0 The Origin
    Posts
    8,570
    Login to Give a bone
    0

    Default Re: cancel or escape command in a script or menu command?!

    Is it looking for a mnu/mns file? Or cui or something else?

  5. #5
    Member jcooke96119's Avatar
    Join Date
    2005-10
    Posts
    10
    Login to Give a bone
    0

    Default Re: cancel or escape command in a script or menu command?!

    Yeah, i guess it's looking for an mns file. but i don't want it to. i want it to stop looking for whatever mns file it's looking for and continue with the script!!


  6. #6
    Certified AUGI Addict cadtag's Avatar
    Join Date
    2000-12
    Location
    Cairo - no, not Illinois
    Posts
    5,069
    Login to Give a bone
    0

    Default Re: cancel or escape command in a script or menu command?!

    can you post the script file you're running?

  7. #7
    Member jcooke96119's Avatar
    Join Date
    2005-10
    Posts
    10
    Login to Give a bone
    0

    Default Re: cancel or escape command in a script or menu command?!

    i know there isn't anything wrong with my script. it's pretty simple. the problem is that corporate has some other script or something that runs automatically. i can't get an answer from the corporate guy who runs this stuff, so it's probably something i can't do anything about 'til i speak with him. Since i know i won't get an anser out of him, i thought perhaps i could create a work around. Basically, whatever script they have run when a new file is created, tries to load a menu file that it can't find and then prompts you to enter the name of a menu file. but i'm running a script. so the script continues with the next line, and enters that in at the prompt. since it's a command being entered by the script and NOT a menu file that should be loaded, it gets confused and cancels out the script...

  8. #8
    Certified AUGI Addict jaberwok's Avatar
    Join Date
    2000-12
    Location
    0,0,0 The Origin
    Posts
    8,570
    Login to Give a bone
    0

    Default Re: cancel or escape command in a script or menu command?!

    Perhaps you could create a dummy menu file that satisfies the script but actually does nothing in acad. A title and some REM lines?

Similar Threads

  1. ESC - Cancel a Command
    By inventor.wishlist1738 in forum Inventor Wish List
    Replies: 1
    Last Post: 2014-11-13, 08:01 PM
  2. Why does Escape not cancel the current command sometimes?
    By patricks in forum Revit Architecture - General
    Replies: 8
    Last Post: 2010-11-17, 02:46 AM
  3. Cancel a Command
    By Juergen Becker in forum Dot Net API
    Replies: 0
    Last Post: 2007-09-05, 09:05 AM
  4. Be able to use ESC Key To Cancel any Command
    By inventor.wishlist1738 in forum Inventor Wish List
    Replies: 0
    Last Post: 2007-07-16, 04:02 PM
  5. Can Anything Follow TEXT Command in Menu Script
    By relysoft in forum AutoCAD Customization
    Replies: 1
    Last Post: 2004-07-21, 10:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •