having this script
Code: Select all
try
set wirelessstatus to do shell script "networksetup -getairportpower en1"
on error
display dialog "Lo script non funziona come previsto. Controlla le impostazioni network."
end try
if wirelessstatus is "Wi-Fi Power (en1): On" then
do shell script "networksetup -setairportpower en1 off"
else if wirelessstatus is "Wi-Fi Power (en1): Off" then
do shell script "networksetup -setairportpower en1 on"
else
display dialog "Lo script non funziona come previsto. Controlla che la connessione wireless sia specificata correttamente, per impostazione predefinita è EN1. Puoi ottenere questa informazione dal Menu Apple-->Resoconto di sistema-->Network-->Wi-Fi oppure da Terminale-->ifconfig -a"
end if
But what I want to do is activate it without getting the card, in practice by clicking on the icon you should run the script with nothing visible and nothing more, but I do not know how to do.
I tried to put the script in both OpenStack that preOpenStack setting up the stack as invisible but it does not activate script, perhaps because invisible setting will not charge?
Some inspiration?
Thank you.