Jump to content

Recommended Posts

STEP 1

Recreate the GUI part.

That means, making a copy of the script, that I bit by bit remove sections of code from.

The first lot of code, will be all the GUI related code, which I will convert to my style - declarations, layout, naming conventions, etc.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Thanks buddy, from what my re-investigations so far have revealed, I will need it.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Added source for original script to first post, along with a screenshot.

BLOG
Not an auspicious start so far.

Not long after starting this topic, and before I started any work on the project, I got a visitor who stayed for 3 hours. I also got some kind of infection or virus out of nowhere which drove me to the Loo for a pee every 5 to 15 minutes (today, that has all but disappeared, after plaguing me all day yesterday) ... could be alcohol related as I don't drink much these days, but did partake a bit more than my usual the night before, with some Moscato ... a piddly (sic) amount by the regular standards of most people ... but I do have a low alcohol tolerance these days ... my body treats it like a poison ;).

Anyway, I eventually made a start yesterday, and worked on things for a couple of hours, which eventuated in a bit of code. I have done some more code etc today.

Here's what I did yesterday, which you can try if you like. It doesn't do much other than save code for a blank GUI, which you can determine the size of.

Project.au3

background.bmp  (required resource to show grid pattern)

NOTES - I'd forgotten what a complex mess the GuiBuilder script is, and so I have come to the conclusion that I may just fail in this project. I will try hard not to though. At the moment I am just extracting the basics and working on modifying them, based on how much I understand plus my AutoIt/coding experience & knowledge. However, those last, may not be up to the task.

My investigations so far, have led me to believe that the script, by today's standards is full of a lot of unnecessary crap. A lot of things that are declared, are part of the standard Include files now, so I should be able to strip most, if not all, of them out. But already there are a bunch of things I don't understand, and a lot of magic numbers being used.

So it looks like I will be building from the ground up, extracting bits as I go, and getting them working, before I move onto the next lot ... which of course, means understanding what is going on.

I am guessing, that a lot will end up being trial & error.

In the end, if I don't understand enough to do as I hoped, I will hopefully at least, have a working update that works with latest AutoIt. That is the most important thing I guess.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

9 hours ago, TheSaint said:

In the end, if I don't understand enough to do as I hoped, I will hopefully at least, have a working update that works with latest AutoIt. That is the most important thing I guess.

 

Indeed, that's the most important part ;), no benefit if you cannot use that with the latest version :D

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

Here's what I did yesterday, which you can try if you like. It doesn't do much more than my previous script, but some visual elements are now working on the Toolbar GUI. NOTE - The icons don't look as good anymore, see the Blog below for an explanation. At a later date I may improve the icons.

Some of many coding improvements
The 'Settings' menu item, had one entry (Show hidden controls) that didn't do anything, which I renamed and got working (just shows/enables the greyed out buttons). Win API is now used to repaint the Main window, instead of Splash work-around. Etc.

Project.au3

(Resources required)

IconSet.icl  (32 bit)

blank.bmp

(original resource)

IconSet.zip  (16 bit) ... doesn't work in Win 7 ... or beyond I imagine.

BLOG

Well, a goodly amount of time was wasted yesterday, mostly dealing with non code stuff for the project.
I'd done a chunk of code earlier in the day, but then had some issues when testing a compiled version on my Win 7 Netbook.
One, menu items on the Toolbar GUI weren't locating where they should be, and two, the button icons on the Toolbar GUI weren't showing.

At that point, it was obvious it was time to install AutoIt on my Netbook, for the first time.

Up until yesterday, all my coding in recent years, has been on my Win XP Laptop, with the latest version of AutoIt being v3.3.0.0. I won't go into all the reasons for that, because there are a few, but chief among them, was not having AutoIt on my Netbook, in case I be tempted to do coding while away on holiday, as the Netbook usually goes with me. Another good reason, is that my Laptop is a more powerful machine and has a better coding environment, not least of all because of its much larger new external monitor, but also because it is zippier, has a better external keyboard and a more comfortable computer chair. It also has a lot of stuff installed and setup on it, that assist and improve my coding experience ... some of which, are why I haven't upgraded beyond v3.3.0.0 of AutoIt.

So, I installed the latest version of AutoIt (September 2015), but had issues with the install. I started drafting a topic for the MVP Chat section, to discuss those issues, but then later wisely decided not to publish. That was my first real wastage of time. In the end, I just uninstalled, checked and backed up a few Registry entries, then deleted them.

I then re-installed the latest version of AutoIt, and things went well enough, mostly due to my Registry changes, but also because I realized why C:\Program Files wasn't presented as the fallback when deciding to install to other than the default location. I still see it as an issue, but one with the Installer program itself. Chiefly you need to remove the 'AutoIt3' portion of the default path, so that a non-existent path is not the starting off point for browsing. I hadn't thought to do that first time around, and so the top of the tree (probably Desktop) was presented to me ... which always annoys me greatly ... having to then work my way back down the tree to C:\Program Files. Just for the record, I install to C:\Program Files\Tools\AutoIt3.

The second, more important issue I had, which was why I had decided to start the topic I never published, was in relation to right-click options. I had never installed AutoIt on my Netbook before, but I had some time ago, manually installed the latest Help file (for the time), and then later SciTE to C:\Program Files\AutoIt, and also created some Registry entries. Those last got screwed by the first install, while at the same time ensuring that new right-click entries didn't work. Obviously some parts of my original entries, were named other than expected, and the only sensible solution, was to uninstall and make the changes I mentioned above, then re-install.

So anyway, a good amount of time was wasted getting all that done, but at least I now have the latest AutoIt installed and seemingly working properly. However, due to the time wasted with that and later issues, I never did get around to installing the full version of SciTE yet.

With AutoIt finally up and running, I decided to deal with the two Toolbar GUI issues. I tackled the Menu item (button) placement issue first.

On my Win XP Laptop, with original settings, I had 3 rows of Menu buttons (items), made up of three buttons on first row (Settings, Properties, Exit), three on second row (LoadTemplate, Info, Vals) and two on the third row (SaveTemplate, About). Some of the keener eyed amongst you will have noticed, that I have replaced the original 'Definition' text with 'Template', which to my mind, is a more accurate description, that also has the benefit of being a little shorter. After those three rows, there is 7 rows of Control buttons, in 3 columns. They all display correctly on my Win XP Laptop.

On my Win 7 Netbook however, I instead have 4 rows of Menu (items) buttons ... obviously some kind of font related issue, that causes extra wrapping, with the result that things not only look crap, but the 7th row of buttons are only half showing in height, truncated by GUI height.

It must be noted, that wrapping was already in play, due to the width of the Toolbar GUI, as on a wide enough GUI, all those Menu buttons would be on one line at the top.

I thought that the quick easy solution, would be to change either the default GUI font, or the font of the menu buttons themselves. But after much mucking around, that proved a non event, and just didn't work. I went all the way down to Small Fonts and Size 6, with no visible change to Menu items. So that was another waste of time. I then had no option, but to resize the GUI and Control buttons, which took a bit of trial & error to accomplish the right values. So buttons that were originally 50 x 50 pixels, in the end were 56 x 56 pixels, and the GUI widened by about 18 pixels, until Menu (item) buttons would display correctly. I also had to increase the GUI height to match.

So with that finally fixed, I addressed the non showing icon images.

The Control buttons, are in fact, Radio buttons, acting as push buttons. At first, I thought it may be an issue related to numbering, but after tinkering a little to no success, I then went online to investigate. It quickly became obvious that the problem was probably related to 16 bit ... and Win 7 does not support such an (.icl)  Icon Library file. So I then went searching for freeware conversion solutions, which proved to be harder than I thought.

In the end, I had to extract each icon, using IrfanView on my Win XP Laptop, then on my Win 7 machine, use a fully working trial program (GConvert 5) to recreate the Icon Library file (.icl), and that worked for the Toolbar GUI, and the icon images now show, if not as nicely as the original on Win XP. Win 7 obviously uses a different shade of grey as the default button color. After extracting the icons with IrfanView, it appears they were already converted to 32 bit, so I didn't need to do anything in that regard.

Most of the time I wasted yesterday, was in relation to fixing the icons ... finding the right program(s). None of the programs I tried, and there were several, would recognize the original Icon Library file. The ones that actually supported ICL files, kept saying there were no icons inside our file, GConvert 5 included, despite what I had been led to believe. Even IrfanView on Win 7 refused to see any icons too.

In the end, all was solved, but by then I had no more time or energy for more coding that day. I also started feeling unwell again by that time.

Today, I am just relaxing so far, doing this post, and I may or may not do any coding ... including installing full version of SciTE.

SCREENSHOTS

Before the fixes.

Before.png

After the fixes.

After.png

Edited by TheSaint
improvements

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

BLOG

None of what I am saying in this post, is a criticism of CyberSlug, as I feel I am all too aware of how and why GuiBuilder was just whipped up the way it was. In fact, it feels like something slapped together from various bits and pieces and rearranged often, both adding & removing elements as the experiment advanced. I don't think it was ever meant to live for long. Neither is it a criticism of others who have also tinkered with the code.

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

Well, after having a break from coding for a few days, I felt sufficiently refreshed today to dig deep, and that is what I did.

After a few hours of good solid work, I eventually became so confused with several elements, that I had to stop and consider my options.

In the end, I decided to integrate what I had done so far, with the original code, cleaning up the original code as I went. Then in a day or five, I would try again, from a better position.

The re-integration & cleanup initially went well, but I was increasingly becoming more and more confused, as I realized just how bad a state the original code was in. There are several reasons why I don't like working with other people's code, and top of that list would be mistakes and bad practices that hamper your understanding, as well as concepts beyond my skill-set. I fear this ticks all the boxes in that regard.

You have variables that appear in both upper and lower case, and the same or others declared in both the Local and Global scope. You have elements that have been declared, but are not in use, looking important but not actually doing anything. I generally like short variable names, but single letters that are used for one thing one moment and something very different the next, that would only work (if some of them are indeed working), because they are in the Local scope. Then you have double letter ones, etc. Often it seems to me, you could get rid of most of them, because many seem to be doing the same thing, but following the logic to determine this, is an agonizing process. With very little comments and variable names not descriptive enough, it has become a nightmare, that would take a mountain of work to fix. Add to that the degree of difficulty from my lack of understanding of some things, and I fear to proceed lest some untoward thing happens, when I run the code eventually. And then there is the good chance of failure after all that work, and then because I have committed that far, continuing to reach for a solution, perhaps futilely. So wasting my time is also of great concern.

I definitely don't know enough, to be a good troubleshooter of other people's code, especially when I come across seeming mysteries and contradictions or conflicts in the code.

Honestly, it is a wonder the program actually works as well as it does.

I think I can see why CyberSlug hasn't returned to it in many years ... and he understood it.

I must be remembered too, that when CyberSlug started work on this GUI builder, it was very much experimental ... being early days for GUI's with AutoIt, with many things we take for granted now, still being developed. So in a sense, GuiBuilder (AutoBuilder) was very much an exercise in proof of concept, as well as a very helpful tool at that time. CyberSlug, I am guessing, essentially abandoned his experiment, when others started to work on alternates and when Koda came along. I guess he was never counting on some like me, becoming passionately attached to his effort.

Where to from here?
Tomorrow perhaps, I will review things again, but it seems to me right now, that I should start again with the integration, and do no more than that. With any luck, that might mean the program is at least usable with latest AutoIt. If someone braver and smarter than me, then wants to take on the challenge of improving it further, then that would be great. I do like a good challenge, but it has to be an enjoyable one ... I like being creative and I like learning ... to a point. For me, it is as much about the journey as it is the result. If the journey becomes too unpleasant, then you do something else ... Life is too short to waste it on things you don't like doing.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

2 hours ago, TheSaint said:

There are several reasons why I don't like working with other people's code, and top of that list would be mistakes and bad practices that hamper your understanding, as well as concepts beyond my skill-set.

 

Very true

2 hours ago, TheSaint said:

With very little comments and variable names not descriptive enough, it has become a nightmare

Long variable names for the win :D

 

Regarding the original codebase, I think it is how exactly described by @TheSaint, It is just a proof of concept for GUIs in AutoIt... It was not written with long time development in mind, therefore, I think we should start fresh, borrowing some code but making everything consistent... consistency is the key ;)

 

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

On 23/1/2017 at 4:24 AM, TheDcoder said:

.....I think we should start fresh, borrowing some code but making everything consistent... consistency is the key ;)

The problem for me, is dealing with things I don't understand, which I was hoping to get insight on, but which to me, has just become too difficult ... they are beyond my skill level or pay grade. Chiefly, this is moving controls around and resizing them with your mouse. I only have a vague idea about all that, and from what code I have been able to make a little sense of, it seems that some Windows trickery is at play, which I don't know the rules of.

For starters, the program creates a miniscule GUI and then places a bunch of miniscule grippy handles to it, then resizes the GUI to full size. I don't understand any of the reasoning for that (only wild speculation & guesses). Not that I ultimately probably needed to, so long as it works and I do nothing to mess that up. I do however need to have some overall grasp of what is going on to make it coherent enough. So trying to get the big picture is the ultimate problem. Some things take precedence over others and need to ... and that is just the tip of this Iceberg.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

  • 5 months later...
  • 7 months later...

No clue, I am not familiar with the INS and OUTS of the Metro UDF. :blink:

GUIBuilder is a stalled project at this stage .... never been good at troubleshooting other people's code, unless I can get into their mindset, and the way GUIBuilder was developed makes that extremely difficult ... that and my own knowledge limitations ... especially with some of the concepts used ... beyond my paygrade. :'(

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

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...