Forum Archive

Airplane mode

afh1012

Hi all, anybody know how to turn on airplane mode in pythonista?

cvp

@afh1012
1) create a shortcut, named AirPlaneEnable, containing only one command "enable AirPlane"
See shortcut

2) run script

import webbrowser
url = 'shortcuts://run-shortcut?name='AirPlaneEnable'
webbrowser.open(url) 
afh1012

Wow I can point to shortcuts ... that’s very nice

Thanks a lot !

Best

Ahmed

mc_py

syntax error line 2

stephen

@mc_py said:

syntax error line 2

import webbrowser
url = 'shortcuts://run-shortcut?name=AirPlaneEnable'
webbrowser.open(url)

then to add just incase... inside shortcuts

pic

cvp

@stephen oups and Thanks

stephen

@cvp said:

@stephen oups and Thanks

no problem 😎🤓