Reputation: 15
Here is what I have so far.
tell application "Terminal"
activate
do script "nmap -oN scan.txt -p 3306 10.0.69.11"
end tell
What i want to be able to do is have Apple Script ask me for a IP address to run, and I type in the IP Address and it will change the command to use that IP, and runs the command.
Upvotes: 0
Views: 181
Reputation: 11238
If you are simply looking for how to use string interpolation in AppleScript... try:
set userResponse to text returned of (display dialog "Enter IP" default answer "10.0.69.11")
tell application "Terminal"
if not (exists window 1) then reopen
activate
do script "nmap -oN scan.txt -p 3306 " & userResponse & " ;" in window 1
end tell
Upvotes: 3