Skip to content

Commit

Permalink
Finally
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Apr 13, 2019
1 parent 635c97d commit b0d8913
Show file tree
Hide file tree
Showing 75 changed files with 267 additions and 175 deletions.
21 changes: 20 additions & 1 deletion @Resources/Config/configvariables.au3
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,25 @@
#include <Misc.au3>
#include <String.au3>
#Include <File.au3>
#include <SendMessage.au3>

Func SendBang($szBang)
Local Const $hWnd = WinGetHandle("[CLASS:DummyRainWClass]")
If $hWnd <> 0 Then
Local Const $iSize = StringLen($szBang) + 1

Local Const $pMem = DllStructCreate("wchar[" & $iSize & "]")
DllStructSetData($pMem, 1, $szBang)

Local Const $pCds = DllStructCreate("dword;dword;ptr")
DllStructSetData($pCds, 1, 1)
DllStructSetData($pCds, 2, ($iSize * 2))
DllStructSetData($pCds, 3, DllStructGetPtr($pMem))

Local Const $WM_COPYDATA = 0x004A
_SendMessage($hWnd, $WM_COPYDATA, 0, DllStructGetPtr($pCds))
EndIf
EndFunc

Opt("TrayIconHide", 1)

Expand Down Expand Up @@ -62,7 +81,7 @@ While 1
Exit

Case $UpdateButton
ShellExecute("refresh.exe", $cfgRefreshCommand)
SendBang($cfgRefreshCommand)

Case $VariableInput
$NewVarValue = GUICtrlRead($VariableInput)
Expand Down
Binary file modified @Resources/Config/configvariables.exe
Binary file not shown.
10 changes: 6 additions & 4 deletions @Resources/Config/cvsettings.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Settings]
; Refresh your skin ... !Refresh * will refresh all
RefreshCommand=/!RefreshGroup TronMCP
; Refresh your skin ... [!Refresh *] will refresh all
RefreshCommand=[!RefreshGroup TronMCP]
; Name displayed in the Taskbar area
TaskbarTitle=Configure Tron MCP
; Window width; should match HeaderImage width
Expand All @@ -20,8 +20,10 @@ File1=..\..\Variables.inc
[Variables]
BgWidth=Width of the background skin
BgHeight=Height of the background skin
WeatherQ=Weather query for http://openweathermap.org
WeatherApiKey=API key for http://openweathermap.org
WeatherQ=Weather query for openweathermap.org
WeatherApiKey=API key for openweathermap.org
Latitude=Location latitude (find it on latlong.net)
Longitude=Location longitude (find it on latlong.net)
Drive1=Drive letter for drive 1
Drive2=Drive letter for drive 2
Drive3=Drive letter for drive 3
Expand Down
Binary file removed @Resources/Config/refresh.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions @Resources/Scripts/Milliseconds.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local offset, lastSecond, ms
local offset, lastSecond

function Initialize()
offset = os.clock()
Expand All @@ -11,6 +11,6 @@ function Update()
lastSecond = os.time()
end

_,ms = math.modf(os.clock()-offset)
local _, ms = math.modf(os.clock()-offset)
return ms * 1000
end
8 changes: 4 additions & 4 deletions @Resources/Scripts/PingPong.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@ local max, op, value, previous

function Initialize()
op = 1
flip = '0'
Flip = '0'
max = SELF:GetNumberOption('MaxValue')
previous = SELF:GetNumberOption('Value')
value = previous
end

function Update()
current = SELF:GetNumberOption('Value')
local current = SELF:GetNumberOption('Value')

if current > previous then
value = value + op * (current - previous)
else
if op == 1 then
op = -1
flip = '1'
Flip = '1'
value = max - current
else
op = 1
flip = '0'
Flip = '0'
value = current
end
end
Expand Down
19 changes: 19 additions & 0 deletions @Resources/Scripts/TimeToMinutes.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
function Initialize() end

local function isnil(str)
return str == nil or str == ''
end

function Update()
local value = SELF:GetOption('Value')
if isnil(value) then
return 0
end

local h, m = string.match(value, '(%d%d):(%d%d)')
if isnil(h) or isnil(m) then
return 0
end

return tonumber(h) * 60 + tonumber(m)
end
53 changes: 53 additions & 0 deletions @Resources/Scripts/ToLocalTime.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
function Initialize() end

local function isnil(str)
return str == nil or str == ''
end

function Update()
-- get input
local value = SELF:GetOption('Value')
if isnil(value) then
return ''
end

-- parse ISO date
local Y, M, D, h, m, s, zh, zm = string.match(value, '(%d%d%d%d)-(%d%d)-(%d%d)T(%d%d):(%d%d):(%d%d)([+-]?%d?%d?):?(%d?%d?)')
if isnil(Y) or isnil(M) or isnil(D) or isnil(h) or isnil(m) or isnil(s) then
return ''
end

-- get local time offset
local ho, mo = string.match(os.date('%z'), '([+-]%d%d)(%d%d)')

-- apply local offset
h = tonumber(h) + tonumber(ho)
m = tonumber(m) + tonumber(mo)

-- apply input offset
if not isnil(zh) then
h = h - tonumber(zh)
end
if not isnil(zm) then
m = m - tonumber(zm)
end

-- fix minutes outbounds
if m >= 60 then
h = h + 1
m = m - 60
elseif m < 0 then
h = h - 1
m = m + 60
end

-- fix hours outbounds
if h >= 24 then
h = h - 24
elseif h < 0 then
h = h + 24
end

-- format time
return string.format('%02d:%02d', h, m)
end
Binary file added @Resources/images/Moon/0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/21.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/22.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/23.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/25.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/26.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/27.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/28.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added @Resources/images/Moon/6.png
Binary file added @Resources/images/Moon/7.png
Binary file added @Resources/images/Moon/8.png
Binary file added @Resources/images/Moon/9.png
Binary file modified @Resources/images/Weather/00.png
Binary file modified @Resources/images/Weather/01d.png
Binary file modified @Resources/images/Weather/01n.png
Binary file modified @Resources/images/Weather/02d.png
Binary file modified @Resources/images/Weather/02n.png
Binary file modified @Resources/images/Weather/03d.png
Binary file modified @Resources/images/Weather/03n.png
Binary file modified @Resources/images/Weather/04d.png
Binary file modified @Resources/images/Weather/04n.png
Binary file modified @Resources/images/Weather/09d.png
Binary file modified @Resources/images/Weather/09n.png
Binary file modified @Resources/images/Weather/10d.png
Binary file modified @Resources/images/Weather/10n.png
Binary file modified @Resources/images/Weather/11d.png
Binary file modified @Resources/images/Weather/11n.png
Binary file modified @Resources/images/Weather/13d.png
Binary file modified @Resources/images/Weather/13n.png
Binary file modified @Resources/images/Weather/50d.png
Binary file modified @Resources/images/Weather/50n.png
Binary file added @Resources/images/date.png
Binary file modified @Resources/images/folder.png
Binary file modified @Resources/images/ram.png
Binary file modified @Resources/images/src/date.psd
Diff not rendered.
Binary file modified @Resources/images/src/folder.psd
Diff not rendered.
Binary file added @Resources/images/src/moon-icons.psd
Diff not rendered.
Binary file modified @Resources/images/src/ram.psd
Diff not rendered.
Binary file modified @Resources/images/src/time.psd
Diff not rendered.
Binary file modified @Resources/images/src/weather-icons.psd
Diff not rendered.
Binary file modified @Resources/images/src/weather.psd
Diff not rendered.
Binary file modified @Resources/images/time.png
Binary file modified @Resources/images/weather.png
Loading

0 comments on commit b0d8913

Please sign in to comment.