Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,809,247 Members 47,844 Now Online
XDA Developers Android and Mobile Development Forum
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

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

Tip us?
 
poyensa
Old
#151  
poyensa's Avatar
Forum Moderator / Retired Recognized Developer - OP
Thanks Meter 2,551
Posts: 3,114
Join Date: Apr 2010
Location: mi patria en mis zapatos
Quote:
Originally Posted by palokm View Post
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: [ Click to Expand ]
 
palokm
Old
#152  
palokm's Avatar
Senior Member
Thanks Meter 146
Posts: 527
Join Date: Apr 2009
Location: Bratislava
...............OK.................
Attached Thumbnails
Click image for larger version

Name:	Screen01.jpg
Views:	28
Size:	75.8 KB
ID:	742109  
 
rat_2665
Old
#153  
rat_2665's Avatar
Retired Recognized Developer
Thanks Meter 200
Posts: 609
Join Date: Jan 2010
Quote:
Originally Posted by Dunc001 View Post
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.
HTC One X
ROM: 1.26.401.2
Radio: 1.1204.90.13

HTC HD2
ROM: HyperDroid-CM7-v5.8.0
ROM date: 27/01/12
Radio: 2.15.50.14
______________________________

rat_2665's special clocks
rat_2665's historical clocks
rat_2665's coloured notifications
rat_2665's glossy round transparent softkeys
rat_2665's CHT 2.0 clock widgets
rat_2665's CHT 2.0 weather widgets
The Following User Says Thank You to rat_2665 For This Useful Post: [ Click to Expand ]
 
RoryB
Old
#154  
RoryB's Avatar
Recognized Developer
Thanks Meter 683
Posts: 2,777
Join Date: Sep 2008
Location: Lexington

 
DONATE TO ME
Default 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
AT&T Samsung Galaxy S III running Quantum.4
Read About Me to see what I am working on & following like CHTS, Reminder and AppTask widgets, and CHT basic function tweaks. Also, Fixed CHT restarting when you have no tasks.
Mortscript | iniEditor | regEditor| MortScripts to toggle settings
Samsung Infuse 4G drowned. If you have one check out Scott's CM10 or CM10PA Firmware
ATT Fuze (HTC RAPH110) with Energy ROM: Energy.RAPHAEL.29022.Sense2.5.Cookie.2.0.Jul.06
HTC Wizard|See about me for my ROM collection and other work
 
RoryB
Old
#155  
RoryB's Avatar
Recognized Developer
Thanks Meter 683
Posts: 2,777
Join Date: Sep 2008
Location: Lexington

 
DONATE TO ME
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
AT&T Samsung Galaxy S III running Quantum.4
Read About Me to see what I am working on & following like CHTS, Reminder and AppTask widgets, and CHT basic function tweaks. Also, Fixed CHT restarting when you have no tasks.
Mortscript | iniEditor | regEditor| MortScripts to toggle settings
Samsung Infuse 4G drowned. If you have one check out Scott's CM10 or CM10PA Firmware
ATT Fuze (HTC RAPH110) with Energy ROM: Energy.RAPHAEL.29022.Sense2.5.Cookie.2.0.Jul.06
HTC Wizard|See about me for my ROM collection and other work
 
RoryB
Old
#156  
RoryB's Avatar
Recognized Developer
Thanks Meter 683
Posts: 2,777
Join Date: Sep 2008
Location: Lexington

 
DONATE TO ME
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.
AT&T Samsung Galaxy S III running Quantum.4
Read About Me to see what I am working on & following like CHTS, Reminder and AppTask widgets, and CHT basic function tweaks. Also, Fixed CHT restarting when you have no tasks.
Mortscript | iniEditor | regEditor| MortScripts to toggle settings
Samsung Infuse 4G drowned. If you have one check out Scott's CM10 or CM10PA Firmware
ATT Fuze (HTC RAPH110) with Energy ROM: Energy.RAPHAEL.29022.Sense2.5.Cookie.2.0.Jul.06
HTC Wizard|See about me for my ROM collection and other work
 
RoryB
Old
#157  
RoryB's Avatar
Recognized Developer
Thanks Meter 683
Posts: 2,777
Join Date: Sep 2008
Location: Lexington

 
DONATE TO ME
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.
AT&T Samsung Galaxy S III running Quantum.4
Read About Me to see what I am working on & following like CHTS, Reminder and AppTask widgets, and CHT basic function tweaks. Also, Fixed CHT restarting when you have no tasks.
Mortscript | iniEditor | regEditor| MortScripts to toggle settings
Samsung Infuse 4G drowned. If you have one check out Scott's CM10 or CM10PA Firmware
ATT Fuze (HTC RAPH110) with Energy ROM: Energy.RAPHAEL.29022.Sense2.5.Cookie.2.0.Jul.06
HTC Wizard|See about me for my ROM collection and other work
 
RoryB
Old
#158  
RoryB's Avatar
Recognized Developer
Thanks Meter 683
Posts: 2,777
Join Date: Sep 2008
Location: Lexington

 
DONATE TO ME
Default 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)
AT&T Samsung Galaxy S III running Quantum.4
Read About Me to see what I am working on & following like CHTS, Reminder and AppTask widgets, and CHT basic function tweaks. Also, Fixed CHT restarting when you have no tasks.
Mortscript | iniEditor | regEditor| MortScripts to toggle settings
Samsung Infuse 4G drowned. If you have one check out Scott's CM10 or CM10PA Firmware
ATT Fuze (HTC RAPH110) with Energy ROM: Energy.RAPHAEL.29022.Sense2.5.Cookie.2.0.Jul.06
HTC Wizard|See about me for my ROM collection and other work
 
poyensa
Old
#159  
poyensa's Avatar
Forum Moderator / Retired Recognized Developer - OP
Thanks Meter 2,551
Posts: 3,114
Join Date: Apr 2010
Location: mi patria en mis zapatos
Quote:
Originally Posted by RoryB View Post
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)
 
RoryB
Old
(Last edited by RoryB; 12th October 2011 at 09:27 PM.)
#160  
RoryB's Avatar
Recognized Developer
Thanks Meter 683
Posts: 2,777
Join Date: Sep 2008
Location: Lexington

 
DONATE TO ME
Quote:
Originally Posted by poyensa View Post
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.
AT&T Samsung Galaxy S III running Quantum.4
Read About Me to see what I am working on & following like CHTS, Reminder and AppTask widgets, and CHT basic function tweaks. Also, Fixed CHT restarting when you have no tasks.
Mortscript | iniEditor | regEditor| MortScripts to toggle settings
Samsung Infuse 4G drowned. If you have one check out Scott's CM10 or CM10PA Firmware
ATT Fuze (HTC RAPH110) with Energy ROM: Energy.RAPHAEL.29022.Sense2.5.Cookie.2.0.Jul.06
HTC Wizard|See about me for my ROM collection and other work

The Following User Says Thank You to RoryB For This Useful Post: [ Click to Expand ]
Tags
cht, lua, mode9, poyensa, widgets
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes