Where are pictures stored on mac, so I can use them on another computer

Asked by Colby Black

I wrote a script on my mac with a lot of

x = (screenshot)
y = ( screenshot)

and then I would write the script as

click(x)
rightClick(y)

etc.

Well I want to run the script on my PC, so I want to copy the existing code from mac, make a few changes keyboard command changes for things like "pasting" and "Copying" but let the code use the same picture glossary so I don't have to re take a bunch of screenshots...is that possible? I know my mac has different resolution than my PC with 3 screens...

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

--- scripts
The scripts and the images together are stored on all systems in folders with the ending .sikuli.
On Mac we have the special situation, that these folders are specified as bundles (like the "folders" .app), so they look like files.
they can be opened via the context menu in finder (second entry, something like "show bundle content").

To share the scripts.sikuli over different systems, just put them on a shared medium (network drive, Dropbox, ...).

--- reuse screenshots on other systems
this is principally possible, as long as the image on the other system looks the same pixel by pixel (slight differences in color or brightness of single pixels mostly only lead to lower similarity scores).
So just different resolutions do not matter, as long as the image is rendered the same looking at the pixels.

One more thing:
there is a function Env.getOS (http://doc.sikuli.org/globals.html#Env.getOS), that lets you check, on what system your script is running on. So you can implement system specific code in your script (e.g. keyboard).

Revision history for this message
Colby Black (coboblack) said :
#2

Thanks RaiMan, that solved my question.