@cvp It wasn't my Thread 😛
But you are right Phone calls and WhatsApp are different things.
Maybe there is a url scheme for whats app, or a action for Shortcuts.
But back to what i'm interested in (call shortcut and return to pythonista)
This could work:
import ui
import webbrowser
class cUIView(ui.View):
def __init__(self, *args, **kwargs):
self.width, self.height = 200, 200
self.background_color = 'silver'
self.vBtn = ui.Button(title = 'test', name = 'btntest')
self.vBtn.frame = (50, 50, 100, 100)
self.vBtn.background_color = 'white'
self.vBtn.action = self.btnAction
self.add_subview(self.vBtn)
def btnAction(self, vSender):
url = 'shortcuts://x-callback-url/run-shortcut?name=testBluetoothOff&x-success=pythonista3://'
webbrowser.open(url)
vView = cUIView()
vView.present('sheet')