Hi,
I have looked everywhere to see if I can find a way to get multiple variable from and pass it to a Apple script in Automator. When I do that, the inputs are combined togeter. For example:
Variable Input 1 has:
name = Backup
value = Test1
Variable Input 2 has:
name = Restore
value = Test2
If I pass these variable to an applescript and print out, I get the below result:
on run {input, parameters}
set expected to (input as text)
display dialog expected
end run
The display dialog shows:
Test1Test2
My goal is take those variable and instead of having one “input” I want to have two “input” .
If I was not clear, please do ask me so that I can explain more detail.
Thanks,
Riz
Hi Riz,
“input as text” converts a list to a string.
“input” is a list so you will need to either loop through the list or specify which item you want out of the list.
set itemOne to item 1 of input
Does that help?
Craig
Hi Craig,
I really appreciate taking you time to help me out here. I will try this out as soon as I get a chance. At least you have given me a way to think about approaching this issue.
Thank you!
Riz
Hi Craig,
That worked exactly what I wanted to know. I have asked a lot of people and searched a lot of online topics, but didn’t find the answer. I am sure there are other people like me who will be happy to see your post reply.
Thanks,
Riz
Hi Riz,
You are very welcome. Glad I could help!
Regards,
Craig