![]() I also had a older version of AHK, so the first line #NoEnv caused an syntax error. The script keeps running but nothing happens. SetTimer IsClosed, 999 Exit script is clock is closed (the Window opens, but then the ahk script exits. I even tried to change "Date and Time" to "Datum und Uhrzeit".īut cant get it to work. ![]() Unfortunately on a German System it doesnt work at all. WinSet Region, 286-139 w120 h100 E, ahk_id %cID%ĭoes the trick and resizes/clips the window so only the clock is visible. But instead of grabbing the contents with PrintWindow you do it directy? interesting way to start the clock panel with. Hi, nice script, seems you have recycled my LiveWindows clock-demoīut you changed a lot in the sourcecode. If you want to download, the same script is also here. A mouse click pins the clock to its new location. If you select it, the mouse cursor moves to the center of the clock, and the clock would follow the cursor to a new location. The tray menu of the script contains “move”. If you make another window active, the clock gets back to its small form and jumps back to its previous position. from the tray) or click the taskbar icon, the moon clock will turn into the standard data/time settings, staying on the top. If you start the date/time settings applet of Windows (e.g. Only these numbers need to be tuned to non-standard settings. The top line contains the metrics of the clock, which might change with a different theme or personalization of Windows. This way you don’t have to move it that often. Pos(Full) It is somewhat different: The clock is semi-transparent, always on top and click-through, that is, mouse clicks activate controls beneath the clock. Return OK-Cancel: close clock! Click on Apply for changes MouseGetPos mX0, mY0 Mouse position at start of drag If (A_PriorHotKey = "~LButton Up" and A_TimeSincePriorHotkey < 500) ~LButton:: Double click toggles clock - full Date/Time window #IfWinActive ahk_group Group1 Group1 = Date/Time settings, in any language SetTimer IsClosed, 999 Exit script if clock is closed WY := -Round(oY-dY/2) Initial clock position XY := Round(oX-dX/2) "-" Round(oY-dY/2) Position of clock within control OY := cY + cH//2 - 1 -1/-2 <- Windows ThemeĭX := 0.75 * 150 Zoom factor * Diameter in x directionĭY := dx*A_ScreenHeight/A_ScreenWidth*4/3 Handle clock distortion, y-diameter OX := cX + cW//2 Origin = center of clock WinGetPos wX0, wY0, ahk_pid %PID% Default position of Date/Time settingsĬontrolGetPos cX,cY,cW,cH, ClockWndMain1, ahk_pid %PID% GroupAdd Group1, ahk_pid %PID% Work around forbidden variables in #IfWinActive Run rundll32.exe shell32.dll`,Control_RunDLL timedate.cpl`,`,0,PID Exitting the script also closes the clock. Click on Apply after changing time, to keep the clock open. If you close this window (also by clicking on OK or Cancel), the script exits. In full window mode you can set the time, the time zone or let the PC synchronize to an Internet time server. ![]() With the right transparency you can see both.Ī double click on the clock toggles it between full window or just the clock face. If you make the (thick enough) Taskbar its parent, you can keep it in there, maybe on top of the digital clock in the Tray. With editing the assignments to wX and wY you can choose the initial position of the clock. With left dragging you can move the clock to a place you like, it will stay there. We got an analog clock always on top, no external file is needed, but we are stuck with fixed size, and shape and color like the moon. We can cut it off and position anywhere on screen, and make it semi transparent. In Windows XP (maybe in other Windows versions, too) there is a small analog clock in the Date and Time settings window.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |