I’ve got this AppleScript ‘Array’;
{"200.25.201.100", "80"}
Using this split function;
on theSplit(theString, theDelimiter)
-- save delimiters to restore old settings
set oldDelimiters to AppleScript's text item delimiters
-- set delimiters to delimiter to be used
set AppleScript's text item delimiters to theDelimiter
-- create the array
set theArray to every text item of theString
-- restore the old setting
set AppleScript's text item delimiters to oldDelimiters
-- return the result
return theArray
end theSplit
My question is how do I get word 1 and 2 of that ‘Array’ into variables. This is what I’ve tried;
set proxyIP to word 1 of proxy as string
set proxyPort to word 2 of proxy
But no luck. Any ideas?