Home > Community > Forums > PCB SKILL > create a script in skill then replay the script - not working

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: *

 create a script in skill then replay the script - not working 

Last post Tue, Aug 16 2011 7:28 AM by Kadar. 7 replies.
Started by Pieman 05 Mar 2010 04:35 AM. Topic has 7 replies and 5577 views
Page 1 of 1 (8 items)
Sort Posts:
  • Fri, Mar 5 2010 4:35 AM

    • Pieman
    • Top 500 Contributor
    • Joined on Thu, Feb 19 2009
    • Salt Lake City, UT
    • Posts 27
    • Points 405
    create a script in skill then replay the script - not working Reply

    I am creating a script in skill then trying to replay that script.

    My debug tells me that it "Can't find window; form.film_control" or some other thing.

     The script is created just fine, but the skill program will not find windows to fillin the forms.

     Yet, if I manually replay the script from the Allegro command line it runs just fine.

     Has anyone tried to do this and had success?

    Thanks for any help.

    Marvin.

    Here is my code:

                   (setq    PORT (outfile "INCHES_PARAM.scr" "w"))
                    (fprintf PORT "# Allegro script\n")
                    (fprintf PORT "scriptmode +invisible\n")
                    (fprintf PORT "scriptmode +continue\n")
                    (fprintf PORT "scriptmode +noerror\n")
                    (fprintf PORT "scriptmode +noinfo\n")
                    (fprintf PORT "scriptmode +beep\n")

                (fprintf PORT "setwindow pcb\n")
                (fprintf PORT "etchedit\n")
                 (fprintf PORT "artwork\n")
                (fprintf PORT "film param \n")
                (fprintf PORT "setwindow form.film_control\n")
                (fprintf PORT "FORM film_control General_Parameters\n")
                (fprintf PORT "FORM film_control gerber_rs274x YES\n")
                (fprintf PORT "FORM film_control units_english YES\n")
                (fprintf PORT "FORM film_control error_abort_all YES\n")
                (fprintf PORT "FORM film_control error_abort_film YES\n")
                (fprintf PORT "FORM film_control format_int_places 2\n")
                (fprintf PORT "FORM film_control format_dec_places 5\n")
                (fprintf PORT "FORM film_control suppress_lead_zeroes NO\n")
                (fprintf PORT "FORM film_control suppress_lead_zeroes YES\n")
                (fprintf PORT "FORM film_control suppress_equals NO\n")
                (fprintf PORT "FORM film_control suppress_equals YES\n")
                (fprintf PORT "FORM film_control film_max_x 40\n")
                (fprintf PORT "FORM film_control film_max_y 60\n")
                (fprintf PORT "FORM film_control ok\n")
                (fprintf PORT "setwindow pcb\n")
                (fprintf PORT "etchedit\n")
                (close PORT)
                 (axlShell "replay INCHES_PARAM.scr")
     

    Filed under:
    • Post Points: 20
  • Fri, Mar 5 2010 5:00 AM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 715
    • Points 15,510
    Re: create a script in skill then replay the script - not working Reply

    Load the command as "general", not the default "interactive"

     i.e. axlCmdRegister("run" 'piemansFunction ?cmdType "general")

    Dave Elder, Tait Communications
    • Post Points: 50
  • Fri, Mar 5 2010 5:01 PM

    • fxffxf
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • ., AK
    • Posts 291
    • Points 4,640
    Re: create a script in skill then replay the script - not working Reply

    1) remove the  (fprintf PORT "etchedit\n") lines. These are not required and may create problems.

    2) either delete the "artwork" or "film param" script statement. Both invoke the artwork dialog.

    3) all of the scriptmode items can be combined into a single line

          scriptmode +invisible +continue ...

    4) If you use the Skill outfile API you may wish to open the file with a leading "./"

          (setq    PORT (outfile "./INCHES_PARAM.scr" "w"))

       This will eliminate the possibility of a user that is missing a leading "."in getSkillPath. Altermatively use axlDMOpenFile

    • Post Points: 20
  • Fri, Mar 5 2010 10:16 PM

    • Pieman
    • Top 500 Contributor
    • Joined on Thu, Feb 19 2009
    • Salt Lake City, UT
    • Posts 27
    • Points 405
    RE: create a script in skill then replay the script - not working Reply
    Thanks for the feedback.

    Unfortunately, I am still having the “Can’t find window” problem.

    Marvin.
    • Post Points: 20
  • Fri, Mar 5 2010 10:38 PM

    • fxffxf
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • ., AK
    • Posts 291
    • Points 4,640
    Re: RE: create a script in skill then replay the script - not working Reply

     Don't see that happening in my world.

    I assume you are doing this from the allegro command line

       skill load "<skill file>

    • Post Points: 20
  • Fri, Mar 5 2010 10:44 PM

    • Pieman
    • Top 500 Contributor
    • Joined on Thu, Feb 19 2009
    • Salt Lake City, UT
    • Posts 27
    • Points 405
    RE: RE: create a script in skill then replay the script - not working Reply
    That is correct.
    • Post Points: 5
  • Wed, May 11 2011 3:49 AM

    • BingSun
    • Not Ranked
    • Joined on Thu, Apr 14 2011
    • ShangHai, Shanghai
    • Posts 4
    • Points 50
    Re: create a script in skill then replay the script - not working Reply

     It is worked following the suggestion of eDave

    thanks eDave

    Filed under:
    • Post Points: 5
  • Tue, Aug 16 2011 7:28 AM

    • Kadar
    • Top 500 Contributor
    • Joined on Mon, Jun 6 2011
    • Haifa, Israel
    • Posts 26
    • Points 370
    Re: create a script in skill then replay the script - not working Reply

    Thank YOU Dave,

    I thought that the default definition of function is  " general",

    Now my script runing well from in Skill function.

    • Post Points: 5
Page 1 of 1 (8 items)
Sort Posts:
Started by Pieman at 05 Mar 2010 04:35 AM. Topic has 7 replies.