|
||||||
| C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
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! |
| Sponsored Links |
|
|
|
|||||
|
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.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
|
|||
|
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...
|
|
|||||
|
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.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
|
|||
|
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.
|
| Sponsored Links |
|
|
|
|||||
|
That sounds like it's opening a file in notepad and issuing mouseclicks to notepad... somewhat more complicated.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Best program for SQL database manipulation | Rhadamanthys | Database & Database Programming | 3 | 07-02-2007 02:32 PM |
| Delphi Sockets : Simple client and server program | tosh5457 | Pascal/Delphi | 0 | 05-26-2007 11:00 AM |
| Need help w/ word count program (ASAP) | siren | C and C++ | 1 | 04-23-2007 08:14 AM |
| How to modify a program written in .NET 2.0? | jackyjack | C# Programming | 7 | 03-27-2007 12:26 PM |
| Xav | ........ | 1322.18 |
| MeTh0Dz|Reb0rn | ........ | 1053.7 |
| morefood2001 | ........ | 879.43 |
| John | ........ | 877.37 |
| marwex89 | ........ | 869.98 |
| WingedPanther | ........ | 830.24 |
| Brandon W | ........ | 735.07 |
| chili5 | ........ | 309.39 |
| Steve.L | ........ | 236.23 |
| dcs | ........ | 216.02 |
Goal: 100,000 Posts
Complete: 82%