ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Line to clip

(1/2) > >>

Contro:
I need a little script for :

1) I have a txt file. by example :

This is the first line
This is the second line
https://www.donationcoder.com (this is the third line)
projects and advice (4)
......

2) I would like a script to convert in clips to the clipboard every line.

3) I have a txt file or similar, by example :

*
This is the first line
www.codingsnacks.tk
*
This is the second line
Post new requests here
*
This is the third line
https://www.donationcoder.com
*
projects and advive (4)

..........................
The goal is copy to the clipboard all the chain under the *
So I would like a script to read a txt file or similar and copy the lines or phrases under * to the clipboard.


4) Note : What I try to do later with this is not now the purpose. But the aim is inmediately I have one line or phrase in the clipboard execute another script to add as a register to a database.

Best Regards

BigVent:
Hey Contro,

Not sure if you still needed this or not (since it's dated Dec 2012) so I'll kill two birds with one proverbial stone.

1.) My first post on the forums and hey to everyone!  "Hey" o/
2.) To address your needs


--- Code: Autohotkey ---;FileDelete, output.txt  ;deletes the output file -- uncomment along with FileAppend below if you so choseFileRead, Contents, %A_ScriptDir%\clip.txt  ;place your text file with *'s in this directory & change name from clip.txt to anything        if not ErrorLevel        {                set_f=0                loop, parse, Contents, `n, `r                {                        if (set_f=="1")                        {                                ;FileAppend, %A_LoopField%`n, output.txt  ;uncomment this line to create an output file                                msg_output .= A_LoopField . "`n"                                 set_f=0                        }                                                if (A_LoopField=="*")                                set_f=1                }        }clipboard := msg_output  ;sets lines after * equal  to clipboardmsgbox % clipboardexitapp
Hope this helps!

Contro:
 ;D

Welcomeeeeeee !!!!!!!!!!!

I try and comment.

Best Regards
 :-*

Contro:
Is not what i need. I see only a window.

 :-[

BigVent:
Save the quote below as "clip.txt" in the same folder as your ahk or exe.

It works here on three different OS's.  Can anyone else confirm?

*
This is the first line
www.codingsnacks.tk
*
This is the second line
Post new requests here
*
This is the third line
https://www.donationcoder.com
--- End quote ---


~BigVent

Navigation

[0] Message Index

[#] Next page

Go to full version