Thanks for Your input. And cange my script to:
tel = 0
view=ui.View(frame=(0, 0, 300, 300), background_color=None, name='view')
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?
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()
ui.Imageview('Image').height = 120
img = ui.ImageView()
img.name = 'Veer'
img.heigt = 150
button = ui.Button()
button.action = button
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:
With this scrypt:
import photos for album in photos.get_albums(): if album.title == "App_Python kopie": my_album = album break last_asset = my_album.assets[-1] last_asset.get_image().show()
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.
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 ;(
Ill try to get images from a album on my ipad to use for a background and a button image.
Get a picture with:
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.