can't change position of a slider in system

Asked by eytan on 2010-01-31


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-/", line 5, in ?
AttributeError: 'NoneType' object has no attribute 'right'

How can I fix this?

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Last query:
Last reply:
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.