Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Autoincrement variable in a loop

Tags:

applescript

I need to autoincrement a variable in a loop for Automator. I have no idea to do it... I'm very new in AppleScript, have been looking around and googling but didn't find much info.

Any ideas ?

like image 649
Fischer Avatar asked Sep 02 '25 02:09

Fischer


1 Answers

You can use something like this:

set myVar to 10

repeat with i from 1 to 5
    set newVar to myVar + i
    display dialog (newVar)
end repeat

Did this help?

like image 166
oa- Avatar answered Sep 07 '25 02:09

oa-