Jump to content

How to get back my old decimal colors


stigma
 Share

Recommended Posts

Hey all,

Im returning to au3 after a long break from using it, and I see that there is now a new spy-tool, au3 that I need to get used to.

The problem is that it gives out values like this for example: 0x55A0FF

the old spytool gave out color values like a string of numbers, like (going off the top of my head here): 924536344.

It also seems like pixelgetcolor and such functions still use the long number striongs to determine color sooo.... I cant get them to work together now Razz

How can I see the number string values for colors in the new tool? im sure there must be a way....?

EDIT: some info i just came across indicates that the new tool may not have decimal support in yet at all. if thts the case, where can I get my old tool back from?

EDIT2: I even tried Dec(thehexacolorvalue) but that dosnt seem to produce the same number as pixelgetcolor does soo... id just like to work directly in the old values if I can to avoid confusing myself :)

-Stigma

Link to comment
Share on other sites

  • Moderators

Hey all,

Im returning to au3 after a long break from using it, and I see that there is now a new spy-tool, au3 that I need to get used to.

The problem is that it gives out values like this for example: 0x55A0FF

the old spytool gave out color values like a string of numbers, like (going off the top of my head here): 924536344.

It also seems like pixelgetcolor and such functions still use the long number striongs to determine color sooo.... I cant get them to work together now Razz

How can I see the number string values for colors in the new tool? im sure there must be a way....?

EDIT: some info i just came across indicates that the new tool may not have decimal support in yet at all. if thts the case, where can I get my old tool back from?

EDIT2: I even tried Dec(thehexacolorvalue) but that dosnt seem to produce the same number as pixelgetcolor does soo... id just like to work directly in the old values if I can to avoid confusing myself :)

-Stigma

Execute(0x55A0FF) or Dec("55A0FF") ... But all the functions translate the values to decimal correctly. I'm sure you're just making mistakes.

Edit for Example:

MsgBox(64, "Info", 0x55A0FF & @CRLF & Execute(0x55A0FF) & @CRLF & Dec("55A0FF"))
Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

stigma,

Welcome back to AutoIt! Things have changed a bit - from the help file:

"Earlier versions of AutoIt (prior to v3.0.102) used the BGR format for defining color - newer versions use RGB by default but this can be changed using the ColorMode option."

So you might be having problems there when translating from Hex to Decimal.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Execute(0x55A0FF) or Dec("55A0FF") ... But all the functions translate the values to decimal correctly. I'm sure you're just making mistakes.

Edit for Example:

MsgBox(64, "Info", 0x55A0FF & @CRLF & Execute(0x55A0FF) & @CRLF & Dec("55A0FF"))
Ok, I tested more and I found out that atleast how im running it now Dec(0x082EA0) and Execute(0x082EA0) gives me differnt numbers. Execute gives me a decimal that matches what I measure in the old au3info window, while Dec does not.

If these twoare supposed to give the same result, can you give me an idea of what might be wrong? I could allways jut use Execute I guess, but its allways good to know what cuases such an underlying problem since it might affect other things.

my quick&dirty test code for measuring some random pixel on my toolbar:

$test1X = 1781
$test1Y = 1176
$test1Color = 0x082EA0
$test1DecColor = Execute(0x082EA0)
sleep(3000)
UpdateToolTip($test1DecColor & " 536224");measured manually in old au3info with RBG colorspace, doublechecked. The tooltip cutsom function just displays the results on screen for debugging.
Sleep(9999999)

-Stigma

Link to comment
Share on other sites

Eh, did you even read my post above?

Yes, but quite frankly I didnt understrand what you meant by it. Remember, its been a long time since I coded, especially in autoit, so go easy on me.

If you could write a few sentences to comment on your code im sure it would dawn on me. it was not my intention to appear rude or inattentive.

EDIT: Hmm, is that Dec is to be used without the 0x in front, and Execute with it? I guess thats whats causing the differences?

-Stigma

Edited by stigma
Link to comment
Share on other sites

  • Moderators

Yes, but quite frankly I didnt understrand what you meant by it. Remember, its been a long time since I coded, especially in autoit, so go easy on me.

If you could write a few sentences to comment on your code im sure it would dawn on me. it was not my intention to appear rude or inattentive.

EDIT: Hmm, is that Dec is to be used without the 0x in front, and Execute with it? I guess thats whats causing the differences?

-Stigma

Without re-quoting you... I didn't use Dec(0xetc), I used the string version without 0x ... take a closer look :) ...

Edit:

But just so you know... I showed you in the message box, that 0xetc is the same as your decimal value you were getting before, so there is absolutely no need to use Dec() or Execute().

To prove this to you, take your Decimal value, and Wrap it with Hex($my_decimal_value, 6) and you'll see they are the same viewed in a message box.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Ok thanks for the help everyone. I think I was able to wrap my head around it enough to avoid confusing myself atleast :)

it looks like my code is giving me correct results now after cleaning it up based on what I learned.

-Stigma

Link to comment
Share on other sites

it was not my intention to appear rude or inattentive.

Sorry if it sounded like that, but me neither :)... juts provided an example of code to transform the different codes into on another. Just an it an you'll see...

Best Regards

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...