Home > Community > Forums > Custom IC SKILL > Enabling interactive session in CIW.

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

 Enabling interactive session in CIW. 

Last post Mon, Mar 4 2013 9:05 AM by Andrew Beckett. 2 replies.
Started by RFStuff 01 Mar 2013 10:59 PM. Topic has 2 replies and 624 views
Page 1 of 1 (3 items)
Sort Posts:
  • Fri, Mar 1 2013 10:59 PM

    • RFStuff
    • Top 25 Contributor
    • Joined on Tue, Feb 5 2013
    • Posts 250
    • Points 4,440
    Enabling interactive session in CIW. Reply

    Dear All,

    I want to run a SKILL script interactivelyin CIW.

    LIke:-

    I load a script in CIW, then I want to see the intermediate result of the script and the script will wait for the user inpt... then accordingly I want to enter the data in CIW. The script will take it through some command like  scanf() in C.

    Is it possible to do that using SKILL

    Kind Regards,

    • Post Points: 20
  • Mon, Mar 4 2013 8:56 AM

    • theopaone
    • Top 75 Contributor
    • Joined on Tue, Feb 12 2013
    • Cedar Park, TX
    • Posts 119
    • Points 1,755
    Re: Enabling interactive session in CIW. Reply

     There are two ways to get a SKILL file to immediately execute. The first is to put the code you want to execute in a procedure declaration in the file and then execute the procedure at the end of the file. This lets you execute the procedure again without re-loading the file by typing in the procedure name and its arguments.

    procedure( myProc(....) ... )

    myProc(..)

    The second way is to have your SKILL code in a file not inside a procedure declaration. When you load the file, the code is evaluated. This is the way .cdsinit files work. However, the code is not captured in a function so must be loaded each time to evaluate it.

     To capture the user entered data from the CIW, use an enterFunction such as enterString. The enterFunctions are very powerful and can be used with preprocessing and postprocessing functions.

    Ted

    • Post Points: 20
  • Mon, Mar 4 2013 9:05 AM

    Re: Enabling interactive session in CIW. Reply

    Also, whilst you can use scanf, I really wouldn't recommend having commands that expect you to interact by typing in the CIW. It's not a terribly friendly use model, and tends to break in a multi-window environment when you then start trying to interact with another window - it can get very confusing...

    Andrew.

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by RFStuff at 01 Mar 2013 10:59 PM. Topic has 2 replies.