1

I need to display a applescript dialog with text and a number by which i mean the text that it displays would be text and a varible like this display dialog "Enter spelling" and repeatnum buttons{"done"} This is the code I have`isplay dialog "How many spellings are there" buttons {"That amount"} default answer ""

set amount to text returned of result

set repeatdone to 0

repeat amount times

    repeatdone = repeatdone + 1

    display dialog "enter spelling " and repeatdone buttons {"Ok"} default answer ""

end repeat

When I try this it gives me the error cannot make enter spelling into type boolean, Is there anyway to make a applescript dialog display text and a varible

0

1 Answer 1

4

Try:

display dialog "How many spellings are there" buttons {"That amount"} default answer ""
set amount to text returned of result

set repeatdone to 0
repeat amount times
    set repeatdone to repeatdone + 1
    display dialog "enter spelling " & repeatdone buttons {"Ok"} default answer ""
end repeat
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.