can't change position of a slider in system preferences.app

Asked by eytan on 2010-01-31

Hi,

I am trying to write a script to change the computer sleep time to "Never" so that when I am downloading something, it doesn't stop because the computer went to sleep.

Here's what I have (the pictures don't show up):

click( )
click( )
click( )
click( )
t = find(Computer Sleep picture).right().find(slider picture )
dragDrop(t,picture of never)

It does open the system preferences, does click on power adapter (needs three clicks for some reason), but it does not change the position of the slider.

When I run it, I get this error:

[sikuli] [Error] source lineNo: 5
[sikuli] [Error] Traceback (innermost last):
  File "/var/folders/ZT/ZTcP-8oCGa0s0LZHq2EsZU+++TI/-Tmp-/sikuli-tmp319454696850763364.py", line 5, in ?
AttributeError: 'NoneType' object has no attribute 'right'

How can I fix this?

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2010-01-31
Last reply:
2010-02-04
srijith (electronicmails1) said : #1

try dragDrop( sliderimg, Destination_img)

Can you help with this problem?

Provide an answer of your own, or ask eytan for more information if necessary.

To post a message you must log in.