Copy and paste text

This is a discussion on Copy and paste text within the C++ Programming forums, part of the General Programming Boards category; Hi at my work i have five terminals that I have to log into and it gets really anoying so ...

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    8

    Copy and paste text

    Hi at my work i have five terminals that I have to log into and it gets really anoying so there is a trick if I write my log id as follows in wordpad "useridlocation password" and copy it then i can just right click on the window of each program and it will paste it in there and log me in.What I was thinking is couldnt i use the system() function or something to make myself a quick little program to do this for me.I am new but if anyone could help me out it would be appreciated.I prefer the code to be in c++ this is the language of which I am most familar with.

  2. #2
    Registered User
    Join Date
    Aug 2005
    Posts
    128
    No matter what you do, you are introducing a huge security problem. 5 terminals for a few minutes or security hole? You pick.

  3. #3
    Registered User
    Join Date
    Oct 2005
    Posts
    8
    I want to be able to enter the password user id and the location into a field not just store them in the program....see what im more interested in is how i can get the information into the separated windows the other stuff i know how to do.I can for instance enter the user name and password and location and have it print a message when thats done.However i want it to paste that info into those windows instead then give the message and close
    Last edited by glue21; 10-03-2005 at 05:02 PM.

  4. #4
    myNegReal
    Join Date
    Jun 2005
    Posts
    100
    You mean like using the clipboard?
    Using Dev-C++ on Windows

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,832
    Yet another massively implementation specific question without any mention whatsoever of what OS/Compiler is involved.

    I second FoodDude's comment.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  6. #6
    Registered User
    Join Date
    Oct 2005
    Posts
    8
    Im asking for suggestions on how to do this ways you would try to accomplish it.Links tutorials on anything related to the subject.I read an artical on using the clipboard but I still dont know how I will get it to paste in each window.Basically I want to right a program that will allow me to enter my user name and password then input those values into 5 separate programs.Im not asking you to do this for me just point me in the right direction.I appreciate your conern for my works security but lets not worry about that yet.

  7. #7
    Bioport Productions
    Join Date
    Oct 2005
    Posts
    215
    There is a way to do it but it's not easy, I suggest what FoodDude said, you are introducing a HUGE security hole and I take it if you have to login 5 times it's pretty important data so don't do it. I would fire you in a second if I knew you were doing this.

    You need to know the inner workings of each window, are they different programs? Since they have already been compiled there is no way to do this easily. Disassemble them all and look for the address you need to change in memory, a process name would be helpful also. Make a program to grab the process of that window and change the addresses accordingly. Read up on game hacking or how to make trainers for games, they mess around alot in assembly.

  8. #8
    Registered User
    Join Date
    Sep 2005
    Posts
    36
    Just use autoit - www.autoitscript.com for something like this. Don't disassemble apps and stuff. You can make something like that in under 10 minutes. It can read files and simulate keystrokes (ctrl+v).

  9. #9
    Registered User
    Join Date
    Oct 2005
    Posts
    8
    oh well that was easy thanks for both of your answers

  10. #10
    Railgun God |Wiz|'s Avatar
    Join Date
    Sep 2005
    Posts
    23
    *brain freezes and explodes*
    How do you get the program running before you log in?

    But I also agree with FoodDude and durban's comments.

  11. #11
    Registered User
    Join Date
    Oct 2005
    Posts
    8
    The program has a login screen on it ...i do tech support property management systems and there are a ........ load of interfaces i have to log into at the start of my shift its a real pain having log into them all

  12. #12
    Moderately Rabid Decrypt's Avatar
    Join Date
    Feb 2005
    Location
    Milwaukee, WI, USA
    Posts
    300
    I hate to beat a dead horse here, but it's not worth it. It's only 5 interfaces. Assuming 10 characters for each ID and password, one tab, and one enter per interface, that's 110 keystrokes per day = about 27,270 keystrokes per year logging in. If you type 40 wpm (4 char/word) that's 173.25 = 2.89 hours. That's 2 hours, 53 minutes, and 24 seconds. per year spent on logging in.
    For time investment alone, to come out ahead you'd have to spend less than

    2:53:24 * how many years you'll be using it

    making and implementing the program. As if. Coupled with the security risk, I can't see how this is a good idea. My sig says it all.
    There is a difference between tedious and difficult.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Copy and Paste function in console apps.
    By Hakins90 in forum C Programming
    Replies: 5
    Last Post: 12-27-2007, 05:07 AM
  2. copy paste from another app
    By bonkey in forum Windows Programming
    Replies: 1
    Last Post: 09-08-2003, 09:03 AM
  3. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 10:37 AM
  4. Copy text from browser window, paste and save as html
    By Apache in forum Windows Programming
    Replies: 0
    Last Post: 03-04-2002, 05:57 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21