← Back to team overview

sikuli-driver team mailing list archive

[Bug 744571] Re: image Location lost when IDE closed

 

use the defined image share feature as described in:
http://sikuli.org/docx/globals.html#importing-other-sikuli-scripts-
reuse-code-and-images

In a Sikuli script only absolute paths and string-combined paths are
protected against the IDE image management.

if you want to stick with your solution, use:

import os
myImgs = os.path.dirname(getBundlePath()) # the location of your .sikuli

click(os.path.join(myImgs, "Images/myImage.png"))

** Summary changed:

- image Location lost when IDE closed
+ relative image location lost when IDE closed --- use absolute or os.path.join()

** Changed in: sikuli
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/744571

Title:
  relative image location lost when IDE closed --- use absolute or
  os.path.join()

Status in Sikuli:
  Invalid

Bug description:
  Sikuli version: X-1.0rc2
  OS: Mac OSX 10.6.6

  What steps will reproduce the problem?
  1. Create a script as below
      Click("../Images/myImage.png")
  2. Save
  3. Run (works fine)
  4. Close IDE
  5. Relaunch IDE and open the script.
  6. Image location is replaced with image screenshot
  7. Run fails org.sikuli.script.FindFailed: FindFailed: can not find myImage.png

  Why this is needed?
  so that I can store frequently used images as helper images across other scripts.



References