Closed Thread
Results 1 to 6 of 6

Thread: Help with a simple program!!!!!

  1. #1
    ragemanster is offline Newbie
    Join Date
    Jan 2007
    Posts
    3
    Rep Power
    0

    Help with a simple program!!!!!

    Hello everybody! I am new to the community. I need your help. Everyones help. would really appreciate it if someone could send me the code of a program that will do the following:

    +Open a file in a given location.

    +Press three times tab.

    +Enter a number in a field.

    +And press enter at the end.

    Please it is of great importance to me so if you can help by all means do!
    Thank you very much all of you who are willing to try and help me!

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,486
    Blog Entries
    75
    Rep Power
    143
    To open a file, you need to create a stream. Is this for input or output?

    For the other items, I'm not sure what is supposed to happen. It sounds like you might be using Visual C++, but it is not clear whether you or the program presses tab three times, what is to happen to the number in the field, or what happens when you press enter.

    Hints for any program: First, be sure you completely understand the problem. I'm not sure you do, I certainly don't. Second, understand how to solve the problem if you were to do it by hand. Include all the information you would have to keep track of, and every step you would follow. Third, implement the solution you would do by hand in the program. Finally, test the solution. Note, you cannot do steps 2-4 until AFTER you have done step 1. Sometimes you will run into a roadblock and have to go back to step 1, if you realize that you didn't understand part of the problem.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  4. #3
    ragemanster is offline Newbie
    Join Date
    Jan 2007
    Posts
    3
    Rep Power
    0
    well I want the program to give input into a file after the program presses three times tab and then give the number as input. finaly the program will hit twice the enter key. if you could please help me I would be most gratefull...

  5. #4
    Join Date
    Jul 2006
    Posts
    16,486
    Blog Entries
    75
    Rep Power
    143
    Are you using Visual C++, Borland C++, or something else? This will affect how you perform the input. For doing this in a command line, you will not be able to use std::cin, since tabs count as whitespace. You will have to use the getline function. I'm assuming the user is supposed to be pressing these keys, not the program.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  6. #5
    ragemanster is offline Newbie
    Join Date
    Jan 2007
    Posts
    3
    Rep Power
    0
    I am using Visual C++ and I want it to be automated. I mean that the program will do all of the above that i have already mentioned. It will open the file, it will press three times tab, it will input a number in the field that the pointer will be at that specific moment and it will press twice enter.

  7. #6
    Join Date
    Jul 2006
    Posts
    16,486
    Blog Entries
    75
    Rep Power
    143
    That sounds like it's opening a file in notepad and issuing mouseclicks to notepad... somewhat more complicated.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 10-13-2011, 08:52 PM
  2. Simple GUI for C++ program
    By maxe87 in forum General Programming
    Replies: 3
    Last Post: 06-18-2011, 11:51 PM
  3. Help with simple program
    By vernacular26 in forum C# Programming
    Replies: 1
    Last Post: 11-05-2010, 05:55 AM
  4. A simple TCL/TK program
    By debtboy in forum Linux Programming and Scripting
    Replies: 2
    Last Post: 09-20-2009, 08:56 AM
  5. Really simple ads program
    By Licken in forum PHP Development
    Replies: 1
    Last Post: 09-09-2009, 02:16 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts