there is no 2nd time, because the keyword return
either aborts the script, if used on top level of the script, or leaves a handler immediately, if used in a handler
ok, perhaps return is not the best example.
I was trying to set title1 to text carried out in the first iteration
and title2 to to text carried out in the second.
I left out all the other code because it was confusing.
I was using return just to check what I had in the results pane.
I thought it would be easier this way than typing the loop information twice.
Normally it’s not possible to change names of variables at runtime,
unless you do it with second level evaluation, that means running a literal string script,
which compiles at runtime.
But this might be more complicated than defining the variables separately
This will create the variables, can’t clam fame for this I got it off this site about a month ago
set variables to {}
repeat with i from 1 to 5
set end of variables to "var" & i & ":\"\""
end repeat
set text item delimiters to ","
set variables to "{" & (variables as string) & "}"
set variables to run script variables
If you got working code please post it.
Why don’t you use a list, and call the items of the list