Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
pythonista UI
-
It's done.
I misunderstood the code I changed.
Thank you very much.
Thank you very much.I had tears.
You are really my God.
-
@shinya.ta 😭 --> 😂
-
@shinya.ta I suppose your setting Settings -> General -> Accessibility -> Speech -> Speak Selection and check if the ON/OFF switch is green (active) is ON
In this case, if you try to select all your text, you'll see a speak option, try it and all letters and emoji are read aloud. It is perhaps possible to use objectivec code instead of the Pythonista speech to read so.
Try Spell also, marvelous
-
I did not know that there is such a wonderful function.
I am working now, so I will try it when I go home.
Thank you for your wonderful advice.
After all, you are God.
-
-
This time, I added the following code.
I selected the emoji I read aloud and put it in the task bar.
When the Text View is blank, when you press the cursor move button, there is an error.
What's the cause?
#絵文字タスクバー
def typeChar(sender):
'''finds active textinput, and types the button's title'''
tf=sender.objc_instance.firstResponder()
tf.insertText_(sender.title)#create normal keys
buttons=[]
for button_title in '😊😜😱💦☔️':
buttons.append(ui.Button(title=button_title,action=typeChar))#create special keys
def prev(sender):
'''simulates 'tab' key, go to next field '''
s=sender.objc_instance.firstResponder()._previousKeyResponder().becomeFirstResponder()
buttons.append(ui.Button(image=ui.Image.named('iob:ios7_arrow_back_32'),action=prev))def next(sender):
'''simulates 'tab' key, go to next field '''
s=sender.objc_instance.firstResponder()._nextKeyResponder().becomeFirstResponder()
buttons.append(ui.Button(image=ui.Image.named('iob:ios7_arrow_forward_32'),action=next))'''set up toolbar'''
keyboardToolbar=ObjCClass('UIToolbar').alloc().init()
keyboardToolbar.sizeToFit()
keyboardToolbar.items = [ObjCClass('UIBarButtonItem').alloc().initWithCustomView_(b) for b in buttons]#attach our accessory to the textfield, and textview.
tv.objc_instance.setInputAccessoryView_(keyboardToolbar)v.present('sheet')
tv.selected_range = (0,0)
tv.begin_editing() -
@shinya.ta Is she able to select the text and to tap the spell button?
-
I think training is necessary, but I think it's possible.
-
@shinya.ta add "i = 0" before "for c..." in "def IndexToPos..." as here-under
def IndexToPos(type): tvo = ObjCInstance(tv) # build array index -> position in range idxtopos = [] pre_x = -1 #print(tv.text) i = 0 for c in tv.text:```
-
Thank you very much.
We were able to solve it immediately.
There is a "◀︎▶︎" in the task bar, so I don't think that's necessary.
I'm trying to remove it, but I'm not sure which one I should turn off. -
I want to increase the type of emoji in the task bar, but when I try to increase the number of emoji, the original emoji will hide and I can't display them.
-
@shinya.ta Try this
#create special keys def prev(sender): '''simulates 'tab' key, go to next field ''' s=sender.objc_instance.firstResponder()._previousKeyResponder().becomeFirstResponder() buttons.append(ui.Button(image=ui.Image.named('iob:ios7_arrow_back_32'),action=prev)) def next(sender): '''simulates 'tab' key, go to next field ''' s=sender.objc_instance.firstResponder()._nextKeyResponder().becomeFirstResponder() buttons.append(ui.Button(image=ui.Image.named('iob:ios7_arrow_forward_32'),action=next)) #create normal keys d = 32 dd = 4 w, h = ui.get_screen_size() vv = ui.View() vv.background_color = 'lightgray' h = 0 x = dd y = dd for button_title in '😊😜😱💦☔️😀😃😄😁😆😅😂🤣☺️😊😇🙂🙃😉😌😍🥰😘😗😙😚😋😛😝😜🤪🤨🧐🤓😎🤩🥳😏😒😞😔😟😕🙁☹️😣😖😫😩🥺😢😭😤😠😡🤬🤯😳🥵🥶😱😨😰😥😓🤗🤔🤭🤫🤥😶😐😑😬😦😧😮😲😴🤤😪😵🤐🥴🤢🤮🤧😷🤒🤕🤑🤠😈': b = ui.Button(title=button_title,action=typeChar) b.frame = (x,y,d,d) b.font = ('.SFUIText', d) if (y+d+dd) > h: h = y + d + dd vv.add_subview(b) x = x + d + dd if (x+d+dd) > w: x = dd y = y + d + dd vv.frame = (0,0,w,h) #attach our accessory to the textfield, and textview. tvo = tv.objc_instance tvo.setInputAccessoryView_(ObjCInstance(vv)) v.present('sheet') tv.selected_range = (0,0) tv.begin_editing()
-
-
@shinya.ta you are sure you have not removed your
def typeChar(sender): '''finds active textinput, and types the button's title''' tf=sender.objc_instance.firstResponder() tf.insertText_(sender.title)
-
It was successful.
By using this task bar, I think my wife can write a message happily.
Thank you very much.
-
@shinya.ta You could even add your "own" buttons in this taskbar...
-
@shinya.ta Thé script here-under will allow you to test the Apple standard speech module, and this code supports, I hope, all emojis. Thus, I suppose that my other scripts has a bug for combined emojis. I'll try to correct it in a close future.