AppleScript to add URL to Pi-hole whitelisting
Use the display dialog command’s optional default 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 &quot;Enter URL&quot; default answer &quot;&quot; with icon note buttons {&quot;Cancel&quot;, &quot;Continue&quot;} default button &quot;Continue&quot;
do script &quot;pihole -w &quot; &amp; (text returned of input) in window 1