[1.1.0] Need IDE settings to overwrite captured images --- partly fixed 2015-06-24+

Bug #1420866 reported by Collin Tobin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Fix Committed
Critical
RaiMan

Bug Description

***************** current implementation and usage

Is implemented, but not yet added as a selectable option.

Currently one has 3 possibilities:

-- 1. a hack
When having the IDE open, just add an untitled/new tab, that only contains

Settings.OverwriteImages = True

and run it once.
From now on until you close the IDE you will have overwrite-images active
This would have to be repeated after every IDE startup.

-- 2. options file - longterm solution
this is not yet documented.
as mentioned in the docs
http://sikulix-2014.readthedocs.org/en/latest/basicinfo.html#sikulix-system-specifics
SikuliX 1.1.0+ now uses a data store area, that contains a folder (create it, if it does not exist)
SikulixStore

In this folder put a file named
SikulixOptions.txt

that contains this line
Settings.OverwriteImages on

This file is read on startup and interpreted according to the rules of a Java Preferences file.

-- 3. implicit image naming using imagename =
If you write into a scriptline only this:
imagename =

and then press capture button still having the cursor in that line, then after capture you will have
imagename = "imagename.png"

this option always overwrites the image without asking.
Depending on how you have setup your script and usually work with naming, this might be interesting for you, since it is an easy way to name an image along a naming concept and have variables for the images all in one step.

One more thing:
if an image name starts with an _ then it will never be deleted by the cleanup function on save.
This is for situations, where you store captured stuff or other image files in the bundle, that are not mentioned anywhere in the script text.

-------------------------------------------------------------------------

Would like the option of a setting to overwrite images of the same name during the screen capture process.

Using Sikuli IDE 1.0.1 / Win 7 64 bit.

From an earlier thread with RaiMan:(https://answers.launchpad.net/sikuli/+question/261956)

I will add an option
Settings.OverwriteImages = false (as default)

So when available in one of the next nightly builds of 1.1.0, you might try it out:
somewhere at the beginning of a script session simply say
Settings.OverwriteImages = true

and on recapture the images will be overwritten without notice (since
you know, what you are doing).

Collin Tobin (coljtob)
description: updated
Revision history for this message
RaiMan (raimund-hocke) wrote : Re: [1.1.0] Need IDE settings to overwrite captured images

Very well done. Thanks.

Changed in sikuli:
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.0
summary: - Need IDE settings to overwrite captured images
+ [1.1.0] Need IDE settings to overwrite captured images
Revision history for this message
Collin Tobin (coljtob) wrote : Re: [Bug 1420866] Re: Need IDE settings to overwrite captured images

It seems the nightly build doesn't include the sikuli-script.jar... does
it? I only see Sikulix.jar.

Thanks RaiMan.

Collin

On Wed, Feb 11, 2015 at 12:05 PM, RaiMan <email address hidden> wrote:

> Very well done. Thanks.
>
> ** Changed in: sikuli
> Status: New => Fix Committed
>
> ** Changed in: sikuli
> Importance: Undecided => High
>
> ** Changed in: sikuli
> Assignee: (unassigned) => RaiMan (raimund-hocke)
>
> ** Changed in: sikuli
> Milestone: None => 1.1.0
>
> ** Summary changed:
>
> - Need IDE settings to overwrite captured images
> + [1.1.0] Need IDE settings to overwrite captured images
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1420866
>
> Title:
> [1.1.0] Need IDE settings to overwrite captured images
>
> Status in Sikuli:
> Fix Committed
>
> Bug description:
> Would like the option of a setting to overwrite images of the same
> name during the screen capture process.
>
> Using Sikuli IDE 1.0.1 / Win 7 64 bit.
>
> From an earlier thread with
> RaiMan:(https://answers.launchpad.net/sikuli/+question/261956)
>
> I will add an option
> Settings.OverwriteImages = false (as default)
>
> So when available in one of the next nightly builds of 1.1.0, you might
> try it out:
> somewhere at the beginning of a script session simply say
> Settings.OverwriteImages = true
>
> and on recapture the images will be overwritten without notice (since
> you know, what you are doing).
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/sikuli/+bug/1420866/+subscriptions
>

Revision history for this message
Collin Tobin (coljtob) wrote :

Nevermind, looks like calling sikulix.jar works just fine (not separate
jars anymore!).

Thanks.

On Mon, May 11, 2015 at 2:13 PM, Collin Tobin <email address hidden> wrote:

> It seems the nightly build doesn't include the sikuli-script.jar... does
> it? I only see Sikulix.jar.
>
> Thanks RaiMan.
>
> Collin
>
> On Wed, Feb 11, 2015 at 12:05 PM, RaiMan <email address hidden> wrote:
>
>> Very well done. Thanks.
>>
>> ** Changed in: sikuli
>> Status: New => Fix Committed
>>
>> ** Changed in: sikuli
>> Importance: Undecided => High
>>
>> ** Changed in: sikuli
>> Assignee: (unassigned) => RaiMan (raimund-hocke)
>>
>> ** Changed in: sikuli
>> Milestone: None => 1.1.0
>>
>> ** Summary changed:
>>
>> - Need IDE settings to overwrite captured images
>> + [1.1.0] Need IDE settings to overwrite captured images
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1420866
>>
>> Title:
>> [1.1.0] Need IDE settings to overwrite captured images
>>
>> Status in Sikuli:
>> Fix Committed
>>
>> Bug description:
>> Would like the option of a setting to overwrite images of the same
>> name during the screen capture process.
>>
>> Using Sikuli IDE 1.0.1 / Win 7 64 bit.
>>
>> From an earlier thread with
>> RaiMan:(https://answers.launchpad.net/sikuli/+question/261956)
>>
>> I will add an option
>> Settings.OverwriteImages = false (as default)
>>
>> So when available in one of the next nightly builds of 1.1.0, you might
>> try it out:
>> somewhere at the beginning of a script session simply say
>> Settings.OverwriteImages = true
>>
>> and on recapture the images will be overwritten without notice (since
>> you know, what you are doing).
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/sikuli/+bug/1420866/+subscriptions
>>
>
>

Revision history for this message
RaiMan (raimund-hocke) wrote : Re: [1.1.0] Need IDE settings to overwrite captured images
Revision history for this message
Collin Tobin (coljtob) wrote : Re: [Bug 1420866] Re: [1.1.0] Need IDE settings to overwrite captured images

I am running Sikuli 1.1.0.... I have a utilities.py that runs most of my
common functions.

I've included this line at the top:

Settings.OverwriteImages = true/1
and also tried
Settings.OverwriteImages = true/1

When I capture a pre-existing image, Sikuli names it with a "-1" and
doesn't overwrite by the same name.

Am I missing something? And I thought using Settings in a script only
affects the runtime behavior, what if I'm just capturing straight out of
the IDE?

Thanks,

Collin

On Mon, May 11, 2015 at 4:37 PM, RaiMan <email address hidden> wrote:

> look http://sikulix.com
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1420866
>
> Title:
> [1.1.0] Need IDE settings to overwrite captured images
>
> Status in Sikuli:
> Fix Committed
>
> Bug description:
> Would like the option of a setting to overwrite images of the same
> name during the screen capture process.
>
> Using Sikuli IDE 1.0.1 / Win 7 64 bit.
>
> From an earlier thread with
> RaiMan:(https://answers.launchpad.net/sikuli/+question/261956)
>
> I will add an option
> Settings.OverwriteImages = false (as default)
>
> So when available in one of the next nightly builds of 1.1.0, you might
> try it out:
> somewhere at the beginning of a script session simply say
> Settings.OverwriteImages = true
>
> and on recapture the images will be overwritten without notice (since
> you know, what you are doing).
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/sikuli/+bug/1420866/+subscriptions
>

Revision history for this message
RaiMan (raimund-hocke) wrote :
Download full text (4.5 KiB)

Hi Collin,

I have to admit, that I stopped in the middle (from your point of view ).

I implemented this feature, but did not yet add it as a selectable option.

Currently you have 3 possibilities:

-- 1. a hack
When having the IDE open, just add an untitled/new tab, that only contains

Settings.OverwriteImages = True

and run it once.
From now on until you close the IDE you will have overwrite-images active
This would have to be repeated after every IDE startup.

-- 2. options file - longterm solution
this is not yet documented.
as mentioned in the docs
http://sikulix-2014.readthedocs.org/en/latest/basicinfo.html#sikulix-system-specifics <http://sikulix-2014.readthedocs.org/en/latest/basicinfo.html#sikulix-system-specifics>
SikuliX 1.1.0+ now uses a data store area, that contains a folder (create it, if it does not exist)
SikulixStore

In this folder put a file named
SikulixOptions.txt

that contains this line
Settings.OverwriteImages on

This file is read on startup and interpreted according to the rules of a Java Preferences file.

-- 3. implicit image naming using imagename =
If you write into a scriptline only this:
imagename =

and then press capture button still having the cursor in that line, then after capture you will have
imagename = "imagename.png"

this option always overwrites the image without asking.
Depending on how you have setup your script and usually work with naming, this might be interesting for you, since it is an easy way to name an image along a naming concept and have variables for the images all in one step.

One more thing:
if an image name starts with an _ then it will never be deleted by the cleanup function on save.
This is for situations, where you store captured stuff or other image files in the bundle, that are not mentioned anywhere in the script text.

Raimund

> On 11 May 2015, at 23:06, Collin Tobin <email address hidden> wrote:
>
> I am running Sikuli 1.1.0.... I have a utilities.py that runs most of my
> common functions.
>
> I've included this line at the top:
>
> Settings.OverwriteImages = true/1
> and also tried
> Settings.OverwriteImages = true/1
>
> When I capture a pre-existing image, Sikuli names it with a "-1" and
> doesn't overwrite by the same name.
>
> Am I missing something? And I thought using Settings in a script only
> affects the runtime behavior, what if I'm just capturing straight out of
> the IDE?
>
> Thanks,
>
> Collin
>
>
> On Mon, May 11, 2015 at 4:37 PM, RaiMan <email address hidden> wrote:
>
>> look http://sikulix.com
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1420866
>>
>> Title:
>> [1.1.0] Need IDE settings to overwrite captured images
>>
>> Status in Sikuli:
>> Fix Committed
>>
>> Bug description:
>> Would like the option of a setting to overwrite images of the same
>> name during the screen capture process.
>>
>> Using Sikuli IDE 1.0.1 / Win 7 64 bit.
>>
>> From an earlier thread with
>> RaiMan:(https://answers.launchpad.net/sikuli/+question/261956)
>>
>> I will add an option
>> Settings.OverwriteImages = false (as default)
>>
>> So when available in one of the ne...

Read more...

RaiMan (raimund-hocke)
description: updated
summary: - [1.1.0] Need IDE settings to overwrite captured images
+ [1.1.0] Need IDE settings to overwrite captured images --- partly fixed
+ 2015-06-24+
Changed in sikuli:
importance: High → Critical
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.