Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
View Poll Results: Are you interested in making or editing a CHT widget?
YES 82 95.35%
NO 4 4.65%
Voters: 86. You may not vote on this poll

Post Reply

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

OP poyensa

6th October 2011, 11:58 PM   |  #151  
poyensa's Avatar
OP Forum Moderator / Retired Recognized Developer
Flag mi patria en mis zapatos
Thanks Meter: 2,554
 
3,115 posts
Join Date:Joined: Apr 2010
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.
The Following User Says Thank You to poyensa For This Useful Post: [ View ]
7th October 2011, 12:24 AM   |  #152  
palokm's Avatar
Senior Member
Flag Bratislava
Thanks Meter: 154
 
542 posts
Join Date:Joined: Apr 2009
More
...............OK.................
Attached Thumbnails
Click image for larger version

Name:	Screen01.jpg
Views:	28
Size:	75.8 KB
ID:	742109  
8th October 2011, 08:54 PM   |  #153  
rat_2665's Avatar
Retired Recognized Developer
Thanks Meter: 200
 
609 posts
Join Date:Joined: Jan 2010
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.
The Following User Says Thank You to rat_2665 For This Useful Post: [ View ]
9th October 2011, 04:21 AM   |  #154  
RoryB's Avatar
Recognized Developer
Flag Lexington
Thanks Meter: 738
 
2,822 posts
Join Date:Joined: Sep 2008
Donate to Me
More
Help please
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
		_application.Store:SetIntValue(Lifetime_Permanent, "CHT.VoiceCommand.Active", 0)
		if Filetimer then
			Filetimer:Stop()
			Filetimer = nil
		end
	end
9th October 2011, 06:57 PM   |  #155  
RoryB's Avatar
Recognized Developer
Flag Lexington
Thanks Meter: 738
 
2,822 posts
Join Date:Joined: Sep 2008
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
				_application.Store:SetIntValue(Lifetime_Permanent, "CHT.VoiceCommand.Active", 1)
				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
				_application.Store:SetIntValue(Lifetime_Permanent, "CHT.VoiceCommand.Active", 0)
				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  
RoryB's Avatar
Recognized Developer
Flag Lexington
Thanks Meter: 738
 
2,822 posts
Join Date:Joined: Sep 2008
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  
RoryB's Avatar
Recognized Developer
Flag Lexington
Thanks Meter: 738
 
2,822 posts
Join Date:Joined: Sep 2008
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  
RoryB's Avatar
Recognized Developer
Flag Lexington
Thanks Meter: 738
 
2,822 posts
Join Date:Joined: Sep 2008
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
File Type: zip CHTW_Rory_AppTask.zip - [Click for QR Code] (65.9 KB, 3 views)
12th October 2011, 09:48 PM   |  #159  
poyensa's Avatar
OP Forum Moderator / Retired Recognized Developer
Flag mi patria en mis zapatos
Thanks Meter: 2,554
 
3,115 posts
Join Date:Joined: Apr 2010
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
File Type: zip Co0kieEmail.Mode9.6AC2AE17_manila.zip - [Click for QR Code] (2.4 KB, 2 views)
12th October 2011, 10:07 PM   |  #160  
RoryB's Avatar
Recognized Developer
Flag Lexington
Thanks Meter: 738
 
2,822 posts
Join Date:Joined: Sep 2008
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.
Last edited by RoryB; 12th October 2011 at 10:27 PM.

The Following User Says Thank You to RoryB For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Tags
cht, lua, mode9, poyensa, widgets
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes