문자열마다 반복하기

안녕하세요. 저는 set text 값에 {“하나”,"둘’,“셋”,“넷”.“다섯”,…} 의 값들을 루프로 한번씩 사용하려고 합니다. for each문을 사용하려고 해서, ‘키워드들’이라는 array of string 값의 변수를 만들고 {“하나”,"둘’,“셋”,“넷”.“다섯”,…}을 넣었습니다. 하지만 set text에 '키워드들’이라는 변수를 넣으면 string() 값은 string으로 변환할 수 없다며 오류가 떴습니다.

루프를 돌면서 하나의 item으로 루프를 완료할 때마다, 순차적으로 item을 넘기며 set text에 설정하려면 어떡해야 할까요?

ex) "하나"라는 키워드로 루프 완료 > "둘"이러는 키워드로 루프 시작 > "셋"이라는 키워드로 루프 시작…

  • 혹시나해서 키워드들.tostring을 시도해봣지만 이상한 값만 나오고 실패했습니다 ㅠㅠ 도와주세요*

Hi @111976

variable type Array of string Assign keywords = {“one”, “two”, “three”, “four”, “five”}
For each
message box -currentitem

to retrieve the items.

Hope it helps!!

Hi @111976
Give variable type as System.String

image


It becomes like this

It says, “Variables of type System.string() cannot be converted into variables of type string.”

Hi @111976

You can only give string types in set text activity. You can’t pass the array of strings. Use for each to loop through the strings in the array and pass the string one at a time.

If you want to pass the all the strings at a time then use join function to join all the strings.

@111976

Use the for each loop to Array variable
Use set text activity in the loop and Pass the currentitem to it

Hope it helps!!

Thank you so much! Thank you to everyone else! I can see clearly from the picture!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.