Jump to content
Sign in to follow this  
thenewkid

Copying text

Recommended Posts

thenewkid

is there a way to make a script to copy text and just say it was

8:20 thenewkid: pc milk

and the scritp will copy it all and take the bit after pc and find it in a .ini and retrun the the what the guy wants to know.


some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with

Share this post


Link to post
Share on other sites
Bert

Sure can.

It is all in the helpfile. From what I understand, you want to capture text, and save that to a ini.

$val = send ("^a") ;sends a ctrl + a to copy the text you highlighted to the clipboard

iniwrite("path to ini file", "section", "key", $val)

Share this post


Link to post
Share on other sites
thenewkid

k thx but how can i make it only save the text after the pc but and not all of it


some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with

Share this post


Link to post
Share on other sites
mikehunt114

Check out all the String* functions in the helpfile.

$string = "8:20 thenewkid: pc milk"
$clip = StringInStr($string, "pc ")
$ret = StringMid($string, $clip)
$ret = StringTrimLeft($ret, 3)

Hopefully that helps you along your way.

Edit: Forgot the StringTrim.

Edited by mikehunt114

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

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  

×