Sign in to follow this  
Followers 0
buymeapc

COPY and PASTE data between two applications?

9 posts in this topic

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.

Share this post


Link to post
Share on other sites



maybe... read the line.... then

ClipPut("computer description")

run the new program... then

Send("^v")

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Wow....I have been reading the help file for hours....I guess my mind is shot

:P

Thanks a bunch! :lmao:

Share this post


Link to post
Share on other sites

ok... buy me a pc

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

maybe... read the line.... then

ClipPut("computer description")

run the new program... then

Send("^v")

8)

this does accomplish the goal, but personally i'd suggest using controlsend() or controlsettext() to populate the data rather than a straight paste...

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Wow again...

Thanks for posting that code so quickly! It worked perfectly! :P

@Valuater: Unfortunately, I can't afford to buy you a pc...that's why my name is buy me a pc :lmao:

Edited by buymeapc

Share this post


Link to post
Share on other sites

Wow again...

Thanks for posting that code so quickly! It worked perfectly! :P

@Valuater: Unfortunately, I can't afford to buy you a pc...that's why my name is buy me a pc :lmao:

glad to help man.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
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
Sign in to follow this  
Followers 0