How to Make an 'Analog Clock' with Notepad | The Analog Clock Project v.1.0 | Advance Batch | By Gls
The Analog Clock Project v.1.0 By Gls: Ever wondered about - "How simple and Easy Batch Programming language is?", "But, with Easiness - Comes Great Limitations!" That's why Achieving such beautiful output on the cmd Console is a Quite big Work for the Batch Programmers. The different colored Analog clock will make your computer much sexy. Just keep on reading about it below. You'll get the download link to the project too. I've Started this Analog Clock project v.1.0 and Digital Clock Project v.1.0 at the same time. while, you already know about the 10 line code of Digital Clock Project - So, that took only 1-2 Hours of work. On the other hand, This Analog Clock Project has taken - More time because of complexity of the project.
Here, in this article - I will talk about the problem those I've faced while creating such awesome Projects. So, You'll get the idea about it. And, maybe it'll help you in your future projects to solve similar problems easily.
In the First paragraph, We were talking about the - Limitations of Batch. But, We can remove those limitations by creating Right tools for the right purpose. As, You've probably remembered that- I keep on launching one or the other Batch Function / Plugin, Either created by Me or other amazing Programmer out there. These functions are tools for removing these limitations. And, That's How you can also Create beauties in your Projects too.
The Idea Generation:
Nothing special about it. Similar to all of my other projects, I was sitting free and watching towards the wall. The moment I moved my head a little up, I watched a Clock. And, I got excited about the thought. Most of you will think - I'm kinda crazy. But, Yeah! I think I am. If this gives me new ideas whenever i needed. I love to be a crazy person for rest of my life. 😓
How to Make an 'Analog Clock' with Notepad:
Making this project is not that much difficult. But, Setting up things for it takes all the time. Because, By looking at a clock you can say - what type of Batch Functions you gonna use in it. As, You may have probably noticed by Looking at the Output of Project - that we've used Following Plugins / Functions for this purpose:
Plugins Used for This Analog clock Project |
- Circle Function v.1.0 | By Gls - For Outbound of the Clock
- Awesome - Batbox Plugin | By Darkbatcher - For the Lightening Fast Updation of the Clock hands.
- Awesome - Fn.dll Plugin | By Anonymous - Making Default character size smaller - for high resolutions!
- Line Function v.1.0 | By Gls - For displaying the moving Clock hands.
After Getting all the plugins, and You know 'How to use them'. 90% of the work is done, without even writing a single line of code. All the rest 10% - is pure mathematical calculation of the position of circle, Clock Hands and Other things as Numbers of the clock. You can simply download the prepared project and you don't need to write all these lines of code. All you need is to understand the concept for your future projects.
Problems Faced While working on the Project:
While working on the project, I mainly faced three problems. And, they were genuine as we are working on Batch platform. But, creating this kind of output on any other programming platform must have taken more lines of coding than it requires in Batch programming. So, lets talk about these 3 problems in brief:
#1. Displaying Numbers as Time Identifiers:
Using The knowledge from - The Typography Function |
We can tell time by looking at the Numbers at which the hand of the clock is trying to point. So, Displaying these Numbers dynamically is quite a challenge. And, I solved this by using work of my previous project as 'Typography Function v.1.0'. I used the dynamic Font Code from the Pixel.Fo of the Typography Function. Which helped me in setting up the Traditional Analog Clock Layout on the CMD easily and Quickly.
Related Posts:
- How to make Simple Digital clock with Notepad? | The Digital Clock Project
- Speecher - A Pro Text-to-speech engine in Batch By PaperTronics
#2. The End Positions of the Clock Hands:
As all the Clock hands - Second, Minute And Hour Hand are Starting from the Center of the circle. So, We know the start positions of the lines, But Don't know about the End positions. And, Doing this thing dynamically will definitely take little more time to finish this project. But, then I thought to do it by the traditional Static Way. And, I created a Settings section in the Main File. Where all the Positions of the End points of each line is defined. So, this method saved alot of tension and time for the thinking of the dynamic solution. But, It killed all hopes of the dynamism of the project.
Creating Lines as Hands of the Clock |
But, This project still comes out one of the awesome creation of mine. I loved to see the Real time updataion and Working of it. And, You can also see the output - even if your laptop is far away from you. Just Because, of the large output size of the project.
#3. The Mechanical Displacement in Analog Clocks:
As the min. hand moves because of the second hand's one complete revolution. Similarly, Hour hand should also move slightly towards the next number as Minute hand is about to complete its revolution. In the regular / real mechanical clocks - this feature is due to the gear assembly and mechanical parts. So, to make it look like the real one. We need to copy the same output style. Thus, results in additional coding.
So, This is handled by mathematically calculating the position of the hour hand between current number and next number by keeping an eye on the position of the minute hand. And, Dividing the Minute by 12 will give you figure between 0 to 5. Which you can use to put the hour hand between required position of 0 to 5 after the current number.
So, That's all from my side. If you are still in doubt - Please Watch this video embedded below to better understand the concept and project. I Hope, you'll like it. If in Doubt, You can ask them in the comments. I'll not charge for them. You can also appreciate us. We'll feel alive again by reading them.
[Video]
And, if you are concerned about this being a fake trick to infect your PC. Then you can check the of the Project at THIS LINK. Here, This Project has passed all the test from the 57 Antivirus online. So, You are safe while having a look at it. We'll never infect you as we are here to earn trust & Help Others - Not some cheap tricksters. I Hope you'll like my Work. Show your love through comments. Thanks for your time."The most expensive thing in the world is TRUST."
Keep Learning, Keep Sharing...
#TheHacker
G(old): Hidden Files Detector by Gls
No comments: