Firstly, kudos to the great AutoIT community. You have saved my butt at work numerous times by allowing me, a simple mind, to automate tasks that would be tedious and time consuming. Nod's specifically to valik and Smoke who have answered problems others have asked that pertain to problems I had numerous times. I am very grateful for you all.
I swear I utilized search before posting this so if it has already been posted, by all means direct me accordingly.
Now my problem.
I can't think of a simple way to take clipboard contents and direct them into an array without using filereadtoarray which defeats the purpose of what I am trying to do. What I aim to accomplish is copying text out of notepad (multi-line) and put it into an array.
Here is the code I have thus far:
#include <Array.au3>
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
WinWait("Untitled - Notepad","")
If Not WinActive("Untitled - Notepad","") Then WinActivate("Untitled - Notepad","")
WinWaitActive("Untitled - Notepad","")
Send("{CTRLDOWN}a{CTRLUP}")
Send("{CTRLDOWN}c{CTRLUP}")
$txt = ClipGet()
StringSplit( $txt, @CRLF, 1)
;MsgBox(0,"test", $txt, 0)
Local $ClipTxtArray[5]
_ArrayAdd( $ClipTxtArray, StringSplit( $txt, @CRLF, 1))
_ArrayDisplay($ClipTxtArray)
I would like to set the array size based on the number of @CRLF stringsplit processed instead of my finite number 5.
What do I need to do to achieve this task? IF you don't want to give me the direct code could you please tell me what I need to do my homework on to arrive at a solution?
Thank you all kindly.