Jump to content

COPY and PASTE data between two applications?


buymeapc
 Share

Recommended Posts

How can I automate copying certain portions of text from a file (New.txt) to an application's (EXAMPLE.exe) field that's looking for the text?

Basic Example: Copy the line in New.txt that contains the computer description, then open sysdm.cpl, click the Computer Name tab, and paste the line previously copied into the Computer Description field.

Link to comment
Share on other sites

OK, how about a harder one?:P

How do I:

1. Find a certain line in a text file

2. Cut up the line into pieces

3. Then set those pieces to variables?

quite easily. one sec, writing code...

$input = FileOpen("c:\test.txt",0)
dim $blah
while 1
    $line = FileReadLine($input)
    If @error Then ExitLoop
    if StringInStr($line,"This Line") Then
        $blah = StringSplit($line,",")
        MsgBox(0,"Found","This line found, and split into sections seperated by commas.  the values can be accecssed as $blah[1] through $blah[0]")
    EndIf
WEnd
Edited by cameronsdad
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...