This code does not make sense, I would just like to get information based on it.
set MyData to "MyData1|MyData2"
on MyScript(MyData)
set MyVar1 to "MyData1"
set MyVar2 to "MyData2"
return MyVar1 & "|" & MyVar2
end MyScript
The text is passed in the code: "MyData1|MyData2". I need to divide it into two parts by the "|" symbol. And write each part into two variables: myVar1 and myVar2. How to do it?
P.S. The problem is that only one parameter can be passed to on...end. I need to pass two. I'll pass one, then split it into two.