• sulcud

    Hello @Enez-Houad, you're solution is good, the clipboard is a good way to share information Pythonista => shortcuts the only two problems I saw in your scripts are first you are not setting the values to your clip board you can do it with:

    import clipboard
    import sys, webbrowser
    n1, n2 = int(sys.argv[1]), int(sys.argv[2])
    n3 = n1 + n2
    
    # I don't know what variable you want to use n1,n2 or n3?
    
    # This set the value n3 to the device clipboard
    clipboard.set('{}'.format(n3))
    
    

    Second you need a shortcut that can wrap your clipboard, the shortcuts app have a variable with that function, and with it you can use the correct url scheme

    # this will open your shortcut with as input the device clipboard
    url = "shortcuts://run-shortcut?name=[ShortcutName]&input=clipboard"
    webbrowser.open(url)
    

    shortcuts url scheme
    Pythonista clipboard

    example of the shortcut

    posted in Pythonista read more
  • sulcud

    @cvp said:

    @djl this works, tested with another app because I don't have gaiagps

    import webbrowser
    import clipboard
    
    with open(file_path,'rt',encoding='utf-8') as f:
      clipboard.set(f.read())
    webbrowser.open('shortcuts://run-shortcut?name=my_shortcut&input=clipboard')
    
    # my_shortcut only contains one command: open in one app
    

    Probably this is the simplest answer to your question
    But you are right, I download the app and I try that shortcut with that app, and the shortcut app create a txt file with the content of the original file

    posted in Pythonista read more
  • sulcud

    What is the content of that file? Latitude, longitude? I check that the url scheme can recieve
    gaiagps://map?lat=value&lng=value&z=value

    posted in Pythonista read more
  • sulcud

    do you want to copy a file to gaiagps?
    Sorry but I don’t understand your question

    posted in Pythonista read more
  • sulcud

    You can see this for more help

    Documentation

    posted in Pythonista read more
  • sulcud

    It is easy, put the extension.py and the main.py file in a folder with a file called __init__.py, them in the main.py

    import extension
    extension.your_function()
    

    I hope this work for you

    posted in Pythonista read more
  • sulcud

    @omz i solve it, i re install the app them i open it and them a install the beta

    posted in Pythonista read more
  • sulcud

    @omz I install Pythonista 3 from the backup them I install the beta, I try enabling and disabling pykeys

    posted in Pythonista read more
  • sulcud

    @omz
    iPhone XS Max Pythonista keyboard never appears.

    Hi @omz about two days I upgrade my phone 6 to the xs max. In my iPhone 6 I have the actual beta of Pythonista and the keyboard words well, it appears and it let me ran my scripts, but now in the xs max the keyboard never appears or it appears but it looks like the standard iPhone keyboard and don’t show me any of the shortcuts, I have it enabled and I also try use it with the allow full access functionality but nothing.

    The specifications

    -iPhone XS Max 256gb
    -iOS 12.1.2
    -Pythonista 3.3 (330005) beta
    -PyKeys enabled
    -Full acces enabled (I turn it on to see if them works)
    -I also restart my device two times

    posted in Pythonista read more
  • sulcud

    @mikael I try in the shortcuts app “pythonista3://“ and it works well, it open the app, do you have installed Pythonista2?, can be that a reason for the error? I only have installed pythonista3 beta. In the shortcuts apps I use some kind of url wrapper and a url opener so the complete shortcut open itself Pythonista 3

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!