|
| 01 May 2015 07:45 PM |
I pretty much want to expand my use of my PC and make it more customizable by programming it. I would like to start it by making a clock, but I don't know what programming language will be able to do what I want. The clock will be somewhere on the homescreen and it doesnt matter if my computer is connected to the internet or not.
Question:What programming will allow me to do this?
And I mean programming like (C++,C,C#,Phython,Javascript, etc.) |
|
|
| Report Abuse |
|
|
|
| 01 May 2015 07:46 PM |
| When I mean homescreen i mean desktop. |
|
|
| Report Abuse |
|
|
|
| 01 May 2015 07:49 PM |
| You already have a thread. No need to make another one, bud. |
|
|
| Report Abuse |
|
|
|
| 01 May 2015 07:52 PM |
none use any one you like you just need a engine
Save the plants! Plants > animals! |
|
|
| Report Abuse |
|
|
Qorm
|
  |
| Joined: 25 Jul 2010 |
| Total Posts: 1650 |
|
|
| 01 May 2015 07:53 PM |
| all of the above languages can make a clock |
|
|
| Report Abuse |
|
|
|
| 01 May 2015 07:57 PM |
do this install love2d then make a folder in your love2d directory make a file called main.lua make the file have this code:
function love.draw() love.graphics.print(os.date("*t", os.time())) end
Save the plants! Plants > animals! |
|
|
| Report Abuse |
|
|
|
| 01 May 2015 07:58 PM |
and then drag the folder to love.exe
Save the plants! Plants > animals! |
|
|
| Report Abuse |
|
|
|
| 01 May 2015 08:02 PM |
nevermind lua returns an encoded time
Save the plants! Plants > animals! |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 01 May 2015 08:05 PM |
If you are going in seconds, use these magical constants (not really magic, just basic math) [12 hour clock]: local secondConstant = 6; local minuteConstant = 1/10; local hourConstant = 1/120;
Those constants multiplied by the amount of seconds it has been (mod 43200 since 12 hour clock) will give you the angle needed (of course add 90 degrees so the 12 aligns up) |
|
|
| Report Abuse |
|
|
|
| 01 May 2015 08:10 PM |
@Qord I understand that but I would like it for my desktop I think theres a few that need http or something to work. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 01 May 2015 08:14 PM |
Oh it's in degrees, I got it from simply doing:
360 degrees in a circle / 43200 seconds (43200 seconds is how many seconds in 12 hours) and for minutes it's just / 3600 seconds since there is 3600 seconds in an hour etc etc |
|
|
| Report Abuse |
|
|