SRL Archive - Unofficial Development

ACA[AutocolorAid] remake


CynicRus

2013-03-10 12:21:01

Hey all. I am sure many of you liked ACA v 2 by Nielsie95 and Sumilion. I'm from it was delighted. But unfortunately the program have not been updated and is completely cross-platform. A few days ago I was contacted to Niels and asked source code of this utility. Received a positive response to the request, and after a few days of work, I present to you ACA remake.

Written in Lazarus + FPC, based on ACA2 and ACA v 3 source code. The program uses search colors algorithms from Simba.
Last update: 13.10.2014

Status: Win stable, *nix beta.

Credits:
Nielsie95 and Sumilion for ACA2 and wonderful readable code.
Nielsie95 for ACA v 3 and ACA2 source code.


Features:
Tolerance calculator
Optionable ColorToleranceSpeed
Client window - a image copied from your screen, allowing you to pick colors from it
Color Marking
Custom search area for Marking Colors
Bitmap saving
Bitmap loading
AutoColor function generator
FindObject function generator
Multi-colors profiles
CTS0,1,2,3 supported
Crossplatform, can be easely integrated to Simba.
The DX Apps grabbing support.

Screenshots:

Windows:


Linux:



Generated code:

program AutoColor;
{$I SRL\SRL.simba}

function RedBox : Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.08, 1.75);

FindColorsSpiralTolerance(640, 512, arP, 16043446, 0, 0, 1280, 1024, 8);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);

if (H >= 60.28) and (H <= 60.38) and (S >= 68.97) and (S <= 90.26) and (L >= 74.69) and (L <= 91.98) then
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 43.15) and (X <= 74.37) and (Y >= 44.73) and (Y <= 78.30) and (Z >= 84.94) and (Z <= 104.14) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;

function LazIcon : Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(3);
SetColorSpeed3Modifiers(1,8);

FindColorsSpiralTolerance(640, 512, arP, 16043446, 0, 0, 1280, 1024, 8);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);

if (H >= 60.28) and (H <= 60.38) and (S >= 68.97) and (S <= 90.26) and (L >= 74.69) and (L <= 91.98) then
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 43.15) and (X <= 74.37) and (Y >= 44.73) and (Y <= 78.30) and (Z >= 84.94) and (Z <= 104.14) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
end;

ColorToleranceSpeed(tmpCTS);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;

begin
SetupSRL;
RedBox;
LazIcon;
end.


program FindObjects;
{$I SRL\SRL.simba}

var
x, y: Integer;
function RedBox(var x,y: integer) : Integer;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.08, 1.75);

if not(FindColorsTolerance(arP, 16043446, MSX1, MSY1, MSX2, MSY2, 8)) then
begin
Writeln('Failed to find the color, no object found.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);

for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);

if (H >= 60.28) and (H <= 60.38) and (S >= 68.97) and (S <= 90.26) and (L >= 74.69) and (L <= 91.98) then
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 43.15) and (X <= 74.37) and (Y >= 44.73) and (Y <= 78.30) and (Z >= 84.94) and (Z <= 104.14) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
end;

function LazIcon(var x,y: integer) : Integer;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
H, S, L: Extended;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(3);
SetColorSpeed3Modifiers(1,8);

if not(FindColorsTolerance(arP, 16043446, MSX1, MSY1, MSX2, MSY2, 8)) then
begin
Writeln('Failed to find the color, no object found.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;

arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);

for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);

if (H >= 60.28) and (H <= 60.38) and (S >= 68.97) and (S <= 90.26) and (L >= 74.69) and (L <= 91.98) then
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 43.15) and (X <= 74.37) and (Y >= 44.73) and (Y <= 78.30) and (Z >= 84.94) and (Z <= 104.14) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
end;

begin
SetupSRL;
LazIcon(x,y);
LazIcon(x,y);
end.

Source code can be found here:
http://github.com/CynicRus/ACARemake

Cheers,
Cynic.

rj

2013-03-10 12:37:20

Nice, is it more accurate?

CynicRus

2013-03-10 12:42:37

From: RJJ95
Nice, is it more accurate?

Well, using the same algorithms that Simba and Aca v2\3.

Runehack123

2013-03-10 12:47:54

Great! - I haven't looked at it yet, but good job for doing what you're doing. :)

Netzone

2013-03-10 12:49:57

Looks great! Will definitely be useful.

Sjoe

2013-03-10 12:50:27

Damn Cynicrus, so many good things!!

Wetish

2013-03-10 13:55:02

CTS 3! I'm going to give it a try.

Edit:
Errors!
http://i.imgur.com/xENFh9o.png

King

2013-03-10 13:58:34

Sexy<3

Silentcore

2013-03-10 14:10:18

Good Work..

litoris

2013-03-10 14:12:47

Awesome, the most useful tool for a scripter :D I was getting tired of ACA 3's inaccuacy, I always had to adjust the tolerance myself using smart graphics. +repped!

CynicRus

2013-03-10 14:19:42

From: Wetish
CTS 3! I'm going to give it a try.

Edit:
Errors!
http://i.imgur.com/xENFh9o.png

Gimme more info!-)

Ashaman88

2013-03-10 14:30:09

Great job! Will definitely test it out :). Any chance of adding a zoom option to help with grabbing colors? (Sorry if there already is one and I missed it)

CynicRus

2013-03-10 14:49:56

From: Ashaman88
Great job! Will definitely test it out :). Any chance of adding a zoom option to help with grabbing colors? (Sorry if there already is one and I missed it)


I can implement it without any problems. Only is it necessary?

Ashaman88

2013-03-10 16:43:23

From: CynicRus
I can implement it without any problems. Only is it necessary?


I often use it with the DTM editor when I want to see the precise breakout of pixels (especially for MM stuff), but it's no biggie

Sirenia

2013-03-10 17:59:48

Might want to upload the pic at another site, clicked the pic and it took me to a site full of hooker ads :/

Rich

2013-03-10 18:05:42

From: Sirenia
Might want to upload the pic at another site, clicked the pic and it took me to a site full of hooker ads :/

But serious, great job. Very nice contribution which a fair few people will be able to use and abuse.

Oh, and the pic isn't meant to offend anyone.

King

2013-03-10 18:10:13

Colors are much more accurate but simba throws up duplicate identifier errors with the generated function, but thanks!

tealc

2013-03-10 21:41:17

delete duplicates doesn't seem to be working for me and i get list out of bounds when i try delete colors manually. Other than that it seems to be working good.

Press Play

2013-03-10 22:45:15

Yay, CTS3! And I also second the zoom function :) It's not 'necessary', but it'd be very useful for precision :) Good job on this!

The Mayor

2013-03-10 22:56:55

Well done on releasing this! I will give it a go now!

I like how you can drag the crosshair onto the client, very useful.

E: It seems to crash after I have picked about 10 colours?

CynicRus

2013-03-10 23:26:26

From: The Mayor
Well done on releasing this! I will give it a go now!

I like how you can drag the crosshair onto the client, very useful.

E: It seems to crash after I have picked about 10 colours?


Weird.
I will look at that today.

CynicRus

2013-03-11 03:08:52

From: Sirenia
Might want to upload the pic at another site, clicked the pic and it took me to a site full of hooker ads :/


Done.

To all: I found OutOfMem bug. I will be fix it today.

Runehack123

2013-03-11 03:24:48

Tried to open image in new tab and I got ->

403 Forbidden
nginx :(

CynicRus

2013-03-11 03:30:04

From: Runehack123
Tried to open image in new tab and I got ->

403 Forbidden
nginx :(


In the first post picture looks bad?:)

CynicRus

2013-03-11 03:45:29

Fixed version has been released now.

- Memory leak fixed
- Delete duplicates added
- Few optimisations

Sjoe

2013-03-11 15:44:13

Gonna try this baby out Cynic!

tealc

2013-03-11 19:23:50

nice work, but deleting individual colors still gives an list index out of bounds

Janilabo

2013-03-11 19:57:38

Damn Cynic, you must be a wizard or something… :D
All these awesome contributions, that you keep releasing, they are just pure gold for the SRL community!

Really good stuff, BOSS. ;)
You deserve a lot more credit than you could ever get within your lifetime, seriously.

Thanks.

-Jani

Flight

2013-03-11 20:07:09

This is really neat, I'll use it for sure. Until now I've been using Mormonman's ACA version that included CTS3. I guess it was never completed.

CynicRus

2013-03-12 01:47:42

From: Janilabo
Damn Cynic, you must be a wizard or something… :D
All these awesome contributions, that you keep releasing, they are just pure gold for the SRL community!

Really good stuff, BOSS. ;)
You deserve a lot more credit than you could ever get within your lifetime, seriously.

Thanks.

-Jani


Thank you, Jani.

But it generally is not my merit as merit Niels.


From: tealc
nice work, but deleting individual colors still gives an list index out of bounds


I can't reproduce this.

tealc

2013-03-12 02:08:48

From: CynicRus


I can't reproduce this.


Just downloaded a fresh copy and tried again.

[ATTACH=CONFIG]19872[/ATTACH]

i select the color highlighted in blue. Then hit the delete button circled in red and get the error.

CynicRus

2013-03-12 03:48:46

From: tealc
Just downloaded a fresh copy and tried again.

[ATTACH=CONFIG]19872[/ATTACH]

i select the color highlighted in blue. Then hit the delete button circled in red and get the error.


Fixed.

But one notice: delete button can delete only color profile. For single color deleting just use Del or delete button.

Cheers,
Cynic.

CynicRus

2013-03-12 07:09:29

Zoom is much better now.

xtrapsp

2013-03-12 07:18:53

From: CynicRus
Zoom is much better now.


I suggest something and you make it happen. I love you.

speedster

2013-03-12 12:05:25

Wow :D This sure was an exexpected surprise! Congrats on the release, what could be better than AcaV2? AcaV3 of course! :D And it looks amazing, specially the cts3 (How does the CTS3 Mod work tough ? How does it affect the whole thing ?)

Really appreciate it mate! thanks :stirthepot:

CynicRus

2013-03-12 12:09:42

From: speedster
Wow :D This sure was an exexpected surprise! Congrats on the release, what could be better than AcaV2? AcaV3 of course! :D And it looks amazing, specially the cts3 (How does the CTS3 Mod work tough ? How does it affect the whole thing ?)

Really appreciate it mate! thanks :stirthepot:


A selection CTS3 modifier is directly proportional to the desired result.:)

Ty!

Zorgatone

2013-03-12 23:21:46

Sounds hot! :D Going to use it

CynicRus

2013-03-13 04:08:29

From: Ashaman88
Great job! Will definitely test it out :). Any chance of adding a zoom option to help with grabbing colors? (Sorry if there already is one and I missed it)


Done!:)

Also:
- Find Object function generator fixed
- Optimized zoomed image drawing
- Add optional zoom
- Few optimizations and fixes

New version has been released now:)

CynicRus

2013-03-13 07:09:08

Linux beta has been added now. Screens updated.

Ashaman88

2013-03-13 07:29:39

Most excellent! Will def try new version

CynicRus

2013-03-14 02:29:59

Stable version for Windows has been released now.

Cheers,
Cynic.

speedster

2013-03-14 02:46:11

Congrats on the release ^-^, still haven't had the opportunity to use it but I can't wait in my next script :D Everything looks so much better now (Would be awesome if you could make the window resizable to allow for a larger workspace :D! )

Thanks for developing (upgrading) this lil tool for for us

CynicRus

2013-03-14 04:15:54

From: speedster
Congrats on the release ^-^, still haven't had the opportunity to use it but I can't wait in my next script :D Everything looks so much better now (Would be awesome if you could make the window resizable to allow for a larger workspace :D! )

Thanks for developing (upgrading) this lil tool for for us



Ty!

DannyRS

2013-03-14 04:40:57

Amazing job Cynic!

I'll have to give CTS3 a go later and see how it compares to 2, always hoped ACA would get an update, defo a must have for color scripters ;)

CynicRus

2013-03-14 04:51:49

From: DannyRS
Amazing job Cynic!

I'll have to give CTS3 a go later and see how it compares to 2, always hoped ACA would get an update, defo a must have for color scripters ;)


Thanks for the high words.:)

CynicRus

2013-03-14 06:48:21

From: core
Molodets! Prekrasno rabotayet. :) [Good job, works great!]

I just used it to make a quick script to test out the interface. The profiles feature is my favorite so far, really speeds up my development and makes it easier to keep track of . Also excited to try CTS 3.

Three small notes:
The Add and Delete buttons don't seem to intuitively apply to the profiles and appear to apply to the colors themselves. Maybe moving them above the color list, away from the color settings would help?
Reload from client could probably be better called reload from desktop since it does not seem to try to find the client and replicates the reload from desktop behavior from ACA.
Creating two profiles with the same name is allowed and causes some unexpected behavior.


Spasibo![Thank you!]
1) Fair point, perhaps I'll do that in the next version.

2) Not quite. This function retrieves the image from the application that the client. Simply select the desired window with the red button with the green cross-hairs.

3) Choise the profile name deals with the script developer, and are generated snippet is likely to rename. But I will take note of your comment.

CynicRus

2013-03-14 07:30:15

Stable version updated with small redesign by Core suggestion ?1.


Cheers,
Cynic.

DannyRS

2013-03-14 13:41:47

Really Great tool, some UI feedback if you want,

Maybe this is just my win95 theme? but these differences really stood out from original: http://i.imgur.com/OLGd3zY.png

CynicRus

2013-03-14 13:48:28

From: DannyRS
Really Great tool, some UI feedback if you want,

Maybe this is just my win95 theme? but these differences really stood out from original: http://i.imgur.com/OLGd3zY.png


Ty for you feedback, I will fix it tomorrow!-)

DannyRS

2013-03-14 14:13:35

From: CynicRus
Ty for you feedback, I will fix it tomorrow!-)


It sounded like I'm just moaning haha,

The good Far outweighs the GUI stuff, again, Great Job :p

Sawyer

2013-03-14 21:51:29

+ Rep. Great work.

CynicRus

2013-03-15 02:20:25

Well. I've fixed a most of you these ui-bugs. But I can't fix flashing on the main window. Because I cant reproduce this. But I feel that this problem is on your side.

DannyRS

2013-03-15 08:58:52

From: CynicRus
Well. I've fixed a most of you these ui-bugs. But I can't fix flashing on the main window. Because I cant reproduce this. But I feel that this problem is on your side.


Hmm, after I target a client and get an image, every time I click refresh / mark color or anything, it takes a second to clear the image buffer, and causes the "Flash", no Idea :p, it's no biggey thanks for the tweaking ;)

the flea

2013-03-15 09:08:50

oh wow some really great improvements from the old version. Thanks Cynic +rep

CynicRus

2013-03-17 11:19:25

From: the flea
oh wow some really great improvements from the old version. Thanks Cynic +rep


Ty!

Everyone who enjoys and has not been updated, time to upgrade!:)

CynicRus

2013-03-17 16:16:06

Codegen CTS3 bug has been fixed now.

Yago

2013-03-17 22:14:26

Would you be able to make f5 refresh the image, etc…

CynicRus

2013-03-20 11:24:41

Exe updated now. Thanks to Core for update. About the changes will be written later.:)

Sjoe

2013-03-23 14:13:50

Hey, when I press Reload Client, Refresh Image, Clear List etc,… (most things of the list on the upper screen)

ACA just shuts down, without a warning and stuff :(

Sjoe

2013-03-23 19:54:56

From: core
I fixed these issues and sent a pull request to Cynic, so he'll merge it into the official when he wakes up. You can find the source of the pull at github.

At your own risk I have uploaded a fixed version of ACA in case you can't wait for Cynic's merge.


Thanks core!

CynicRus

2013-03-24 03:03:02

From: core
I fixed these issues and sent a pull request to Cynic, so he'll merge it into the official when he wakes up. You can find the source of the pull at github.

At your own risk I have uploaded a fixed version of ACA in case you can't wait for Cynic's merge.


Merged! Thank you for update!

To all: Exe updated:)

Zorgatone

2013-03-25 23:09:08

It's too buggy for me.. It keeps crashing

EDIT: downloaded the updated version and working..
I want to report a wrong text here: http://puu.sh/2o8sl Lol maybe you've looked at the sourcecode of the sps path maker :P

EDIT2: I cannot still use it… When I select a colour on the right list, it won't show the colour preview and I can't know what wrong color was picked up for error to remove it :S

CynicRus

2013-03-28 04:22:31

Dude. Glands can also be removed through the ass, but no one does. So here's what you have described, is the removal of the glands in the ass.:P

By the way, exe updated:)

xtrapsp

2013-03-28 05:13:44

Just stickied this for you Cynic, Cause I'm an undercover mod

Runehack123

2013-03-28 05:24:39

From: xtrapsp
Just stickied this for you Cynic, Cause I'm an undercover mod


haha you wish ;)

CynicRus

2013-03-28 13:31:36

From: Runehack123
haha you wish ;)

Lol

cathering_

2013-03-31 14:34:16

Some feedback:
  • It will shutdown sometimes when I attempt to perform any action (probably fixed in Core's release).
  • An out of bounds error occurred once when I was adding new profiles.
  • The save icon in the toolbar should save back to the original "save as" file (if any), instead of having to always open the Save As dialog.
  • Any opinions on making the client picture (or the entire form) resizable? I have quite a high resolution screen and it would certainly speed up most people's work flow as they won't always have to scroll.
  • When generating code, the modifiers, colours and tolerances don't actually change in each of the functions.

CynicRus

2013-04-04 01:07:42

From: cathering_
Some feedback:
  • It will shutdown sometimes when I attempt to perform any action (probably fixed in Core's release).
  • An out of bounds error occurred once when I was adding new profiles.
  • The save icon in the toolbar should save back to the original "save as" file (if any), instead of having to always open the Save As dialog.
  • Any opinions on making the client picture (or the entire form) resizable? I have quite a high resolution screen and it would certainly speed up most people's work flow as they won't always have to scroll.
  • When generating code, the modifiers, colours and tolerances don't actually change in each of the functions.


Thanks for you feedback!

"It will shutdown sometimes when I attempt to perform any action"

I can't reproduce this. I never in development time have not encountered such behavior. You're using the version for Win or for Lin?

"An out of bounds error occurred once when I was adding new profiles."

Weird, but I also can't reproduce it.

"When generating code, the modifiers, colours and tolerances don't actually change in each of the functions."

What do you mean? If you do not change the modifiers, so they have not changed in the program.

Cheers,
Cynic.

dzpliu

2013-04-04 09:01:48

it seems that i could only choose 1 color? after clicking on a color, it asks for profile. i type in a random name, after that, any color that i click doesnt auto add to the color list?

CynicRus

2013-04-04 09:17:19

Each profile can have an unlimited number of selected colors.

dzpliu

2013-04-04 09:25:06

is there a particular setting i need to make? in the aca v2, i could make unlimited colors, but for this, after 1 color gets added to color list, the rest of the colors that i click will not be added anymore.

CynicRus

2013-04-04 13:20:47

From: dzpliu
is there a particular setting i need to make? in the aca v2, i could make unlimited colors, but for this, after 1 color gets added to color list, the rest of the colors that i click will not be added anymore.

I think this is weird. Because I've tested it now and doesn't found any problems with this:



I suspect that you are doing something wrong.

dzpliu

2013-04-05 23:18:59

From: CynicRus
I think this is weird. Because I've tested it now and doesn't found any problems with this:



I suspect that you are doing something wrong.


i just dont know what is wrong :( im running win7. btw under the status bar of the aca, it forever says ACA successfully loaded…

sometimes i get list(1) out of bounds error too.
do i have to install something like .net framework?

CynicRus

2013-04-06 04:25:33

Nop, you need only last version of ACA remake. This is native application.

dzpliu

2013-04-06 07:12:41

From: CynicRus
Nop, you need only last version of ACA remake. This is native application.


the zip is the current latest version right? i really dont know what is wrong, could u do teamviewer or skype?
edit: btw, could this because im using X64 instead of normal x86?

CynicRus

2013-04-07 04:40:15

On Windows 7 x64 I also do not see any of this behavior.

revon

2013-04-07 10:57:13

I restructured the GUI and sent a pull request. With my changes, the program window is now resizable and the widgets are aligned & scaled correctly no matter what size it is.

dzpliu

2013-04-07 10:58:52

From: revon
I restructured the GUI and sent a pull request. With my changes, the program window is now resizable and the widgets are aligned & scaled correctly no matter what size it is.


hopefully this will solve my problem. i tried downloading lazarus and tried compiling it on my own without success…i guess its hard for newbies.

revon

2013-04-07 11:01:07

It could. I had trouble compiling it too; I had to change a few lines of code to get it to compile. Those changes are included in the pull request.

CynicRus

2013-04-07 11:50:31

From: revon
It could. I had trouble compiling it too; I had to change a few lines of code to get it to compile. Those changes are included in the pull request.


Yea, I saw it. Really good work. I've tested and merged it. Thank you for your contribution.

Exe updated.

dzpliu

2013-04-11 05:28:02

i dont know what is wrong haha, i got this working on win8 64bit on another laptop, but my main laptop still doesnt work.

samerdl

2013-04-24 06:09:27

I know CTS3 is better than CTS2 but it still doesn't give me much difference in game, also i don't like the create a profile option :O

overall its great, but i still use the original AcA

StickToTheScript

2013-04-24 11:21:57

I am going to try this when I get home today! I look forward to it! XD

Janilabo

2013-04-24 17:09:05

Having a little problem: I can't pick colors with it, well, except the first one for 1st profile only. After that, it just wont let me pick any colors (I keep clicking the image, but any clicks aren't registered). :\
Anyone else having this problem? I am using Windows 7 64-bit Home Premium.

I must say, I like the way there's profiles - that makes it easy to create color records for multiple objects (at the same time) quickly!
Neat idea Cynic. :)

Also here is a little suggestion for the future: Please add possibility to change the color with which you can debug the matched points, because right now it's always 255? With 255 you can't see the result for matched red points (if you are dealing with red colors for your object).
This is a feature that should have been added in already for ACA v1. :p

..and another suggestion: Add color picker, with which you could pick colors even outside the image area.

Right-click menu is missing these options: "Add Color", "Delete Color" and "Clear List" (I have found these extremely useful in ACA v2).

Keep up the good work, CynicRus!

CynicRus

2013-04-26 14:04:31

From: Janilabo
Having a little problem: I can't pick colors with it, well, except the first one for 1st profile only. After that, it just wont let me pick any colors (I keep clicking the image, but any clicks aren't registered). :\
Anyone else having this problem? I am using Windows 7 64-bit Home Premium.


How I can reproduce that? I do not see such problems in the main Win 7 x64 pro. I develop this app on this system. And on the proposals - I think it will implement in the near future. Just now, I'm busy working on Simba. Ty for using!

Cheers,
Cynic.

Sk1nyNerd

2013-05-01 23:03:56

is there a tut on how to use this? im new and havent used the orginal. how many similar colors do i need to pick in an area for a good hue and sat?

i often get this error/warning when moving off the aca's client window, it's a rather annoying and frustrating notification and i dont understand it.

[ATTACH=CONFIG]21036[/ATTACH]

Many thanks!

dzpliu

2013-05-02 00:18:44

From: Janilabo
Having a little problem: I can't pick colors with it, well, except the first one for 1st profile only. After that, it just wont let me pick any colors (I keep clicking the image, but any clicks aren't registered). :\
Anyone else having this problem? I am using Windows 7 64-bit Home Premium.

I must say, I like the way there's profiles - that makes it easy to create color records for multiple objects (at the same time) quickly!
Neat idea Cynic. :)

Also here is a little suggestion for the future: Please add possibility to change the color with which you can debug the matched points, because right now it's always 255? With 255 you can't see the result for matched red points (if you are dealing with red colors for your object).
This is a feature that should have been added in already for ACA v1. :p

..and another suggestion: Add color picker, with which you could pick colors even outside the image area.

Right-click menu is missing these options: "Add Color", "Delete Color" and "Clear List" (I have found these extremely useful in ACA v2).

Keep up the good work, CynicRus!


i have the same problem. i guess it just doesnt work on win7 64bit home premium because i got it working on win8.

CynicRus

2013-05-02 02:00:13

From: ibot_dung11
is there a tut on how to use this? im new and havent used the orginal. how many similar colors do i need to pick in an area for a good hue and sat?

i often get this error/warning when moving off the aca's client window, it's a rather annoying and frustrating notification and i dont understand it.

[ATTACH=CONFIG]21036[/ATTACH]

Many thanks!


Fixed. Ty for you feedback!

Cheers,
Cynic.

williammake

2013-05-14 13:30:51

Nice, is it more accurate?

StickToTheScript

2013-05-14 19:16:11

When I attempt to use it and click the Show Best Color button, it doesnt do anything. Nothing shades with red or any other colour. The screen is the exact same with no changes.

CynicRus

2013-05-15 08:22:36

Weird. Gimme more info?

loragnor

2013-07-03 17:54:30

Thank you CynicRus for this program. However, I have an issue. When I create an "AutoColor" function using CTS3, I get an error: Unknown identifier 'SetColorSpeed3Modifiers'. A code search does not reveal this function. Is there another include that I do not have? I've forced an update of Simba, but no joy.

rj

2013-07-03 17:57:04

From: loragnor
Thank you CynicRus for this program. However, I have an issue. When I create an "AutoColor" function using CTS3, I get an error: Unknown identifier 'SetColorSpeed3Modifiers'. A code search does not reveal this function. Is there another include that I do not have? I've forced an update of Simba, but no joy.


Did you include SRL?

loragnor

2013-07-03 18:00:15

From: Officer Barbrady
Did you include SRL?


Yes. First thing I checked. Standard SetupSRL call in the loop too.

rj

2013-07-03 18:21:11

From: loragnor
Yes. First thing I checked. Standard SetupSRL call in the loop too.


I gotta go now, but can you post the generated code to when I come back I can test it?

loragnor

2013-07-03 18:32:18

From: Officer Barbrady
I gotta go now, but can you post the generated code to when I come back I can test it?


Sure, and thanks. Did not even change the func name.

The SRL include.


{$DEFINE SMART8}
{$i SRL/SRL.simba}

The generated function.


function AutoColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
H, S, L: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(3);
SetColorSpeed3Modifiers(1.5);

FindColorsSpiralTolerance(382, 276, arP, 5527372, 0, 0, 765, 553, 15);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
ColorToHSL(arC[i], H, S, L);

if (H >= 33.31) and (H <= 55.58) and (S >= 7.08) and (S <= 14.73) and (L >= 13.31) and (L <= 53.35) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;

ColorToleranceSpeed(tmpCTS);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;

The call in my MainLoop.


index = AutoColor;
writeln('we found '+tostr(index)+' matches');

rj

2013-07-03 23:54:56

Sorry mang, I looked for about 20 minutes for CTS3 examples, found 1 and it didn't set the modifiers. @CynicRus may be able to help

Flight

2013-07-03 23:58:43

From: Officer Barbrady
Sorry mang, I looked for about 20 minutes for CTS3 examples, found 1 and it didn't set the modifiers. @CynicRus may be able to help


Masterbb gives a pretty good explanation of all color tolerance speeds, as well as CTS3, which you can read about here:
http://villavu.com/forum/showthread.php?p=964691#post964691

CynicRus

2013-07-04 02:35:52

Well, this is weird. Because a function SetColorSpeed3Modifiers I saw in Simba's exported function list. As soon as I have time I'll look more deeply at this.:)

PS: Oh, and of course it is already in the Simba. After all, I am using functional classes of Simba in the program. Perhaps this function forgot to export.

Yep, as I said:


3:
begin
DefaultCTS3Mod:=CTS3Mod.Value;
TempClient.MFinder.SetToleranceSpeed(3);
TempClient.MFinder.SetToleranceSpeed3Modifier(DefaultCTS3Mod);
TempClient.MFinder.FindColorsTolerance(TPA,aColor,SearchArea.Left,SearchArea.Right,SearchArea.Bottom,SearchArea.Top,Tolerance);
BMPBuffer.DrawTPA(TPA,clRed);
end;
- from my sources

AddFunction(@ps_SetToleranceSpeed3Modifier, 'procedure SetToleranceSpeed3Modifier(Modifier: Extended);');
AddFunction(@ps_GetToleranceSpeed3Modifier, 'function GetToleranceSpeed3Modifier: Extended;');
- from simba sources.

Guys, this is not a bug. This is just mistake in the codegen - just replace SetToleranceSpeed3Modifiers to SetToleranceSpeed3Modifier.

Fixed, exe updated:)

Sorry:P

Cheers,
Cynic.

loragnor

2013-07-04 04:38:59

From: Officer Barbrady
Sorry mang, I looked for about 20 minutes for CTS3 examples, found 1 and it didn't set the modifiers. @CynicRus may be able to help


NP, and thanks for the efforts.

From: Flight
Masterbb gives a pretty good explanation of all color tolerance speeds, as well as CTS3, which you can read about here:
http://villavu.com/forum/showthread.php?p=964691#post964691


Thanks. I'll have to take about a week to absorb some of that information. :p

From: CynicRus
Guys, this is not a bug. This is just mistake in the codegen - just replace SetToleranceSpeed3Modifiers to SetToleranceSpeed3Modifier.


Thank God !! Thought I was crazy or something. ;)

noodelz

2013-08-01 06:56:56

real noob here… i just want to get the right numbers for my this line: "if FindColorTolerance(x, y, examplecolour, xs, ys, xe, ye, tol) then". i don't know shit about coding, so it would be great if anyone described to me what this line even means or just how i get the right values with the ACA program…

serajin

2013-08-01 17:09:57

From: noodelz
real noob here… i just want to get the right numbers for my this line: "if FindColorTolerance(x, y, examplecolour, xs, ys, xe, ye, tol) then". i don't know shit about coding, so it would be great if anyone described to me what this line even means or just how i get the right values with the ACA program…



If - Begins a logical If statement, If x then y type deal. So if FindColorTolerance with the parameters comes back true, Then do the following code, that you'd type.

FindColorTolerance - searches within the given parameters for a color, and returns true/false if it finds or doesn't.

x, y - these are the coordinates that you give it, usually a variable X and Y that will store that data, so you could move your mouse to it later.

exampleColour - as it sounds, this is the color value, which you can get from the color picker in simba.

xs, ys - X Start, Y Start. these are the Top Left corner of the box you want to start your search in.
xe, ye - X End, Y End. This would be for the bottom right corner, to complete y our box.

Tolerance - this is a number that will make the search less strict on the color. A tolerance of 0 means EXACTLY the color. So if your color is 55678. It will search ONLY for 55678. But if your tolerance is say 10. It will search similar colors, and things like 55679, and 55677 would also come back as a positive match.

noodelz

2013-08-02 06:07:19

From: serajin
If - Begins a logical If statement, If x then y type deal. So if FindColorTolerance with the parameters comes back true, Then do the following code, that you'd type.

FindColorTolerance - searches within the given parameters for a color, and returns true/false if it finds or doesn't.

x, y - these are the coordinates that you give it, usually a variable X and Y that will store that data, so you could move your mouse to it later.

exampleColour - as it sounds, this is the color value, which you can get from the color picker in simba.

xs, ys - X Start, Y Start. these are the Top Left corner of the box you want to start your search in.
xe, ye - X End, Y End. This would be for the bottom right corner, to complete y our box.

Tolerance - this is a number that will make the search less strict on the color. A tolerance of 0 means EXACTLY the color. So if your color is 55678. It will search ONLY for 55678. But if your tolerance is say 10. It will search similar colors, and things like 55679, and 55677 would also come back as a positive match.


great, thanks:) one last question, how do i find out wich nubers to put for the start and end line or how to find out how big my box is.

Rich

2013-08-02 06:49:48

From: noodelz
great, thanks:) one last question, how do i find out wich nubers to put for the start and end line or how to find out how big my box is.


Open up Simba, target your client with the green crosshair tool, and you can see the current coordinates of your mouse in the bottom left of Simba, so all you need to do you is hover your mouse over the top left and bottom right corners of your box and record the coords.

djborec

2013-09-19 11:05:59

ACA only gives me errors nothing else on dual monitors

CynicRus

2013-09-30 15:13:34

What?

The Mayor

2014-07-07 23:35:45

Hey Cynic, I'm not sure if you still update this, but when I select the SMART window with the crosshair it just goes black


Olly

2014-07-08 00:00:13

From: The Mayor
Hey Cynic, I'm not sure if you still update this, but when I select the SMART window with the crosshair it just goes black



Expected, Dunno if this is designed to read DX & OpenGL colors.

The Mayor

2014-07-08 00:05:55

From: Olly
Expected, Dunno if this is designed to read DX & OpenGL colors.


Ah I was thinking that, since it can grab pother windows fine. Looks like i'll just use version 2 :)

SoulShare

2014-07-08 01:32:52

I recently made a little program in C# that allows you to slow down/orig speed your mouse with a keybind (toggle). I found it helped immensely when selecting individual pixels. I will try implement it in ACA with pascal if anyone is interested.

CynicRus

2014-07-08 14:43:41

From: The Mayor
Ah I was thinking that, since it can grab pother windows fine. Looks like i'll just use version 2 :)


Oh! Ty for the report, I will fix it soon:)

CynicRus

2014-10-10 04:07:54

Updated. The few bugs fixed, the dx apps grabbing added.

The Mayor

2014-10-10 04:24:12

From: CynicRus
Updated. The few bugs fixed, the dx apps grabbing added.


Thanks!

bonsai

2014-10-11 02:24:51

From: CynicRus
Updated. The few bugs fixed, the dx apps grabbing added.


Thanks for the update.

When I click one of the colors in my list on the right it doesn't display it in the detail window.

I know you put the zoom thing in the detail box but I still have a hard time selecting the pixels I want. A zoom for the main screen would be awesome.

The Mayor

2014-10-11 04:22:50

From: bonsai
Thanks for the update.

When I click one of the colors in my list on the right it doesn't display it in the detail window.


I already requested this. He's going to add it ;)

CynicRus

2014-10-13 01:43:03

@The Mayor; - i've done this suggestion, an attachment updated:)

The Mayor

2014-10-13 02:09:32

From: CynicRus
@The Mayor; - i've done this suggestion, an attachment updated:)


Working great, thanks!

Swatarianess

2014-11-04 08:59:26

Bump this, Will help with small test projects for the future!

fastler

2014-12-14 15:25:00

Why am I only now learning of this & CTS3? :D
I use dynamic interfaces in RS, and I noticed it doesn't mark pixels beyond the width of 900. :(

selgius7

2014-12-21 11:05:43

Error: Unknown declaration "MSCX" at line 41
Compiling failed.
Error: Unknown declaration "GetColorToleranceSpeed" at line 38
Compiling failed.

OUTDATED ?

CynicRus

2015-02-04 02:39:29

From: selgius7
Error: Unknown declaration "MSCX" at line 41
Compiling failed.
Error: Unknown declaration "GetColorToleranceSpeed" at line 38
Compiling failed.

OUTDATED ?


Nop, just the codegen is available only for PS. When I write that tool, the PS was the default. Also it generate the code for SRL5:)

If somebody will make the new snippet for SRL6 - I will update the tool.