I'm looking for assistance with passing a variable from AppleScript to Automator.
I am working on a small automator app. I need to type a number that will be added to the end of a PDF's name. I used "Ask for text" in automator, however, I found out that, first, the pop-up window does not stay at the centre of screen. (27" iMac.), and second, every time after I input a number, I need to use mouse to click OK, the Enter key does not work.
So I turned to AppleScript for help. And here is what I found, a window that let me input the number, then click continue, then pass the number to Automator to add to PDF's name.
- Set Value of Variable to storage
- Run AppleScript: Ignore this action's input.
on run {input, parameters} display dialog "Please enter QC Round." default answer "" with icon stop buttons {"Cancel", "Continue"} default button "Continue" --> Result: {button returned:"Continue", text returned:"MySecretPassphrase"} return input end run
- Set Value of Variable to Continue
- Get Value of Variable to Storage
- Rename Finder Items: Add Text Add:_QC_Continue(Variable) after name
But it does not work. Can anyone help me fix it?