[Tutor] Pyautogui clicking on a modal pop-up dialog [solved]

Jim jf_byrnes at comcast.net
Wed Apr 8 20:38:40 EDT 2020


On 4/8/20 6:58 PM, DL Neil via Tutor wrote:
> On 9/04/20 7:28 AM, Jim wrote:
>> Is there anyway to get Pyautogui to click the button?
> 
>> If I use the following code the pop-up does not appear so I don't need 
>> Pyautogui.
>>
>> cols_to_copy = copy_cellrange()
>> # Copy the columns necessary to calculate the portfolios diversity
>> colA = S(cols_to_copy[0]).copy()
>> # ~ S('Diversification.R1').paste()
>> S().dispatch('GoToCell', ('ToPoint', 'Diversification.R1'))
>> S().dispatch('PasteSpecial', ('Format', 0))
> 
> Well done for solving your own problem!
> (I was going to suggest clearing the cell first, or Paste-Special, but 
> only off-the-top-of-my-head...)

Clearing the cells probable would have worked. I never even considered 
doing it.  Turned out for the better though. Because it made me learn 
more about how to use dispatch() with OOSheet.

> 
>> Note: My original message hasn't appeared yet so I could not reply to it.
> Yes, and we won't even blame Comcast (!). Mailman seems to have had a 
> hold-up/pause during the evening (your time).

Could be though sometimes I think my email is somehow listed as bad. I 
used to be able to post to the libreoffice group but now nothing goes 
through.

Regards,  JIm




More information about the Tutor mailing list