YES

82 Vote(s)
95.35%
NO

4 Vote(s)
4.65%

# [tutorial] How-To-Make-A-CHT-Widget

3,166 posts
Thanks Meter: 2,593

By poyensa, Retired Forum Moderator / Retired Recognized Developer on 23rd February 2011, 01:51 PM
6th October 2011, 11:58 PM |#151
OP Retired Forum Moderator / Retired Recognized Developer
mi patria en mis zapatos
Thanks Meter: 2,593

More
Quote:
Originally Posted by palokm

Yes I understand.
Only in this way would be the desktop clock changed automatically at 00:00

Poy6BG v2 ... uses this as a dark background for the widget
.................................................. ....................................

is a big problem converted to 512x256?

I tried to test

Try CHTwPoy6BG_v3.cab, now able to use any PNG as background, any size.

7th October 2011, 12:24 AM |#152
Senior Member
Bratislava
Thanks Meter: 170

More
...............OK.................
Attached Thumbnails

8th October 2011, 08:54 PM |#153
Retired Recognized Developer
Thanks Meter: 200

More
Quote:
Originally Posted by Dunc001

Hey Rat, long time my friend - hope you are well Wasn't that the code snippet you sent me which I could only figure out how to use if the current day was always in position 1 rather than the weekdays staying static and the current day moving (ie for Wednesday it would display WEDTHUFRISATSUNMONTUE and so on). Or did you have an idea for how to then match the current day with a string and then highlight the correct day string according to what 'today' is?

Yeah I'm well, but a little busy . So just an idea:
1. Create a sequence with the next day function (yes, it was the code snippet I sent you). First day is the actual day, f. e. WEDTHUFRISATSUNMONTUE.
2. Determine the numerical value x for the actual week day (here 3).
3. Change all positions x (here three) steps to the right. Of course for the last x positions greater 7 you have to start at the beginning. So you get for all x a static sequence like SUNMONTUEWEDTHUFRISAT.
4. Now highlight the x+1 Position. That's the actual day.
9th October 2011, 04:21 AM |#154
Inactive Recognized Developer
Lexington
Thanks Meter: 772

Donate to Me
More
This does not work for me. I never get the registry change even though the file is deleted earlier.

Code:
```Filetimer = timer(0.5)
Filetmer:Stop()
Filetimer.OnElapsed:connect(function()
if MusicHelper_FileExists("\\windows\\StartUp\\Voice Command.lnk") then
Filetimer:Start()
else
if Filetimer then
Filetimer:Stop()
Filetimer = nil
end
end```
9th October 2011, 06:57 PM |#155
Inactive Recognized Developer
Lexington
Thanks Meter: 772

Donate to Me
More
Figured it out from lockscreen lua. You need a timer that can be stopped if you do not have a need for it. So the "if not VoiceCmdCheckCount" does that. Then later in your code you start it again with the timer start command and setting "VoiceCmdCheckCount = 0"

Code:
```--## handler to check for \windows\startup\voice command.lnk
VoiceCmdCheck = function()
if not VoiceCmdCheckCount or VoiceCmdCheckCount > 60 then
VoiceCmdCheckCount = nil -- set counter to be "off"
VoiceCmdTimer:Stop() --stop after initializing or after 60 seconds
else
VoiceCmdCheckCount = VoiceCmdCheckCount + 1
if VoiceCmdStart == 1 then --starting voice command
if MusicHelper_FileExists("\\windows\\startup\\voice command.lnk") then --if \windows\startup\voice command.lnk exists
VoiceCmdCheckCount = nil -- set counter to be "off"
end
elseif VoiceCmdStart == 0 then -- stopping voice command
if not MusicHelper_FileExists("\\windows\\startup\\voice command.lnk") then --if \windows\startup\voice command.lnk is gone
VoiceCmdCheckCount = nil -- set counter to be "off"
end
end
end
end

--## timer to check for \windows\startup\voice command.lnk
VoiceCmdTimer = timer(1) -- one second
VoiceCmdTimer:Stop()
VoiceCmdTimer.OnElapsed:connect(VoiceCmdCheck)

-- In each part for start or stop voice command need

-- stop
VoiceCmdStart = 0
VoiceCmdCheckCount = 0 -- set counter to be "on"
VoiceCmdTimer:Start()

-- start
VoiceCmdStart = 1
VoiceCmdCheckCount = 0 -- set counter to be "on"
VoiceCmdTimer:Start()```
Now to see if I can figure out if MusicHelper has a process exists check
9th October 2011, 08:23 PM |#156
Inactive Recognized Developer
Lexington
Thanks Meter: 772

Donate to Me
More
MusicHelper_ProcExists("VoiceCmd.exe") and MusicHelper_ProcessExists("VoiceCmd.exe") do not work. The thing that is happening is the file deletes before the process ends so I would prefer to wait to toggle the switch image until after the process actually has been killed.

Even better than killing VoiceCmd.exe would be a command line switch to stop it, but I have not found any switches other than -min for starting it without it announcing itself.
11th October 2011, 10:55 PM |#157
Inactive Recognized Developer
Lexington
Thanks Meter: 772

Donate to Me
More
Anyone have the mode9 file for Co0kieEmail?

I am tweaking email to fit above the lock slider and if an account is empty it does not change. I think I need to see the mode9 to find the correct value to tweak for "no mail" version.
12th October 2011, 09:14 PM |#158
Inactive Recognized Developer
Lexington
Thanks Meter: 772

Donate to Me
More
Need help
I am trying to create a separate widget for AppTasks so I could have an appointment widget, a task widget and a separate AppTask widget. I must be missing something. I can get it to show up in edit mode, but with images of missed calls instead of test appointments. I does not get out of edit mode when I select done. I tried some other things and get the broken home tab where all widgets and links show up on a single tab page. You can see in the comments of the lua code the different things I have been trying. I hope someone can take what I started and help me fix it.

Thanks
Attached Files
 CHTW_Rory_AppTask.zip - [Click for QR Code] (65.9 KB, 3 views)
12th October 2011, 09:48 PM |#159
OP Retired Forum Moderator / Retired Recognized Developer
mi patria en mis zapatos
Thanks Meter: 2,593

More
Quote:
Originally Posted by RoryB

Anyone have the mode9 file for Co0kieEmail?

I am tweaking email to fit above the lock slider and if an account is empty it does not change. I think I need to see the mode9 to find the correct value to tweak for "no mail" version.

i hope it helps
Attached Files
 Co0kieEmail.Mode9.6AC2AE17_manila.zip - [Click for QR Code] (2.4 KB, 2 views)
12th October 2011, 10:07 PM |#160
Inactive Recognized Developer
Lexington
Thanks Meter: 772

Donate to Me
More
Quote:
Originally Posted by poyensa

i hope it helps

Thank you I'll start looking into it.

-------------------------

Yep, that helped me find the variable names I needed. Getting close to a beta.
13th October 2011, 04:31 PM |#161
Inactive Recognized Developer
Lexington
Thanks Meter: 772

Donate to Me
More
Anyone have the services lua files?

I used manila hash to get some of their names, but cannot find them in my phone.

In m9editor.names.txt I found these listed:
Quote:

\windows\htc\scripts\audio_manager_svc.luac
\windows\htc\scripts\contacts_database_svc.luac
\windows\htc\scripts\favorites_svc.luac
\windows\htc\scripts\io_svc.luac
\windows\htc\scripts\machine_status_svc.luac
\windows\htc\scripts\stock_svc.luac
\windows\htc\scripts\weather_svc.luac

I also see references to other services in lua code like:
Quote:

require("audio_manager_svc")
require("HomeService_svc")
require("contacts_database_svc")
require("shell_svc")
require("messaging_svc")
require("machine_status_svc")
require("launcher_svc")
require("appointment_svc")
require("worldclock_svc")
require("weather_svc")

I am trying to get a better understanding of the internal operation and anything I might be able to use for tweaking functions or features.

 Tags cht, lua, mode9, poyensa, widgets

 Guest Quick Reply (no urls or BBcode) Message: