0

To split a sentence or paragraph in AutoIt:

$origional = ClipGet()
Local $string = ClipGet()
Local $arrayofsubstrings = StringSplit($string, '!')
Local $substringcount = 1
Local $outToClipPut
Do
    $outToClipPut = $arrayofsubstrings[$substringcount]
    ClipPut($outToClipPut)
    Send("{CTRLDOWN}v{CTRLUP}")
    Send(@CRLF)
    $substringcount = $substringcount + 1
    Sleep(300)
Until $substringcount = 100

I already replaced newlines and whitespaces by '!', and '!!' with '!'. I want to split the string into an array of single characters, but I have nothing to replace with '!'.

I don't have a parameter to pass into StringSplit($string, 'no parameter to pass in here'). How to output individual characters in $outToClip?

TylerH
  • 20,799
  • 66
  • 75
  • 101

1 Answers1

2

"but what if i want to split the string into an array of single characters? i have nothing to replace with '!' i don't have a parameter to pass into " StringSplit($string, 'no parameter to pass in here') " ..."

As per Documentation > Function Reference > StringSplit() :

If you use an empty string "" for the delimiters, each character will be returned as an element.

Example :

$arrayofsubstrings = StringSplit($string, '')

Related.

user4157124
  • 2,809
  • 13
  • 27
  • 42