AppleScript to add URL to Pi-hole whitelisting
Use the
display dialog
command’s optionaldefault answer
parameter to collect text
https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/PromptforText.html#//apple_ref/doc/uid/TP40016239-CH80-SW1
set input to display dialog "Enter URL" default answer "" with icon note buttons {"Cancel", "Continue"} default button "Continue"
do script "pihole -w " & (text returned of input) in window 1