
Originally Posted by
Retro Scape
This is amazing! thanks so much for this, makes Era FB soooo much better!
I'm glad you like it. Just think, this all came about because I was tired of the default controls lol.
Time for an update! Autohotkey users now have the option to have a clock display on the bottom right of the screen like so:
Screenshot 2015-03-08 20.41.28.jpg
Note: This code was not created by me from scratch. I just edited this code to match with FB Era
To add this update to your current script just add the following blocks of code in the areas specified.
PHP Code:
//Clock button
t::
ifwinexist, clock
{
gui, destroy
return
}
ifwinnotexist, clock
{
//get the color of the window, and the position of the clock
PixelGetColor, CustomColor, A_ScreenWidth-2, A_ScreenHeight-61
TimePosX := A_ScreenWidth - 100
TimePosY := A_ScreenHeight - 122
Gui, +AlwaysOnTop +LastFound +ToolWindow // +ToolWindow avoids a taskbar button and an alt-tab menu item.
Gui, Color, %CustomColor% //set background color of the clock
Gui, Margin, 5, 45 //set margins to center the clock in the window
Gui, -Caption // Remove the title bar and window borders.
Gui, Font, s16,,Segoe WP //font size and type
Gui, Add, Text, vMyText cBlack, XXXXXXXXXXX // XX & YY serve to auto-size the window.
SetTimer, UpdateOSD, 1000 //update clock every second
Gosub, UpdateOSD // Make the first update immediate rather than waiting for the timer.
Gui, Show, W100 H150 x%TimePosX% y%TimePosY% NoActivate, clock // NoActivate avoids deactivating the currently active window.
return
UpdateOSD:
FormatTime, Time_a , h:m:s, h:mm tt
GuiControl,, MyText , %Time_a%
Gui, Color, %CustomColor%
return
}
This can be inserted almost anywhere after a return statement, but I recommend putting it at line 200 in the default script. After the return line for the v:: hotkey as pictured.
Screenshot 2015-03-08 20.58.40.jpg
To automatically run the clock when you start the script add this one line
PHP Code:
Send t // make sure the key here matches the key you specified before
Add this line somewhere before the a:: statement like pictured below.
Screenshot 2015-03-08 21.03.55.jpg
If anyone has any recommendations for future updates just leave a comment here. Also, leave a comment if there are any issues with the script. I'm no expert coder, but, I can see what I can do.