← Back to team overview

sikuli-driver team mailing list archive

[Question #233161]: Click in a function

 

New question #233161 on Sikuli:
https://answers.launchpad.net/sikuli/+question/233161

Is  it possible to explain this or how o work around it please.
I have script I want to make a simple lib so I can include into multiple.  As one line it works
click ("PrintBtn.png")

Now if I turn it into a function 

def HitPrintBtn():
    click ("PrintBtn.png")
    return
HitPrintBtn

This does not work it seems to exit the function without clicking or finding the button, nor does doing and import and making the function call in there.
Debug ouput  

[debug] FileManager: tempfile create: C:\Temp\sikuli-7226898835293048150.png
[debug] SikuliEditorKit.read
[debug] ImageLocator: found PrintBtn.png in C:\Kutana\KAppris Tests\HitPrint.si
uli\
[debug] FileManager: tempfile create: C:\Temp\sikuli-2921786381508345238.png
[debug] SikuliEditorKit.read
[debug] SikuliEditorKit.read
[debug] ImageLocator: found KapprisPrintWindow.png in C:\Kutana\KAppris Tests\F
ndKappris.sikuli\
[debug] FileManager: tempfile create: C:\Temp\sikuli-2464581692899125288.png
[debug] FileManager: tempfile create: C:\Temp\sikuli-8102760734221276666.py
[debug] Checking JNI library working directory
[debug] Using as JNI library working directory: 'C:\Program Files\Sikuli X\libs

[debug] Using JNI directory as OCR directory (tessdata) too
[debug] Native library found: VisionProxy
[debug] Native library loaded: VisionProxy
[debug] Native library found: WinUtil
[debug] Native library loaded: WinUtil
[debug] close all ScreenHighlighter
[info] Exit code: 0
[debug] close all ScreenHighlighter



-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.