Page 2 of 4

Re: Request for help developing a new tool for TOAW

Posted: Tue Jul 25, 2023 6:22 am
by larryfulkerson
Okie Dokie: I've thrown together some code to give you the decimal number of a color you can pick from a color wheel. This is just a temporary toy to give me a chance to see what works. Meanwhile you can convert all the colors to those you want using this toy. I'm trying to find a way to package it up into an executable you can run on
your machine. Give me about 30 minutes to figure that out.

# this is just a test scaffolding to try different things
#
# snippet.py
#
#from statistics import geometric_mean
#---------------------------------------------------
import math
from tkinter import Button, Canvas, Label, Tk
from tkinter.colorchooser import askcolor
from tkinter.ttk import Sizegrip
from rich.console import Console
#
#----------------------------------------
root = Tk()
root.geometry("400x400")
root.resizable(True, True)

ReferenceChartPath = "reference color chart.jpg"
root.iconbitmap( ReferenceChartPath )

canvas = Canvas( width=400 , height=400)
canvas.grid(columnspan=10, rowspan=10 )
#l1 = tkinter.Label(text="Test", fg="black", bg="white")
AnswerLabel=Label( root, text="Your Decimal Number Will appear here", fg="white", bg="blue", border=3)
AnswerLabel.grid( row=2, column=0)
#-------------------------------------------------
sg=Sizegrip(root)
sg.grid(row=10, sticky="SE")
#----------------------------------------------------
def choose_color():
console=Console()
#console.log("\n line 29 Inside choose_color()\n")

ColorChosen = askcolor(title="Color Chooser")
DecimalNumber = ColorChosen[1]
#console.log("\n line 33 DecimalNumber= "+str(DecimalNumber))

# strip off the "#" character from the colorchooser
'''
str.replace(old, new[, count])
Return a copy of the string with all occurrences of substring old replaced by new. If the
optional argument count is given, only the first count occurrences are replaced.
'''
TempString = DecimalNumber.replace("#", "0x", 1)
#console.log("\n line 37 TempString= "+str(TempString))

DecimalNumber=TempString
#console.log("\n line 40 DecimalNumber= "+str(DecimalNumber))

dec_num = int(DecimalNumber,16)
#console.log("\n line 44 dec_num= " + str(dec_num) + "\n")

# TODO: some processing on the color we've calculated
# I gotta find a way to update the AnswerLabel's text attribute
AnswerLabel.config(text = str(dec_num))
#
#----------------------------------------------
GenericButton = Button( root, text="Pick your color")
GenericButton.config( activebackground="blue",
activeforeground="white",
background="blue",
bg="blue",
fg="white",
borderwidth="3",
command=choose_color)
GenericButton.grid(row=0, column=0)
#---------------------------------------------------
#
root.mainloop()
#
#-------------------------------------
Image

Re: Request for help developing a new tool for TOAW

Posted: Tue Jul 25, 2023 6:50 am
by larryfulkerson
Here's a link that may allow you to download the above application. Just install the two files into their own directory and you should be good to go [ the exe and the jpg ].

https://1drv.ms/u/s!Apv54pJnu32YgSHNvCu ... E?e=6XeDqf

EDIT: Anybody find any problems with the app?

Re: Request for help developing a new tool for TOAW

Posted: Tue Jul 25, 2023 5:28 pm
by rhinobones
larryfulkerson wrote: Tue Jul 25, 2023 6:50 am Here's a link that may allow you to download the above application. Just install the two files into their own directory and you should be good to go [ the exe and the jpg ].
Nice, works exactly as advertised. My eyes would like a larger font, but that’s not a showstopper.

Next step, maybe add a browser to load a specific COL file and unit counter matrix number. Would also need a Save As function to save changes in the target COL.

Might consider adding version numbers to the application file.

Best Regards

Re: Request for help developing a new tool for TOAW

Posted: Tue Jul 25, 2023 6:45 pm
by larryfulkerson
rhinobones wrote: Tue Jul 25, 2023 5:28 pm Nice, works exactly as advertised. My eyes would like a larger font, but that’s not a showstopper.

Next step, maybe add a browser to load a specific COL file and unit counter matrix number. Would also need a Save As function to save changes in the target COL.

Might consider adding version numbers to the application file.
(1) larger font
(2) FileOpenDialog to load *.COL file contents
(3) FileOpenDialog to save *.COL file contents
(4) I'm not sure what you mean by "unit counter matrix number"
(5) version numbers for the application

Okie Dokie. Stand by for news.

Re: Request for help developing a new tool for TOAW

Posted: Tue Jul 25, 2023 7:17 pm
by rhinobones
larryfulkerson wrote: Tue Jul 25, 2023 6:45 pm (4) I'm not sure what you mean by "unit counter matrix number"
That would be the icon number from what you called the "Reference Color Chart".

Regards

Re: Request for help developing a new tool for TOAW

Posted: Tue Jul 25, 2023 7:21 pm
by larryfulkerson
Ah so....

Thank you very much for your review. New version is in the works.

Re: Request for help developing a new tool for TOAW

Posted: Tue Jul 25, 2023 9:51 pm
by RedAss
Three years ago this would have been a fantastic application.

Actually, it still really is, but its secondary function is to highlight how much time I've likely wasted over the last three years doing this manually.

Thanks, smarter than me guys! I will be using in this in the future. Hopefully when time opens up for me again this will be on version 10.1.

Re: Request for help developing a new tool for TOAW

Posted: Tue Jul 25, 2023 10:04 pm
by larryfulkerson
So um.........good news you guys.....I've installed the GetFileName, GetInputData, and PrintTheData functions and they all work as advertized. Now the next trick will be to allow the user to change the colors and have the new color number(s) replace the old one(s) in the input file. And when the output file is ready to be written I'll have a "Save File" button to write out the new file into the same filename or a new filename depending on what the user wants.
Image

Re: Request for help developing a new tool for TOAW

Posted: Tue Jul 25, 2023 10:11 pm
by larryfulkerson
RedAss wrote: Tue Jul 25, 2023 9:51 pm Three years ago this would have been a fantastic application.

Actually, it still really is, but its secondary function is to highlight how much time I've likely wasted over the last three years doing this manually.

Thanks, smarter than me guys! I will be using in this in the future. Hopefully when time opens up for me again this will be on version 10.1.
Hey there RedAss dude. I'm going to make this tool as easy to use as I can so it won't need an operator's manual to go with it. Your input is valuable to me and I appreciate your ideas and hope you will keep your input coming in. I'm hoping to have something working for us sometime this week. I have been neglecting putting in some try: except: blocks to catch the exceptions so far and I dare say that it's probably going to ship with a bug or two in it and those I don't find while developing it will surely be found by it's users. After the fact as it were.

Re: Request for help developing a new tool for TOAW

Posted: Wed Jul 26, 2023 10:11 am
by Zovs
larryfulkerson wrote: ...
Larry your quite amazing.

You should take over the programming duties for TOAW IV and V.

I don't think the code is going to get updated nor patched ever again and with you fast work here I am sure you could whip TOAW into shape in no time!

Re: Request for help developing a new tool for TOAW

Posted: Wed Jul 26, 2023 11:04 am
by larryfulkerson
Zovs wrote: Wed Jul 26, 2023 10:11 am
larryfulkerson wrote: ...
Larry [you're] quite amazing.

You should take over the programming duties for TOAW IV and V.

I don't think the code is going to get updated nor patched ever again and with you fast work here I am sure you could whip TOAW into shape in no time!
Last I heard Bob Cross was in charge of the development work on TOAW and he suffered a heart attack about a year ago or more and that may indeed have slowed him down considerably. We will have to inquire via email or some similar method to ascertain his status now. As for the development of TOAW I honestly know whether or not it's ongoing or at a stand still or what. I remember having voluntered my services to Bob but so far nothing has come of that event. So I share in your pessimism. What to do about it? I'm not sure to be honest. We may indeed be shit out of luck. I honestly hope not. There is a lot that can be done yet to make TOAW even better and I have high hopes for patches and future version(s). We may need to do those ourselves. I'll investigate and see what I can do on my part. Keep your good ideas coming and don't give up yet.

Re: Request for help developing a new tool for TOAW

Posted: Wed Jul 26, 2023 2:01 pm
by larryfulkerson
An update: Bob listed his email as crossrl1@att.net and I sent him an email just now ( 06:58 Tucson time 7/26/2023) but haven't heard back yet. I'd like to invite more people than me sending him an email of inquiry and whishes for his wellbeing. I'll keep you all posted on subsequent events as they develop.

Re: Request for help developing a new tool for TOAW

Posted: Wed Jul 26, 2023 3:18 pm
by Curtis Lemay
larryfulkerson wrote: Wed Jul 26, 2023 11:04 am
Zovs wrote: Wed Jul 26, 2023 10:11 am
larryfulkerson wrote: ...
Larry [you're] quite amazing.

You should take over the programming duties for TOAW IV and V.

I don't think the code is going to get updated nor patched ever again and with you fast work here I am sure you could whip TOAW into shape in no time!
Last I heard Bob Cross was in charge of the development work on TOAW and he suffered a heart attack about a year ago or more and that may indeed have slowed him down considerably. We will have to inquire via email or some similar method to ascertain his status now. As for the development of TOAW I honestly know whether or not it's ongoing or at a stand still or what. I remember having voluntered my services to Bob but so far nothing has come of that event. So I share in your pessimism. What to do about it? I'm not sure to be honest. We may indeed be shit out of luck. I honestly hope not. There is a lot that can be done yet to make TOAW even better and I have high hopes for patches and future version(s). We may need to do those ourselves. I'll investigate and see what I can do on my part. Keep your good ideas coming and don't give up yet.
First of all, I post on this board almost every day, so I'm hardly AWOL (and anyone can check my posts via my profile). As I've posted many times, development continues, but it's a long process.

Larry is a member of the development team and has access to the development board. So...this post is hard to figure. Nevertheless, I've posted several updates on that board that seemed to get little if any attention from the team. Not that that is an issue since I can check things out myself. But, if you want to help, Larry....

Re: Request for help developing a new tool for TOAW

Posted: Wed Jul 26, 2023 3:56 pm
by larryfulkerson
First of all, thanks Bob for your post. You are alive after all. That's a good thing for sure. I'm encouraged and optimistic now. We all are I suspect. Also, I'm pretty sure that there's several programmers in the TOAW community that would love to help out somehow. I know I would. Please come up with something we can do to help you do what you do. A more transparent development process might help with that. So please consider keeping us in the loop. Second of all, thank you for your efforts in the TOAW project. If it weren't for you nothing would get done and we know it. Third of all, please realize that YOU are the most important component in this entire process. If you're not happy then nobody is happy. We are all at your service for whatever you might need of us. Have a wonderful day.

Re: Request for help developing a new tool for TOAW

Posted: Wed Jul 26, 2023 3:57 pm
by Zovs
Curtis Lemay wrote: Wed Jul 26, 2023 3:18 pm
larryfulkerson wrote: Wed Jul 26, 2023 11:04 am
Zovs wrote: Wed Jul 26, 2023 10:11 am

Larry [you're] quite amazing.

You should take over the programming duties for TOAW IV and V.

I don't think the code is going to get updated nor patched ever again and with you fast work here I am sure you could whip TOAW into shape in no time!
Last I heard Bob Cross was in charge of the development work on TOAW and he suffered a heart attack about a year ago or more and that may indeed have slowed him down considerably. We will have to inquire via email or some similar method to ascertain his status now. As for the development of TOAW I honestly know whether or not it's ongoing or at a stand still or what. I remember having voluntered my services to Bob but so far nothing has come of that event. So I share in your pessimism. What to do about it? I'm not sure to be honest. We may indeed be shit out of luck. I honestly hope not. There is a lot that can be done yet to make TOAW even better and I have high hopes for patches and future version(s). We may need to do those ourselves. I'll investigate and see what I can do on my part. Keep your good ideas coming and don't give up yet.
First of all, I post on this board almost every day, so I'm hardly AWOL (and anyone can check my posts via my profile). As I've posted many times, development continues, but it's a long process.

Larry is a member of the development team and has access to the development board. So...this post is hard to figure. Nevertheless, I've posted several updates on that board that seemed to get little if any attention from the team. Not that that is an issue since I can check things out myself. But, if you want to help, Larry....
Glad your well from your heart attack Bob!

Your health is the most important thing to watch over.

Re: Request for help developing a new tool for TOAW

Posted: Wed Jul 26, 2023 4:26 pm
by Curtis Lemay
Zovs wrote: Wed Jul 26, 2023 3:57 pm
Curtis Lemay wrote: Wed Jul 26, 2023 3:18 pm
larryfulkerson wrote: Wed Jul 26, 2023 11:04 am
Last I heard Bob Cross was in charge of the development work on TOAW and he suffered a heart attack about a year ago or more and that may indeed have slowed him down considerably. We will have to inquire via email or some similar method to ascertain his status now. As for the development of TOAW I honestly know whether or not it's ongoing or at a stand still or what. I remember having voluntered my services to Bob but so far nothing has come of that event. So I share in your pessimism. What to do about it? I'm not sure to be honest. We may indeed be shit out of luck. I honestly hope not. There is a lot that can be done yet to make TOAW even better and I have high hopes for patches and future version(s). We may need to do those ourselves. I'll investigate and see what I can do on my part. Keep your good ideas coming and don't give up yet.
First of all, I post on this board almost every day, so I'm hardly AWOL (and anyone can check my posts via my profile). As I've posted many times, development continues, but it's a long process.

Larry is a member of the development team and has access to the development board. So...this post is hard to figure. Nevertheless, I've posted several updates on that board that seemed to get little if any attention from the team. Not that that is an issue since I can check things out myself. But, if you want to help, Larry....
Glad your well from your heart attack Bob!

Your health is the most important thing to watch over.
That was in 2016. I'm fine now. I had a detached retina that took a few months to recover from two years ago. Right now, no issues.

Re: Request for help developing a new tool for TOAW

Posted: Thu Jul 27, 2023 12:05 am
by Cpl GAC
Sorry to hear of your passing, Bob. I can't believe it's been two years. It feels like I read your postings just yesterday.

Re: Request for help developing a new tool for TOAW

Posted: Thu Jul 27, 2023 2:48 pm
by Curtis Lemay
Cpl GAC wrote: Thu Jul 27, 2023 12:05 am Sorry to hear of your passing, Bob. I can't believe it's been two years. It feels like I read your postings just yesterday.
Posting from the grave. :D

Re: Request for help developing a new tool for TOAW

Posted: Fri Jul 28, 2023 8:19 pm
by RedAss
Curtis Lemay wrote: Thu Jul 27, 2023 2:48 pm Posting from the grave. :D
*SNIFF* That's just the sort of reply Bob would have made if he was still with us.

Image

Image

Re: Request for help developing a new tool for TOAW

Posted: Sat Jul 29, 2023 1:10 am
by Curtis Lemay
RedAss wrote: Fri Jul 28, 2023 8:19 pm
Curtis Lemay wrote: Thu Jul 27, 2023 2:48 pm Posting from the grave. :D
*SNIFF* That's just the sort of reply Bob would have made if he was still with us.

Image

Image
Well, I really will be in a grave if I wander around barefoot smoking a cigar and a cigarette (or is that a joint?).