Need Help With Windows Shell Programming

Hi, I was wondering if it's possible to do something like output a word every x seconds of time. Also, is it possible while in a for loop and running a program with a lot of input, how would I automatically input a word when it requests for a user to type something in. Thanks.

Comments

  • [blue]Just what is "Windows shell programming"..? [/blue]

    : Hi, I was wondering if it's possible to do something like output a word every x seconds of time.

    [blue]Yes it is possible either with a timer like WM_TIMER or with multi-threading + the Sleep() function.[/blue]

    : Also, is it possible while in a for loop and running a program with a lot of input, how would I automatically input a word when it requests for a user to type something in. Thanks.

    [blue]I don't understand what you mean. Do you want to take the input from somewhere else instead of the user (for example from a file)?
    Or do you want something that types instead of the user, like somekind of macro?
    [/blue]
  • I think the macro is sort of like it. I want to know how to automate the input based on results of the console. Let say you have program a that runs and outputs 'a'. I need some sort of script that checks to see the last input, which is a, and input(simulate by feeding from any source) b if it is a, or a if it is not. Thanks for replying.


    : [blue]Just what is "Windows shell programming"..? [/blue]
    :
    : : Hi, I was wondering if it's possible to do something like output a word every x seconds of time.
    :
    : [blue]Yes it is possible either with a timer like WM_TIMER or with multi-threading + the Sleep() function.[/blue]
    :
    : : Also, is it possible while in a for loop and running a program with a lot of input, how would I automatically input a word when it requests for a user to type something in. Thanks.
    :
    : [blue]I don't understand what you mean. Do you want to take the input from somewhere else instead of the user (for example from a file)?
    : Or do you want something that types instead of the user, like somekind of macro?
    : [/blue]
    :

  • : I think the macro is sort of like it. I want to know how to automate the input based on results of the console. Let say you have program a that runs and outputs 'a'. I need some sort of script that checks to see the last input, which is a, and input(simulate by feeding from any source) b if it is a, or a if it is not. Thanks for replying.
    :


    Check out ReadConsoleOutput() in the Win32 help.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories