• RMurtsoo

    Pythonista 3

    Thanks for Your input. And cange my script to:

    import ui
    tel = 0
    view=ui.View(frame=(0, 0, 300, 300), background_color=None, name='view')
    def omdat(sender):
    global tel
    if tel==0:
    view['Veer'].height = 120
    tel = 1
    elif tel == 1:
    view['Veer'].height = 50
    tel = 0

    img = ui.ImageView(frame=(0, 100, 50, 50), background_color=(.54, .7, 1.0),name = 'Veer')

    btn = ui.Button(frame=(200, 100, 50, 50), background_color=(.54, .3, 1.0),name = 'btn')
    btn.action = omdat

    view.present(style='full_screen', animated=False, hide_title_bar=False, orientations='portrait')

    Is my understanding good if u use style='full_screen' and orientations='portrait' your iPad screen stars in portrait?


    posted in Pythonista read more
  • RMurtsoo

    Hi Pythonista crew

    I try to change a Imageview height by his name.
    But "ui.Imageview('Image').height = 120" is not working
    So how would you try to change something in a ui.Button or ui.Imageview if you use the
    Ui.Button.name. = 'button'

    This my script:

    view = ui.View()

    def button():
    ui.Imageview('Image').height = 120

    img = ui.ImageView()
    img.name = 'Veer'
    img.heigt = 150

    button = ui.Button()
    button.action = button

    posted in Pythonista read more
  • RMurtsoo

    I just start with python in last Aug. Im not so good from learning from Books so i start to make a small app for a table game. Im learning python to use later for a program Dynamo from Autodesk.

    posted in Pythonista read more
  • RMurtsoo

    The script is working again i had to re_install pythonista, can i get now a refund ;) because i found a bug.

    No i love the app still.

    im not sure how i got the bug, but i think it had something to do with try to share a image in "foto's app" with Pythonista.

    Back to scripting:

    posted in Pythonista read more
  • RMurtsoo

    After fiddeling:
    With this scrypt:

    import photos
    for album in photos.get_albums():
        if album.title == "App_Python kopie":
            my_album = album
    last_asset = my_album.assets[-1]

    I get now this error: NameError: name 'photos' is not defined

    the first time it just worked, im not sure wat i changed, the setting for phytonista is sharing "camera" and "foto,s app" Olso the settings in the Privacy section in the Settings app are "green"

    The album "App_Python kopie" still there.

    Them this is mind break_ing

    I hope to hear something.



    posted in Pythonista read more
  • RMurtsoo

    Thanks, it look very easy, but now i understand im still a newbie.

    I,ll try to use the "Import Photo..." methode, but it look like my ipad can only see my "filmroll" instead of the images in the ipad "foto's app".

    Im sharing the "camera" and "foto's app" with phythonista, does other pl. have the same problem?

    I just fiddel with the the phythonista settings and now the script of photos is not running any more ;(



    posted in Pythonista read more
  • RMurtsoo

    Ill try to get images from a album on my ipad to use for a background and a button image.

    Get a picture with:
    import photos
    all_assets = photos.get_assets()
    last_asset = all_assets[-1]
    img = last_asset.get_image()

    But how do i get the img out a specific albums?
    With photos.get_albums() i get <AssetCollection "App_Python kopie" - 00000000-0000-0000-0000-000000000063/L0/040 (album)>

    In the "App_Python kopie" album are mij images. I hope something AssetCollection.asset would do the trick, but im just started with python and don,t now how to do it.

    So i hope somebody can help me and explain how the logic is behind the code.


    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!