Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Awesome Desktop Clock


  • Please log in to reply
42 replies to this topic
tic
  • Members
  • 1934 posts
  • Last active: May 30 2018 08:13 PM
  • Joined: 22 Apr 2007
Hi Uberi

This is untested, but perhaps instead of SetParent you could use SetWindowPos with hWndInsertAfter being WinExist("ahk_class Progman") and then set exstyle WS_EX_TRANSPARENT 0x00000020 to your clock so that it cant be clicked....or override its OnClick event

Would be great to be able to customize it from a gui to be larger/smaller/other colours

Uberi
  • Moderators
  • 1119 posts
  • Last active: May 02 2015 06:05 PM
  • Joined: 23 Aug 2010

This is untested, but perhaps instead of SetParent you could use SetWindowPos with hWndInsertAfter being WinExist("ahk_class Progman") and then set exstyle WS_EX_TRANSPARENT 0x00000020 to your clock so that it cant be clicked....or override its OnClick event


I have tried this technique, as well as "WinSet, Bottom", but having to disable the window to keep it below other windows would disable dragging. Would it be possible to draw everything onto an offscreen buffer, and BitBlt it onto a non-layered window?

Would be great to be able to customize it from a gui to be larger/smaller/other colours


A dialog for changing the colors has been added to the latest version (in the tray menu). However, changing the size is not supported.

tic
  • Members
  • 1934 posts
  • Last active: May 30 2018 08:13 PM
  • Joined: 22 Apr 2007
Yes, but don't use onmessage to drag the window, so a timer should be setup for updating your clock, and in that sub check if lbutton is down and on the gui, and then updatelayered window accordingly to simulate dragging. i have used this a number of times when a zero focus window is needed

Uberi
  • Moderators
  • 1119 posts
  • Last active: May 02 2015 06:05 PM
  • Joined: 23 Aug 2010
Restructured, now automatically saves color settings. The dragging functionality will come soon.

DDR
  • Members
  • 4 posts
  • Last active: Dec 28 2010 10:24 AM
  • Joined: 28 Dec 2010
Niiiice clock!
I started it up, and my first reaction was "Oh my sweet lord, is it really this late? ... yep. Bother."
The second reaction was "Niiiice clock!" :D
Now it's set to start on startup.

Pio
  • Members
  • 19 posts
  • Last active: Feb 27 2011 07:32 PM
  • Joined: 13 Jan 2011
Wow, this looks very nice! Unfortunately for me just the image you posted... The clock doesn't show up for me, no error etc. I can go to settings, but nothing.
My system is Win7-x64 and AHK_L 1.0.92.00...
Am I doing something wrong?

Uberi
  • Moderators
  • 1119 posts
  • Last active: May 02 2015 06:05 PM
  • Joined: 23 Aug 2010

Wow, this looks very nice! Unfortunately for me just the image you posted... The clock doesn't show up for me, no error etc. I can go to settings, but nothing.
My system is Win7-x64 and AHK_L 1.0.92.00...
Am I doing something wrong?


Well, if you're using the Unicode or 64 bit editions of AHK_L, that would be the most likely cause of the problem, as I have not tested the script on these builds.

As I will soon be migrating all my code to AHK_L, expect to see full AHK_L compatibility within a few weeks at most. In the meantime, I have tested all scripts on AHK Basic 1.0.48.05, and so it should work on this version. A compiled version has also been uploaded here, if you do not want to install AHK Basic:

<!-- m -->https://ahknet.autoh...Uberi/Clock.exe<!-- m -->

Pio
  • Members
  • 19 posts
  • Last active: Feb 27 2011 07:32 PM
  • Joined: 13 Jan 2011
Yes, thats probably it (I'm using unicode, 64bit). The .exe works perfect, very good work :)

fauzone
  • Members
  • 15 posts
  • Last active: Jun 21 2011 05:05 PM
  • Joined: 17 Jan 2011
That's really awasome work!

I wonder what should I do to mirror the appearence of the clock? Just in order to adapt with my desktop layout.

Uberi
  • Moderators
  • 1119 posts
  • Last active: May 02 2015 06:05 PM
  • Joined: 23 Aug 2010

I wonder what should I do to mirror the appearence of the clock?


As all angles have been hardcoded, it is rather difficult to make certain changes such as rotation, flipping, or scaling. However, it is still possible, by reversing the angles of arcs in the "DrawClocks" routine (the last to parameters to the DllCall's). Here is a script that will mirror angles:

Angle = 162 ;the angle to reverse
MsgBox, % Angle . ": " . (360 - Angle)

Additionally, the clock can be rotated by increasing each "StartAngle" value (second last parameter to DllCall) equally by some amount.

IsNull
  • Moderators
  • 990 posts
  • Last active: May 15 2014 11:56 AM
  • Joined: 10 May 2007
Very good design man! 8)

Uberi
  • Moderators
  • 1119 posts
  • Last active: May 02 2015 06:05 PM
  • Joined: 23 Aug 2010
Update:

[*:vpjee986]Now compatible with AHK_L! Executable version will no longer be provided, since everyone can now use their AHK version of choice.
[*:vpjee986]More polish: right click the clock or the tray icon to open the settings dialog, color picker appears at the settings window's position, settings saved on exit.
[*:vpjee986]Window position is remembered. Script will remember where the clock was placed on exit, and restore the position on start.
[*:vpjee986]Unused GDIP resources are freed, there shouldn't be any more memory leaks.

Cachito
  • Members
  • 11 posts
  • Last active: Sep 27 2011 10:12 AM
  • Joined: 06 Mar 2009
I'd really like to give this a shot. Any ideas on what I can do to get it running?

WinXP Home SP2
AHK 1, 0, 47, 06

gdip.dll is not installed on my system


Posted Image

Cachito
  • Members
  • 11 posts
  • Last active: Sep 27 2011 10:12 AM
  • Joined: 06 Mar 2009
Never mind.

Installing ahk 1, 0, 48, 05 solved the problem.

Oan
  • Members
  • 5 posts
  • Last active: Sep 11 2011 04:35 PM
  • Joined: 24 Jul 2011
aww didn't work for me
added a cool settings ini file on my desktop


w7 64 bit - AutoHotkey_L