Home > Community > Forums > PCB SKILL > Finish current command before starting new command

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Finish current command before starting new command 

Last post Wed, Jul 5 2006 4:22 AM by archive. 3 replies.
Started by archive 05 Jul 2006 04:22 AM. Topic has 3 replies and 2117 views
Page 1 of 1 (4 items)
Sort Posts:
  • Wed, Jul 5 2006 4:22 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    Finish current command before starting new command Reply

    I wrote a little skill routine. It works but when it is finished, I have to end each other commands with done before being able to call the next one ("Finish current command before starting new command")

    If I run other skill routines, when I finish it, this strange behaviour disappears.
    So, something in these other routines si needed in the new one to avoid this behaviour.

    But in my stop/cancel I have a axlCancel(Finish)EnterFun, an axlClearSelSet but nothing put Allegro back to normal.

    I saw that my stop routine set some variables to nil but if I go to skill mode in allegro and display these variables, some are not set like they should be after a stop....

    Any help would be greatly appreciated...
    Thanks. 


    Originally posted in cdnusers.org by willbi
    • Post Points: 0
  • Thu, Jul 6 2006 9:08 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Finish current command before starting new command Reply

    axlShell("done") should do the trick. It ends the active command similar like the ESC key
    or entering done in the command window.

    another way would be to enclose your skill code in this if:

    if( axlOKToProceed(t) then
    .. your code

    else
    printf( "E- finish current command first!\n")
    );end-if


    Tobias


    Originally posted in cdnusers.org by tschirmer
    • Post Points: 0
  • Thu, Jul 13 2006 3:48 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Finish current command before starting new command Reply

    thanks for this. that helps me not to crash Allegro while forgetting to finish the active command by launching my routine.
    But I still have the problem that at the end of my routine, I hhave to "done" all commands to be able to get next one.


    Originally posted in cdnusers.org by willbi
    • Post Points: 0
  • Thu, Sep 21 2006 12:59 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Finish current command before starting new command Reply

    How are you starting the command?

    If you put a procedure that calls axlShell("done") into a command register, then the command is called automatically when starting a new command.

    procedure(MYFinishCommand()
       axlShell("done")
    )

    axlCmdRegister("mycommand" 'MYCommandStart ?doneCmd 'MYFinishCommand ?cancelCmd 'MYFinishCommand)

    This also automatically makes a context menu (Right mouse click) with "Done" and "Cancel" in it.


    Originally posted in cdnusers.org by natebizu
    • Post Points: 0
Page 1 of 1 (4 items)
Sort Posts:
Started by archive at 05 Jul 2006 04:22 AM. Topic has 3 replies.