Blackstar Posted July 8, 2006 Share Posted July 8, 2006 I'm trying to figure out how to get ClipGet info to Array (not _ArrayToClip) and I dont see any documention in help file on this or is it possible? Example copy to clipboard from a text file: Biofuel is any fuel that is derived from biomass -- which contains recently living organisms or their metabolic byproducts. Biofuel is a renewable energy source, unlike other natural resources such as petroleum, coal and nuclear fuels. Agricultural products specifically grown for use as biofuels include corn and soybeans. All I want is each line from that paragraph in above becomes an element in the array so there should be 7 elements total so I can do comparison with another array. How do I do that? Blackstar Link to comment Share on other sites More sharing options...
MHz Posted July 8, 2006 Share Posted July 8, 2006 A textfile? Why not just read it with FileRead()? Link to comment Share on other sites More sharing options...
emmanuel Posted July 8, 2006 Share Posted July 8, 2006 (edited) I'm trying to figure out how to get ClipGet info to Array (not _ArrayToClip) and I dont see any documention in help file on this or is it possible?Example copy to clipboard from a text file:Biofuel is any fuel that is derived from biomass -- which contains recently living organisms or their metabolic byproducts. Biofuel is a renewable energy source, unlike other natural resources such as petroleum, coal and nuclear fuels. Agricultural products specifically grown for use as biofuels include corn and soybeans.All I want is each line from that paragraph in above becomes an element in the array so there should be 7 elements total so I can do comparison with another array. How do I do that?BlackstarI couldn't you do a stringsplit on @CR, @LF or @CRLF? Depending on what's in the clipboard...Are you here from themaxx? Edited July 8, 2006 by emmanuel "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
MHz Posted July 8, 2006 Share Posted July 8, 2006 Perhaps this may help $content = ClipGet() $array = StringSplit(StringStripCR($content), @LF) If Not @error Then For $i = 1 To $array[0] MsgBox(0, '', $array[$i]) Next EndIf Link to comment Share on other sites More sharing options...
Blackstar Posted July 8, 2006 Author Share Posted July 8, 2006 Thanks Mhz...that one worked. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now