User inputs and simple anim.

I know this is a bit basic, but I'm having trouble getting this animation to respond to user inputs. I want the circle to start near the centre of the screen and move up until it hits Y less than 10. Here, I've started the animation thread as a response to the user input, I know this probably isn't the best way to do it.
import java.applet.Applet;
import java.awt.Graphics;
import java.awt.Color;
import java.awt.*;
import java.awt.event.*;
public class basicAnimation extends Applet implements Runnable, KeyListener
{Thread aThread;
        public int Y;
     public void start()
          if (aThread == null)
          {aThread = new Thread(this);
               aThread.start();}
     public void stop()
          if (aThread != null)
          {aThread = null;}
     public void run()
          while (true)
               for(Y=350; Y<10; Y--)
               {repaint();
                    try { Thread.sleep(100); }
                    catch (InterruptedException e) { }}
     public void init()
     {Y=350;}
     public void paint(Graphics g)
     {g.fillOval (415, Y, 10, 10);}
   public void keyPressed(KeyEvent e)
       int keyCode = e.getKeyCode();
       switch(keyCode)
       {case KeyEvent.VK_SPACE:
               aThread.start();
             break;}
   public void keyTyped(KeyEvent e){}
   public void keyReleased(KeyEvent e){}
}

Sorry, now that I have gotten a better look at your run() method. You need to replace what you have with the code that I gave you in the previous post. If you run a for loop that is inside the thread, you will change Y from being at the center to Y == 10 in one thread iteration. This is much too fast for what you want to do.
Don't forget that the thread is executing something like 1000 times every second (depending on how you set it up and the speed of your machine). So if you put a for loop inside the thread you are running the for loop about 1000 times a second when all you meant to do is run through one time.

Similar Messages

  • How to compare user input and database data?

    hi, I am new to JAVA, i hope i didnt post wrong forum :P
    I would like to know how to get user data input from web page(client side) and compare with the data in database (server side)?
    What i doiong is using the JavaScript to get the user input and compare with the JSP. but this way it seem like not a good way! Because i facing a lot of problem to get the user input!!
    Thx a lot!!
    function pasteData(obj){
              var em_num_select = obj;
         //document.write(em_num_select);
              <%
                SQLSelectNO = "SELECT em_num FROM emmast ";
                   try {
                        getEmpNo = db.execSQL(SQLSelectNO);
                   }catch(SQLException e){
                        System.err.println("Query Error!!");
                   while(getEmpNo.next()){
                        matchEmpNo = getEmpNo.getString("em_num");
                        %>if (em_num_select == '<%=matchEmpNo%>'){
                        <%
                                  String SQLgetAllInfo = "SELECT em_num, em_name, em_init, "+
                                                                                         "em_buyer_flag, em_dsgn_cde, em_proj_all, "+
                                                                                         "em_proj_cde1, em_proj_cde2, em_proj_cde3 "+
                                                                                         "FROM emmast "+
                                                                                         "WHERE em_num = '"+matchEmpNo+"' ";
                                  try{
                                       getAllInfo = db.execSQL(SQLgetAllInfo);
                                  }catch(SQLException e){
                                       System.err.println("Query Error");
                                  while(getAllInfo.next()){%>
                                       document.all.emp_name.value = '<%=getAllInfo.getString("em_num")%>'
                                       document.all.emp_init.value = '<%=getAllInfo.getString("em_name")%>'
                                       document.all.emp_disg.value = '<%=getAllInfo.getString("em_dsgn_cde")%>'
                                       document.all.emp_buyer_flg.value = "<%=getAllInfo.getString("em_buyer_flag")%>";
                                       document.all.emp_basis.value = "<%=getAllInfo.getString("em_proj_all")%>";<%System.out.println(getAllInfo.getString("em_proj_cde1"));%>
                                       document.all.emp_pro_cde1.value = "<%=getAllInfo.getString("em_proj_cde1")%>";
                                       document.all.emp_pro_cde2.value = "<%=getAllInfo.getString("em_proj_cde2")%>";
                                       document.all.emp_pro_cde3.value = "<%=getAllInfo.getString("em_proj_cde3")%>";
                             <%}%>
                             }//close if (em_num_select == '<%=matchEmpNo%>')
              <%}// close hile(getEmpNo.next())%>
         }// close function pasteData(obj)

    Hi,
    This forum is exclusively for Sun Java Studio Creator.
    You may need to post this question at:
    http://forum.java.sun.com/forum.jspa?forumID=45
    Thanks,
    Creator Team.

  • How to give user input in flsh animation??

    i m a student of engineering and my project is to create animation of dc motors whose parameters can be controlled by user input
    means current,voltage and speed of the rotor...how con i do it...
    m totally new iin this field and learning flash...
    and can i make these type of animation in flash professional CS5???

    What you should probably consider is using Slider components to control each of the parameters.  There should be examples of how to use them in the help documentation.

  • Accepting user input and executing a PL/SQL block using it

    Hi All,
    I am working on a requirement wherein I have to accept values from the user for the various arguments to be supplied to a PL/SQL block and then execute it using these values. For now, I am using the following logic:
    PROMPT Enter value for the Category
    ACCEPT cCategory CHAR PROMPT 'Category:'
    DECLARE
    cCategry CHAR(1) := '&cCategory';
    BEGIN
    DBMS_OUTPUT.PUT_LINE('The value of the Category as entered by you is' || cCategory);
    END;
    PROMPT Press y if you want to proceed with the current values, or press n if you want to re-enter the values
    ACCEPT cChoice CHAR Prompt 'Enter y or n:'
    DECLARE
    cCategry CHAR(1) := '&cCategory';
    sErrorCd VARCHAR2(256);
    sErrorDsc VARCHAR2(256);
    BEGIN
    IF '&cChoice' = 'y'
    THEN
    DBMS_OUTPUT.PUT_LINE('Starting with the process to execute the stored proc');
    --- schema1.package1.sp1(cCategry, sErrorCd, sErrorDsc);
    --- DBMS_OUTPUT.PUT_LINE('Error Code :' || sErrorCd);
    --- DBMS_OUTPUT.PUT_LINE(' Error Description :' || sErrorDsc);
    ELSIF '&cChoice' = 'n'
    THEN
    Now I want that the proc again start executing in the loop from the 1st line i.e. PROMPT Enter value for the Category. However i see that this is not possible to do that PROMPT statements and accepting user inputs execute only on the SQL prompt and not inside a PL/SQL block.
    Is there an alternate method to establish this?
    Thanks in advance.

    Hi,
    You can write a genric procedure to achive the desired output. Pass 'Y' or 'N' in the procedure.
    Call that procedure in simple pl/sql block during runtime using substituton operator.
    For ex
    create or replace procedure p1(category_in in varchar2)
    IS
    BEGIN
    if (category_in='Y')
    then
    prcdr1()
    /** Write your logic here ***/
    elsif(category_in='N') then
    prcdr2()
    /** write your logic here***/
    end if;
    exception
    /***write the exception logic ***/
    end p1;
    Begin
    p1('&cat');
    end;Regards,
    Achyut K
    Edited by: Achyut K on Aug 6, 2010 5:20 AM

  • Dealing w/ User Input and Multiple Objects

    I am trying to write a simple interface where a user inputs his/her name and id and then a Patron object is created based on their given input. I am having trouble when there are multiple patrons. My problem is referencing the different Patron objects with the different names and id's. I was wondering how I could maybe filter through the objects to retrieve the one that I want. He is some code.
    With this works for me because each object has a unique name:
    lib.addBook(book);
                        lib.addBook(book2);
                        lib.addPatron(patron);
                        lib.addPatron(patron2);
    This does not work though because each patron object being added has the same name:
    System.out.print("\nName: ");
                        name = br.readLine();
                        System.out.print("ID: ");
                        id = br.readLine();
                        pat = new Patron(name, id);
                        lib.addPatron(pat);
    If I did not explain my problem well please let me know. Thanks.

    Without any interface I can create my objects like this giving them all unique names, such as patron1, patron2, patron3, and so on.
              lib.addBook(book);
                        lib.addBook(book2);
                        lib.addPatron(patron);
                        lib.addPatron(patron2);
    With and interface I am having trouble finding a way to give each object a unique name. This is my code for adding a new patron to the Hashset.
    System.out.print("\nName: ");
                        name = br.readLine();
                        System.out.print("ID: ");
                        id = br.readLine();
                        pat = new Patron(name, id);
                        lib.addPatron(pat);
    How can I reference a specific object in the Hashset? This is my problem. Thanks.

  • How to take user input and place it in a variable

    All I want to know is how to copy user input from the message pop up and store in a local variable?
    Thanks.

    Hi
    Just take a look at thread's example
    http://forums.ni.com/t5/NI-TestStand/TestStand-Message-Popup/m-p/1792424/highlight/true#M35397
    The trick is done by Message-Popup PostExpression: Locals.strMyResponse = Step.Result.Response
    Hope this helps
    Juergen
    =s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=

  • "catching" a prompt for user input and answering it through zenity?

    I'm trying to write a script (or multiple scripts) that will allow me to use command-line only applications via user defined actions in my file manager without having to open a terminal. Now I realize this basic functionality is already available, but as it stands I am unable to respond to command-line prompts for user input without opening a terminal. Is it possible to write a shell script that would act as a wrapper and allow me to use zenity (or another popup program) to respond to such queries?
    For example if I used a command-line program that prompted me for a password, could I "catch" that prompt with a shell script and answer it through another program, such as zenity?
    Last edited by falconheart (2011-01-16 22:37:25)

    The easier way to do this is to collect the info with zenity first, then pass it on the command line.  If the program insists on prompting, then you could try feeding it the info with redirection if it accepts it from stdin.  For example
    command < info.txt
    where info.txt is a temp file created by your script which contains whatever you want entered into the prompts.  This will work in some cases.

  • URGENT!.....accepting user input and string conversion

    I have a problem with a text-based menu I am trying to create for a Shape class with rectangle, circle, etc... subclasses below it...here is a code clip
    //The menu choices given to the user.
              System.out.println("Please select which shape you would like to create:\n");
              System.out.println("(1)Rectangle");
              System.out.println("(2)Square");
              System.out.println("(3)Circle");
              System.out.println("(4)Ellipse");
              System.out.println("(5)Exit the program\n");
              System.out.print("Enter your choice (1,2,3,4 or 5): ");
         menuChoice=(char)System.in.read();
    switch(menuChoice) {
    case '1':                              
    System.out.println("\nTo create a rectangle, please enter the following dimensions below (integers only)...\n");                    
         System.out.print("Center X co-ordinate = ");
              while((x=(char)System.in.read()) !='\n')
              CentXBuf.append(x);     
         System.out.print("Center Y co-ordinate = ");
              while((y=(char)System.in.read()) !='\n')
              CentYBuf.append(y);
    The above works fine, however, when the the user inputs the menu choice, it does not let me input the center x co-ordinate and goes on to the second input of the center y co-ordinate then the program crashes with a NumberFormatException
    I tried to replace
         menuChoice=(char)System.in.read();
    with
         while((z=(char)System.in.read()) !='\n'){
              zBuff.append(z);
         String v = new String(zBuff);
         int menuChoice = Integer.valueOf(v).intValue();
    but the above itself gives me a NumberFormatException also!
    What do I do?!?!

    Try this:
    BufferedReader reader = new BufferedReader(
    new InputStreamReader(System.in)
    String input = reader.readLine();

  • Get user input and find file and read it.....argh

    Ok, so I have to write a program that asks a user for the name of the file they want opened and then it is to read it and then display the max score and the minimum score on the file. also to display the average score on the file. Along with that it is supposed to display how many As, Bs, Cs, Ds, and Fs were on the file IE: a: 1 b: 3 c: 0 d: 4 f: 1. etc.
    Also, the next part is to have the program open the input file and then write all the information to an output file. I was able to do this and have the output file show the peoples names and their score along wtih their grade adn then the whole score average at the end of the output file....
    My question is how do I do the first part by asking the user for the name of file and then for the program to find the file and then display the max, min, average and how many letter grades the class got?

    this is what i have so far and the code before didnt work with JCreator, came up with lots of errors......
    What do i have to do to get the max value and min value to display along with the amount of As, Bs, Cs, Ds, and Fs????
    import java.io.*;
    class extest
    public static void main(String [] args) throws IOException
    // First, open the input file
    TextReader filein = new TextReader(new FileInputStream("test.txt"));
    // Read our number
    int x;
    x = filein.readInt();
    String [] first=new String[x];
    String [] last=new String[x];
    int [] score=new int[x];
    // load data from the input file test1.txt
    for (int i=0; i<x; i++)
    first=filein.readWord();
    last[i]=filein.readWord();
    score[i]=filein.readInt();
         WriteTestFile(first, last, score, x);
    public static void WriteTestFile(String f[], String last[], int score[], int x)
    double average=0;
    // Next, open the output file
    try
    PrintWriter fileout = new PrintWriter(
    new FileWriter("grade.txt") );
    // OK, now write to the file
    fileout.println(x);
    for (int i=0; i<x; i++)
    average=average+score[i];
    if (score[i]>90)
    fileout.println(f[i]+" "+last[i]+" " + score[i] +": "+"A");
    else if (score[i]>80)
    fileout.println(f[i]+" "+last[i]+ " " + score[i] + ": "+"B");
    else if (score[i]>70)
    fileout.println(f[i]+" "+last[i]+ " " +score[i] + ": "+"C");
    else if (score[i]>60)
    fileout.println(f[i]+" "+last[i]+ " " +score[i] + ": "+"D");
    else
    fileout.println(f[i]+" "+last[i]+" " +score[i] + ": "+"F");
    fileout.println("The average score of the class is "+average/x);
    // we're done with the output file
    fileout.close();
    catch (IOException e)
    throw new RuntimeException(e.toString());
    System.out.println("***** Welcome to the Grade Program! *****");
         System.out.println("");
         System.out.println("Please enter the name of the file you want to open: ");
         TextReader input = new TextReader(System.in);
         String fileName = input.readLine();
    System.out.println("The average of the scores is: "+average/x);
    System.out.println("The maximum score is: ");
    System.out.println("The minimum score is: ");
    System.out.println("Number of scores by letter grade:");
    System.out.println("A: ");
    System.out.println("B: ");
    System.out.println("C: ");
    System.out.println("D: ");
    System.out.println("F: ");

  • Accepting user input and then running grant statements

    Hi I have a script which creates a database, at the end of this script I need to change user, and then run a number of grants. I need to accept the name of the schema to make the grants to from the user. The code I have been trying to use is below
    --Prompt for portal password and connect as portal
    connect portal
    --Issue grants for portal apis
    PROMPT 'Enter the schema name'
    ACCEPT schema
    @provsyns.sql &schema
    PROMPT 'Enter the schema name'
    ACCEPT schema
    grant select on WWSEC_PERSON to &&schema;
    PAUSE
    grant select on WWSEC_GROUP$ to &&schema;
    PAUSE
    grant execute on wwctx_api_private to &&schema;
    grant execute on pkg_oid to &&schema;
    grant execute on pkg_error_handling to &&schema;
    UNDEFINE schema
    When I run the code I get and ORA-00987: missing or invalid username(s)
    Can anyone help me please?
    Many thanks,
    Danny

    Hi,
    You can write a genric procedure to achive the desired output. Pass 'Y' or 'N' in the procedure.
    Call that procedure in simple pl/sql block during runtime using substituton operator.
    For ex
    create or replace procedure p1(category_in in varchar2)
    IS
    BEGIN
    if (category_in='Y')
    then
    prcdr1()
    /** Write your logic here ***/
    elsif(category_in='N') then
    prcdr2()
    /** write your logic here***/
    end if;
    exception
    /***write the exception logic ***/
    end p1;
    Begin
    p1('&cat');
    end;Regards,
    Achyut K
    Edited by: Achyut K on Aug 6, 2010 5:20 AM

  • SQL LOGIC - How to accept USER input and use that data in SQL Logic?

    Hello Experts
    Can anyone of you please explain in detail how to acheive the above task am a begginner, it would be great help for me.
    Thanks in Advance.

    Hi,
    You mean to say, you need to use inputs from Data manager Prompts in your Script Logic.
    From Help File
    You can use the EvDTSModifyPkg task to dynamically pass a text string to logic in Data Manager.  For example, a user who wishes to dynamically pass a text string representing a year (which is a portion of the *XDIM_MEMBERSET instruction) could use the following steps:
    Using the EvDTSModifyPkg task, prompt for the year, i.e., PROMPT(TEXT,%TEXT%,"select a year")
    Pass the returned %TEXT% to the FormulaScript of the RunLogic task as follows: TASK(RUNLOGIC,FORMULASCRIPT,"*FUNCTION MYYEAR=%TEXT%u201D)
    In the Data Manager logic, use the dynamically created function as follows: *XDIM_MEMBERSET TIME=MYYEAR.INPUT.
    The logic name in the RunLogic task must be specified with the .LGF extension to enforce its validation at run time.
    BPC NW 2.0 Version Works differently.
    Hope this Helps,
    Kranthi

  • Bash script user input and revision technique requested

    In a bash script, I have a need to present the contents of a variable to the user, so that he can "revise" the value if needed, or just hit enter if no revision is required. The objective is to reduce keyboard effort to just revising a presented value.
    The "hit enter to continue" part is easy.
    The "revise" part is the problem for me.
    To illustrate using an example:
    #! /bin/bash
    position_var=30.39
    echo -n "Revise Position if required:${position_var}"
    #then some kind of read position_var ??
    How can I make the position_var available to the user to edit and resubmit?
    Thanks
    steve.
    Last edited by stevepa (2012-02-28 17:31:56)

    The above solution is good okay for a general shell script, bash has a feature for what you want though. (see below)
    If however the content of the variable is bigger (multiple lines, or a really LONG line you don't want to have to retype), you have 2 options:
    Write it to a temp file and fire up $EDITOR (if that's not set, you can default to nano or vi, whichever you can find with $(which ...)).
    The other idea that comes to mind is using 'expect' to present a prefilled prompt the user can edit... I'll have to test this...
    EDIT: Can't think of an easy way to do that with expect... mhh...
    EDIT2: Specifically for bash:
    read -p "Revise Position if required: " -i "$current" -e new
    with the -e flag, $current will be what the line is prefilled with, and $new will contain the result.
    Last edited by Blµb (2012-02-28 18:14:55)

  • Capturing and displaying user input in Crystal Reports

    Hi all,
    Iu2019m creating a crystal report with SAP as data-source and want to capture user input and display it on the report.  I have defined parameters to capture the input and added them to the report header.   I have then created formula fields to capture user input using the JOIN statement to accommodate multiple values.   Everything works well when users enter values for all the parameters, but when they leave some blank I get an error message u201CParameter value is nullu201D.
    Has anyone encountered this type of problem;  Anyone knows how to resolve this?

    Hi
    In parameter window make the Optional prompt to True.  And change make change in your record selection formula like this :
    (not HasValue({?PrjMgr@SELECT Firstname,lastname FROM OHEM}) OR
    ISNULL({?PrjMgr@SELECT Firstname,lastname FROM OHEM}) OR
    ({?PrjMgr@SELECT Firstname,lastname FROM OHEM} = '') OR
    {OHEM.firstName} = {?PrjMgr@SELECT Firstname,lastname FROM OHEM})
    Regards

  • How to capture user input for customer exit processing?

    I need to calculate the number of working days elapsed in the current fiscal quarter BASED on the USER INPUT on the reporting front.  i.e., say the fiscal quarter started on 1 July 2005 and if the user enters 10 July 2005, I should get the value 8 (Assume that Monday through Friday are all workdays).  If the user enters 12 July 2005, I should get 10.  I have written customer exits and know how to use factory calendar, but <b>THE CHALLENGE</b> is how do I <b>CAPTURE</b> the user input and use it in my exit?  During the varible definition, if I select the check box "Ready for input" then the customer exit is not being processed and unless I check that box I can't get a user entry!  If I look at the import values in the customer exit, I see i_t_var_range with type rrs0_t_var_range.  My strong feeling is that this parameter gets the user input, but I am unable to use it as the customer exit is not being called if I make the user to input the data.  Based on the empirical evidence, I felt that user input and customer exit can not co-exist!!  Please somebody prove me wrong and let me know how can I use the user input to process my "customer-exit" variable.  I would really appreciate any input from the BW community here.

    Hi Sameer,
    Most likely, I'm missing something, but I think that the answer is very simple.
    CASE I_VNAM.
    WHEN 'YOUR_CUSTOMER_EXIT_VAR'.
    IF I_STEP = 2. “ After selecting of input variable
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'USER_INPUT_VAR'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(4).
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDLOOP.
    ENDIF.
    ENDCASE.
    In this typical user exit coding you have a user entered value in LOC_VAR_RANGE (originally in I_T_VAR_RANGE) and you construct your user exit variable value in E_T_RANGE.
    Best regards,
    Eugene
    Message was edited by: Eugene Khusainov

  • How to generate the User-Input XML Body for executing workflows via REST APIs: The Solution

    I see that executing a workflow via REST APIs requires lot of work to be done just to prepare the right User-input XML body. Any mistake and you have some major debugging to do. Larger the number of User-Inputs, the bigger is the problem.Life is so much easier at the WFA GUI with Display names and tooltip help for User Inputs which are very easy for reading and providing the right values. I don't have any such privileges when manually preparing the User-Input XML body.It’s been asked numerous times how to provide User-Input values for type table, or Query (Multi-Select) etc. These are complex User-Input types and has lots of scope for user mistakes.I can have User-input dependency at WFA GUI which allows me to make the right selection, but while preparing my XML body I need to take care of it myself.An operator is allowed to execute workflows, but the same Display names which help him make the right user-inputs, makes it impossible for him to prepare the user-input body xml. Display names can't be used in in XML body and he can't know the exact parameter names by looking at the Display names. So he need to always contact the Admins/Architects for this. And Architects/Admins can't be expected to keep providing User-Input XML body to operators every operator. How about if I could enter all the User-Input values in my workflow execution at WFA GUI, I can do a preview which passed to my satisfaction and then I can magically get the XML body for it which I can use to execute my workflow from REST APIs from any client. It could be so very much easy for me than building my User-Input XML body manually. This is exactly what I'm going to give you right now. You open the WFA in browser, Go to your workflow, Start execution, you input values from GUI reading carefully the display names, preview it to your satisfaction and then get the XML body. Assume your workflow is called “Workflow to Print a given Message”. It’s a simple workflow with only 1 user-input Displayed as "Message to Print" Prerequisites:  The following are the one-time prerequisites. You need PowerShell 3.0 on your WFA server.Import the attached Generate_Workflow_User_Input_Body_in_XML.dar in your WFA. It’s our magical command called "Generate Workflow User Input Body in XML"Add credentials of a WFA Admin/Architect in you WFA itself with Name/IP: localhostMatch: ExactType: OtherName/IP: localhostUsername: <WFA Admin/Architect Username>Password: <User Password>   Steps: Suppose you have a workflow called "Workflow to Print a given Message". You want to execute it from REST apis and need to prepare the user input XML body.  Select this workflow and clone it. The workflow clone is the exact copy of your original workflow word by word, input-by-input. It will open in Edit mode with name "Workflow to Print a given Message - copy".Add the command "Generate Workflow User Input Body in XML" at the beginning of your workflow. This is a must. This command need to be the first command in your cloned workflow.This command requires no input. So for its Parameters just press okay and save the workflow.You are done.Now Execute the clone workflow. You'll see all the user-inputs available to you. Make your choices as you wish. Preview it to confirm that planning is passed and u have no errors.Execute it now.You'll see that the our magical command "Generate Workflow User Input Body in XML" has failed in our clone workflow execution. Don't worry, its fate was decided to be so. But it didn't fail before giving me what I really wanted. i.e. my XML body for my real workflow. It displayed it in the GUI as well as saved it in your WFA server @ C:\temp\<workflow_name_dd_MM_yyyy_hh_mm_ss_.xmlIt also deleted all the reservations of this particular failed job. So NO major residue left to be cleaned.To summarize: Clone Your workflow and Add the command "Generate Workflow User Input Body in XML" as your first command.    Start Execution, provide your User-inputs and preview it. Be satisfied and Press Okay.   Now Execute it.  After a few scconds this cloned workflow will fail with Error "All done. The Workflow will fail now."     See the command execution logs for this command. You'll see the User-Input XML body. It has also saved the XML file at C:\temp in your WFA server.   Have fun. sinhaa  

    Providing a new version 1.1.0 of the command "WFA Schedular" Changes made: Added conditional String Representation based on the Scheduling parameter provided. Provided check for the right number of parameters passed into the command.Added a new parameter "Expiry Date" to automatically stop the recurring execution upon expiry.Check for Posh3.0 version in code.Have Fun!! sinhaa Below example for:Schedule a workflow for recurring execution every alternate day i.e. once in 2 days at 10:30 PM starting 06-Jul-2015 (Today's date is 02-Jul-2015) . The recurring workflow execution  should expire on 31-Dec-2015 and stop.  

Maybe you are looking for