Thanks for the reply, but this doc will be distributed widely and even mixed down to runtime apps so I don't want to ask anyone using to install any additional software.
My question is, how do I get a popup window to ask the user to enter the commands and is it possible to get a pop up window to gather both variables at once?
There is no way for users to enter values directly into variables; use global fields intead.
The Show Custom Dialog  script step allows you to present up to three input field to the user. You also get the choice to format a displayed field for password entry (i.e. showing ******* during entry).
Don't forget to clear the globals before and/or after each use.
Thanks Michael. I'll try that.
Can you tell lme how to clear the fields? I've tried "clear," "Replace Field Contents," and a couple other things but when I'm in debugger and step past those options the last value entered still remains in data viewer even when I refresh values.
Also, to be clear, I have a lot of globals so I don't want them all to go. I need the others to remain.
Thanks for your help.
Set Field [ SomeTable::gGlobalField ; "" ]
Hi, there are two usual ways to get variables into a shell command starting in Filemaker: 1) Use an FM script to call an Applescript and use "Display Dialog" to ask for the info; or 2) use an FM script to call an FM custom dialog which sets fields in FM (usually global fields), after which they are available to an Applescript. To date, I don't believe you can transfer an FM $ variable directly to Applescript.
In general, it's easier to use method 2) above. After you set the fields with the info, a subsequent Perform Applescript step should get the values by telling any layout which actually has those fields on it with the desired info in them (they can be in a tab which is not currently visible, though) like so:
-- tell application "Filemaker Pro Advanced" -- "tell app" line not needed when invoked inside FM
tell window 1
tell layout "Prefs"
-- set shell command variables
set theUser to (get data cell "gUsername" of current record) as text
set thePW to (get data cell "gPassword" of current record) as text
--clear fields on Prefs layout if needed
set data cell "gUsername" of current record to ""
set data cell "gPassword" of current record to ""
-- end tell
-- use variables above in do shell script
*Note: code not proofed