Results 1 to 2 of 2

Thread: Visual Basic Clipboard, Copy, Paste, and Processes

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2019
    Posts
    12

    Visual Basic Clipboard, Copy, Paste, and Processes

    Hello,

    The short version of what I am trying to do is:
    1) Use
    Code:
    Process.Start
    to begin a process - this is working for me
    2) Copy variable to the clipboard - I can do this with the
    Code:
    My.Computer.Clipboard.SetText
    command.
    3) Past the variable when the
    Code:
    Process.Start
    program requires it - I should be able to do this by using CRTL+V but I would like to automate it if possible though I cannot modify the Process.Start program so I may be stuck with CRTL+V
    4) When the text is pasted into the Process.Start program I want to change the clipboard contents to another variable string so I can CRTL+V the new contents into the second Process.Start input prompt. - I have no idea on how to determine if the previous information has been pasted **This is my biggest challenge so far**
    5) Finally how do I do this all while NOT running the secondary
    Code:
    Process.Start
    that follows after the first one? - I am currently (without using copy/paste) using
    Code:
    .WaitForExit()
    on the process, but I don't think that will work if I am going to be copy/pasting information.

    Thank you.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,350

    Re: Visual Basic Clipboard, Copy, Paste, and Processes

    You may be able to use WaitForInputIdle, but it won't work for all processes.

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width