Recently I constantly found myself in situations where I'd badly need a flashlight. So I wrote a mortscript to help controlling the atom's camera flashlight more easily. Here's the code:
Code:
ErrorLevel off
Run "\Windows\SelfDiag.exe"
WaitForActive "Self Diagnostics",3
SendSpace
SendDown
SendDown
SendDown
SendDown
SendDown
SendDown
SendDown
SendCR
MouseClick 235,315
SendCR
Sleep 1000
While not question "Turn Flash off?", "Flash control"
EndWhile
MouseClick 5,315
MouseClick 5,315
SendCR
If you were new to mortscript, read more at its homepage. What you need to do is to install the program, save the above code into a plain-text file with ".mscr" extension (ie. flash.mscr) and "run" it.
Hope you'd like it.
Hi, this app is the one ive been looking for!!!......thanks!!!!....but do you know if this will work on HTC Hermes/tytn/trion etc?........
irv777 said:
Hi, this app is the one ive been looking for!!!......thanks!!!!....but do you know if this will work on HTC Hermes/tytn/trion etc?........
Click to expand...
Click to collapse
definitely NOT, sorry
Works only on the Atom. It doesn't do anything really complicated, just runs "Self Diagnostics" and go thru the process of turning on the flash for you. You could try hacking the script on your device(s) if it has a similar utility.
Awesome, works quite well with a couple of slight modifications 8)
Hi all,
I would love to have that option for sure. Any way that could be made into a cab for us boneheads who dont know how to write code.
Thanks so much.
Anyone has a handy application that you can use it to manipulate the flash please help
Does anyone know if Self Diagnostics has any command line parameters that could make it easier to access justhte one test?
Here's a way...
http://forum.xda-developers.com/showthread.php?t=286800
It works. Paste a flash.mscr shortcut at your Today's, Buttons or Softkey
and Voila, Flashlight on a keypress!
Cheers,
del0000
Hey zecoj,
Thx for this excellent little handy tool. I'm loving it.
Would be great if someone create a software for it...
With like:
1. Auto shut in 60 sec
2. Auto shut in 5 mins
Another general question, will this dmg the light???
Jack - yes it will.
V
@jackkkkk: mortscript is quite limited and I don't think it supports time-related functions. Atom's flashlight is just a led, not the typical flashlight you'd find in cameras. And the lifespan of a led light is pretty long, several to tens of thousands of hours. I'm not sure specifically about the Atom's led but 1000hours would do it for me
The "Flashlight" on the Universals is also just a led, but a few people have reported it burning out when left lit for ridiculous amounts of time. I don't see why it would burn itself out in normal operation, but just be weary of lighting a Robbie Williams concert with it. YMMV.
V
can anyone modify this to suit the hp 6828?
i cont seem the locate the dianogtics program
EDIT
Ok made a very simple script to activate the camera then turn the flash on. Will remain on for 30 seconds then exit.
Run "\windows\hpcamapp.exe"
Sleep 2000
MouseClick 15,160
Sleep 30000
MouseClick 15,15
Btw the "Sleep 2000" line is there to give a 2 second delay as it takes a while for my camara app to start.
Self Diagnostics Utility
Can someone send me a file SelfDiag.exe because i don't have it in my Atom's Windows\ dir?
zecoj said:
Recently I constantly found myself in situations where
Click to expand...
Click to collapse
Thanks, it work on my Atom Exec.
Yeah!
You could always try Artamarta Pocketlight
http://www.artamata.com/pocketlight/
It works on atom exec
it works perfectly on my atom...this really helps..thanks..Big hug!!!
Anybody have key for this program? 10x
hi, just would like to ask, if it won't damage the flash?
Credit goes to Cee'z for this:
http://my.opera.com/ceez/blog/pktorch
Related
Hi all,..
Is there a way to change the Backlight button on the universal so it activates the Camera light on the back of the device instead of turing on the backlight?
When possible the Universal becomes a pocket flashlight. Now when I want to activate the universal camera light I need to start up the camera software, It would be much quicket to just press the Light button to enable and disable the bright camera light. The Light button is now unuseful to me because the backlight automatticly turns on when tapping the screen, so no button needed...
anyone got a idea?
Best regards,..
Arjan
Now thats a damned good idea!! The backlight button is useless anyway.
Anyone here got the skills, I am afraid that I am just a lowly win32/KM developer...
Whats the best way to get into WM2005 coding?? Does it still require you to install 10,000 toolkits, or does Visual Studio 2005.net have the nessesaries? (if work ever sorts out our MSDN sub that is!)
Nigel
Paging buzz_lightyear! Paging buzz_lightyear!
buzz_lightyear to the rescue!
..... please?
As an almost entirely unrelated aside, you guys know that my program VJLumos, for the superbright screen, works on the Universal?
Doesn't make that much difference because it already has a nice screen.
V
Hi Buzz,..
Seems you know all about this schit. Can you tell uss if this is possible?
Regards..
arjan
vijay555 said:
As an almost entirely unrelated aside, you guys know that my program VJLumos, for the superbright screen, works on the Universal?
Click to expand...
Click to collapse
True, true... but the camera flash is trully bright!!! Even more than the screen!
I've checked the Win32 Mobile API and found nothing, so the solution must be in one of the HTC DLL's!
Disassembling Camera.exe in IDA didn't give big results neither... :?
I'll continue my reseach and post the results here!
Just wanted to keep this close to the top of the forum,
I would love this feature! Please please pretty please
Regards, Simon
Me To
would be great to have a portable flashlight with me all the time
Still triying, but until now, no success...
buzz_lightyear, can you give a hand here?
Realy hope anybody can find it out because this would be really great!!!
But can it be fixed?
Will this be possible?
not that I really know too much about all this kinda stuff, but MortPlayer refuses to recognise the button with a lightbulb on it even if you use the option that allows you to specify a hardware button by pressing it. Does this mean that this button is somehow hidded frm WM5 or am I being silly?
//Xi
MusicPlayer can recognize the button, I think it takes it as some kind of function button (F4 or F6 or something like that), so is definitely possible to use it.
I actually use it, after adding it to the registry. The button code is C8, so you just have to copy paste another button, and change any CX occurence to C8.
Key is HKLM/SOFTWARE/Microsoft/Shell/key/40CX
OK, so that's taken care!! Now to find HOW the camera turns the flash light on... I'm sure it's some kind of API..... :? :?
http://msdn.microsoft.com/library/e..._7effd1fa-1b3e-41ba-b176-42cb16dae7d4.xml.asp
i think this is done at driver level....
we might need to hook up with the camera driver dll, disassemble it and get the function names....
and then, need to write an app which will link up the dll at run time and call the fn....
apart from that, theres no simple way to do so using MS provided sdks for wm5....
S
dreamtheater39 said:
http://msdn.microsoft.com/library/en-us/still/hh/still/WIA_PropTable_7effd1fa-1b3e-41ba-b176-42cb16dae7d4.xml.asp
i think this is done at driver level....
Click to expand...
Click to collapse
I agree!! But I don't think that WIA is something to go thrue, since that applies to Win32 only!
That link was from the Desktop Windows DDK. The windows mobile DDK is a different beast.
I suspect the API will be similar tho. I very much doubt whether the camera app is going to directly call an IOCTL down in kernel mode to control the camera light (that would be crude!) It will be doing so via a user mode API. The key is going to be to find which DLL handles this and what the function name and format is!
Unfortunately although I write Desktop Windows drivers, I have not got the first clue about windows mobile programming - dont even know what tools to install!
Nigel
Just noticed something very odd: WM2005 emulator does NOT have camera.exe!!!
Camera.exe is the picture taking app on the WM2005! Where the hell is it?? Only on real devices (my Exec has it)?
ei99070 said:
Just noticed something very odd: WM2005 emulator does NOT have camera.exe!!!
Camera.exe is the picture taking app on the WM2005! Where the hell is it?? Only on real devices (my Exec has it)?
Click to expand...
Click to collapse
the wm5 sdk has the camera api exposed...however, no luck finding anything related to the flash light
i think its something htc has directly hooked up.
horrible MS they have to goof up somewhere ..... :evil:
i guess some disassembling is needed
buzz...where r u dude???
San
I would like to be able to program one of the buttons to turn on the flash, it takes too long to sometimes open the cammera so I would like to get the flash to go on.. (and on the brighter light also).. any ideas, links?
thanks
e..b
Nope - no solution as of yet. Your best bet is to go to the following thread, and choose "Watch this topic" at the bottom.. then just follow any updates to it:
http://forum.xda-developers.com/viewtopic.php?t=41642&highlight=flashlight - VJCandela - torch/flashlight on HTC Phones
Just to make this clear - at the time of this writing, vijay's utility does not work on the HTC Wizard. If anybody has an HTC Wizard to spare to send to him, he can probably make it work
any news on this one ?
or has anyone an idea where to look in the registry for it ?
i really like to have a litte prog or shortcut key for the flashlight to
function as a flashlight
vj has one
if you would read then u should have noticed this little part of text which says: vijay's utility does not work on the HTC Wizard.
offcourse i tried it and many others and even tried to alter the program
but since no-one knows what keys involved i thought i might bring this to
attention... hopefully someone will try and find this out as i think many
people would like to have this feature.
Ok, I'm probably gonna get flamed for this... heck I'm probably gonna flame myself for this
Is there an application to turn on and off the so-called flash on the camera without launching the camera app itself? In other words is there a simple way to use my $500 phone as a $0.50 LED light?
TIA,
Richard
try VJCandela ...... where? google knows it .....
k4sus said:
try VJCandela ...... where? google knows it .....
Click to expand...
Click to collapse
I thought that used the screen backlight - I specifically want to turn on the LED flash on the camera side...
Nope, I'm wrong - looks like it does exactly what I wanted:
http://www.vijay555.com/?Releases:VJCandela
I'll have to try it on the TyTn....
Thanks for pointing me in the right direction!
Richard
VJLumos for screen brightening. VJCandela for flash. VJPlumBum for stupidity.V
vijay555 said:
VJLumos for screen brightening. VJCandela for flash. VJPlumBum for stupidity.V
Click to expand...
Click to collapse
Hello vijay, is there any chance to have it working on Asus P525?, this ppc has the facility to record video with flash on.
I been trying your candela but dosen't work.
I can look into it - but it's not a device I've ever used so unlikely. Can you get me a rom dump? Thanks... V
Works!
vijay555 said:
VJLumos for screen brightening. VJCandela for flash.
Click to expand...
Click to collapse
Got it, and another confirmation that VJCandela works on the Hermes. Thanks for an awesome app!
vijay555 said:
VJPlumBum for stupidity.V
Click to expand...
Click to collapse
I might need two of those
Richard
vijay555 said:
I can look into it - but it's not a device I've ever used so unlikely. Can you get me a rom dump? Thanks... V
Click to expand...
Click to collapse
Can you have a look on here please :
http://forum.xda-developers.com/showthread.php?t=279777
or here
ftp://dlsvr02.asus.com/pub/ASUS/IA/P525/P525_V3320_WWE2nd.zip
I think that it will be enough for you, but please advice if you need more info.
Cheers mate.
also looking for a program for this. hope vijay can help us.
it says that doing this will cause permanent damage to the led
What does?
Leaving the flash on for too long will cause the flash to blow on some devices. Some guys have had it running for days. Some have blown it after a few hours.
I limit its use to 30 seconds I think, in VJCandela. However, you should use it with your own caution. But now, it won't blow your flash with a single use or whatever.
V
The LED is obviously over driven to make it bright enough for use with the camera and in normal use it is restricted to only short bursts.
PDA Paul said:
The LED is obviously over driven to make it bright enough for use with the camera and in normal use it is restricted to only short bursts.
Click to expand...
Click to collapse
With P525 if you are in video mode you can hold the led illuminated, so i think that if you don't use it for very long time the led will not be damaged.
Hello there vijay...
a question for you regerding vj candela and hermes...
you may have already noticed that when you use the flash light in hermes to take a picture with default camera apps...then the flash light up bit more (say double) brighter for a few second just in time of taking the picture...
so my question is it possible in ur apps (vj candela) to use that extra doubled light rather then the normal brightness??? its just a request i know that turning the flash in high mode may shorten the life span of the bulb but i just interested to see the implimentation...
and one more request...can you add a feature in ur vj candela so that when we use the hardware mode lightup then the screen brightness will turn it off automatically and will reverd back after the flash get off...
anyways thanks a million for what u have done for us all..
br.
Sajib
Maybe that's why this is damaging some devices, because it's using the brighter mode that only works in bursts with the camera.
Actually, I just did some quick testing using the ambient light sensor on my macbook pro (how's that for resourcefulness?). It's not exactly scientific, but whatevs.
I read the value of the ambient light sensor from the camera flash from a height of 10". This test was done with a Cingular 8525.
Turning on the flash in the camera program: 1024
Light from VJCandela: 1024
Light when turning of flashlight mode in the camera settings: 1200
Light during flash: 1450
So it appears that my theory was wrong. If anything, the camera flashlight is stronger than the regular flash mode. Although I suspect they are exactly the same - like I said this wasn't exactly a scientific way of testing...
Sorry, not sure if I understood the thread - the Camera app/Flash driver has a "burst" flash mode, a normal flash mode, and and off mode.
Burst flash is brighter then normal flash, and is used in the instant that you take the photo - this normally causes the screen to go off for a second though. My app uses "normal" flash mode, which should be safe for relatively short periods (eg 1 min). Burst flash is for a few seconds max I guess.
V
Any suggestions as to why when I try to download the cab file it opens the cab file in pocket ie? all I see is the text that makes up the file
timbouk said:
Any suggestions as to why when I try to download the cab file it opens the cab file in pocket ie? all I see is the text that makes up the file
Click to expand...
Click to collapse
Yeah, that bugged me when I first got my 8525. Try holding your stylus on the link and selecting "Save As," instead of just clicking on it.
Regards
Ben
Hey I'm looking for a mortscript that will check the status of the reg keys for new sms and new voicemail every 5 minutes or so and if the count is greater than 0 it will play my notification again (or any wave if that's easier) I had a search and could only find the treo alerts but that's more than I'm looking for.
i think than can be done....i will look into it tonight...if someone does not beat me to it...lol
Hey sorry it took me so long to get to this but i have been very busy and i wanted to make it just right. so here it is.
This script Checks for new sms and vmail every 5 min and plays any wav file you have specified.
First have mortscript installed then
simply extract the folder in this zip file to anywhere on your device. then run setnofitications.mscr and enter the full path(EX:"\examplefoler\examplewavefile.wav"(don't enter quotes)) to a wave file you would like played for vmail and sms. it will create a new folder in your programs menu called extra notify and place shortcuts to turn this feature on and off to configure it and to remove the shortcuts. it will also place a shortcut in your windows startup folder so to activate itslef at every boot. Hopefully this works as well on your phone as it does on my phoe(different phones like to act different)
UPDATE:For anyone who already has v0.5b run remove to clear the old shortcuts(i changed the names of them so it wont all work right if you don't do this before extracting the new files) then simply exract these files to the same place you have the current ones. then run upgrade.mscr to migrate your old notifications to the reg entries and run setnotifications.mscr to configure the on and off times. I'm leaving v0.5b up for now in case v0.8 causes issues. Report back on functionality. Anyone using this for first time follow steps in this post befor update.
let me know if you have any problems
Version History
V0.8
changed the way variables(configurations) are kept
added option to specify time to have notifications tunr off and back on
Cleaned up scripts to make them esier to work with
(i think that's it lol)
v0.5b
removed message when device boots up
V0.5
Notifications will now play even if device is in sleep mode.
V0.1
Initial Realease
Awesome! Thanks so much.
Not to be a pain but I should have mentioned that it would be great if it didn't run between certain times. That way it won't be keeping me up all night.
You can just use kaisernotification its a program that lets you customize the LEDs and also this feature is under "repeating alerts"
mssmison said:
Awesome! Thanks so much.
Not to be a pain but I should have mentioned that it would be great if it didn't run between certain times. That way it won't be keeping me up all night.
Click to expand...
Click to collapse
ok i w have a look at that...i'm sure it's possible i will just have to figure it out. give me a few days on this to make sure i get it right.
Awesome!
Thanks a tonne, I'm a little suprised no one has done this before.
mssmison said:
Awesome!
Thanks a tonne, I'm a little suprised no one has done this before.
Click to expand...
Click to collapse
yhea me 2...maybe they have but i don't mind doing it....i'm still learing mortscript so this was a great learing experience.
Grondinm said:
yhea me 2...maybe they have but i don't mind doing it....i'm still learing mortscript so this was a great learing experience.
Click to expand...
Click to collapse
You're a mortscript power house! I'll be using this one when it's done
Grondinm I promise you'll reach Nirvana if you manage to do this script!
I always wanted to do that also (lazy i guess), but now eventually I included it in my startup script.
Beside the missed calls or sms the script keeps bluetooth off unless needed (by GPS or handsfree).
Well done folks, now that's turning out to an interesting thread!
Until today I did just a few stupid scripts to perform soft-reset or setVolume, but with your scripts for reference I'll try to learn a bit more.
Just a question: where is the delay time instruction? I see a few "sleep" and don't know which is the right one.
Keep up the good work, MortScripters!
carrozza said:
Well done folks, now that's turning out to an interesting thread!
Until today I did just a few stupid scripts to perform soft-reset or setVolume, but with your scripts for reference I'll try to learn a bit more.
Just a question: where is the delay time instruction? I see a few "sleep" and don't know which is the right one.
Keep up the good work, MortScripters!
Click to expand...
Click to collapse
the last one. sleep(30000)has it sleep for 5 min before it checks again. the other sleeps are just to have it sleep for a fraction if theire is nothing to do....it would work without those...theire is also one for it to sleep 1sec between the check of sms and vmail so that both sounds don't play at the same time. Funny i started out the same way. making little scripts for text messaging purposes and volume and orientation.
Ha... I think any scripter started off like that. My first one went abd changed all of my reg settings, and copied clock and wallpaper, for s2u2. Saves plenty of time when updating
xd1936 said:
Ha... I think any scripter started off like that. My first one went abd changed all of my reg settings, and copied clock and wallpaper, for s2u2. Saves plenty of time when updating
Click to expand...
Click to collapse
My first script went around and deleted random registry entries and files... Wasn't too productive, but worked well!
well it's working but apparently I'm not inputing the path properly.
If the file is in the windows folder for example is my syntax //windows/blah.wav ?
mssmison said:
well it's working but apparently I'm not inputing the path properly.
If the file is in the windows folder for example is my syntax //windows/blah.wav ?
Click to expand...
Click to collapse
no the path would be \windows\blah.wav
I think it should be "\windows\blah.wav"
EDIT: Grondimn got there first! Ignore this post!
OK, here is the script I made, quite the same as previous examples posted before by very good people.
I just added MMS notification and tweaked delay (90 seconds for me).
Just a question: what do you think is the overhead of the device with this script running?
I mean: here we have a WHILE loop running continuously on the device. Are there "best practices" that a skilled programmer would use to make CPU and memory consumption as low as possible?
check=1
while(check=1)
sms=regread("HKCU" , "\System\State\messages\sms\unread","Count")
mms=regread("HKCU" , "\System\State\messages\mms\unread","Count")
call=regread("HKCU" , "\System\State\Phone","Missed Call Count")
if(call > 0)
playsound("\Windows\Alert-Tonic.wav")
sleep(1000)
else
sleep(100)
endif
if(sms > 0)
playsound("\Windows\Alert-Chime.wav")
else
sleep(100)
endif
if(mms > 0)
playsound("\Windows\Alert-Chime.wav")
else
sleep(100)
endif
sleep(90000)
endwhile
carrozza said:
OK, here is the script I made, quite the same as previous examples posted before by very good people.
I just added MMS notification and tweaked delay (90 seconds for me).
Just a question: what do you think is the overhead of the device with this script running?
I mean: here we have a WHILE loop running continuously on the device. Are there "best practices" that a skilled programmer would use to make CPU and memory consumption as low as possible?
check=1
while(check=1)
sms=regread("HKCU" , "\System\State\messages\sms\unread","Count")
mms=regread("HKCU" , "\System\State\messages\mms\unread","Count")
call=regread("HKCU" , "\System\State\Phone","Missed Call Count")
if(call > 0)
playsound("\Windows\Alert-Tonic.wav")
sleep(1000)
else
sleep(100)
endif
if(sms > 0)
playsound("\Windows\Alert-Chime.wav")
else
sleep(100)
endif
if(mms > 0)
playsound("\Windows\Alert-Chime.wav")
else
sleep(100)
endif
sleep(90000)
endwhile
Click to expand...
Click to collapse
Well i don't think memory is a big concern in this case cause the script file in only a few hundred KB and for cpu usage it is sleeping between the loops. i'm no programmer and i'm sure a experienced programer might find some flaws in this but it works for me and does not seem to be very draining.
Fellass:
I have recently checked out a vid of the X1, and it had a neat feature:
Some app to control LED lighting behavior.
-The circle led lighting in the Diamond is Awesome. Best Ive seen. Such bright white light. Taking control of these LEDS would be niceee.
Any ideas? guyzz?
Greetings to all thanks.
i second that it wood bee cool to change
kinda like funlights on motorola phones
An application that makes the ring blink to musicbeat would be cool
yeah... like the old sony ericsson e398;-) awesome light effects when playing music^^
Regards
UP!
I have searched everywhere for an application that can do this...
Can anyone help us?
i will also like to have app for this
why do no clever people/deveopers reply to these???!
+1
BUMP.....
I would like this as well
ahh this would be so awesome
nuerom has a program like this that controls the led lighting. he also has one for the keyboard.
saf100792 said:
nuerom has a program like this that controls the led lighting. he also has one for the keyboard.
Click to expand...
Click to collapse
who is neurom and how do i contact him?
NueLED2 i didn't try it but i like to share and may someone can get this to work
nueLED2 is not… anything like what nueLED was. The idea was to avoid the intermediate DLL that caused issues with devices in nueLED, while creating an interface any application could use. So nueLED2 has no user friendly interface.
But on the bright side, it does allow individualized control of the LEDS on the Touch Pro / Diamond control pad. You could use the included nueLED2_Control app with mortscript or some other script to control individual leds. Also, nueLED2 is open source, so feel free to add to it or use it in your application, just drop a line if you do. I’ve added a .NET wrapper to make it easy to add to your .NET app
http://www.nuerom.com/BlogEngine/
whiskeybro said:
NueLED2 i didn't try it but i like to share and may someone can get this to work
nueLED2 is not… anything like what nueLED was. The idea was to avoid the intermediate DLL that caused issues with devices in nueLED, while creating an interface any application could use. So nueLED2 has no user friendly interface.
But on the bright side, it does allow individualized control of the LEDS on the Touch Pro / Diamond control pad. You could use the included nueLED2_Control app with mortscript or some other script to control individual leds. Also, nueLED2 is open source, so feel free to add to it or use it in your application, just drop a line if you do. I’ve added a .NET wrapper to make it easy to add to your .NET app
http://www.nuerom.com/BlogEngine/
Click to expand...
Click to collapse
Thank you for your reply friend.
Now I have to understand how to use mortscript...
I found some other codes. The readme of nueLED2-22-v2.0 said these where known:
2: Home
4: Pickup Phone
8: Back
16: Hangup Phone
32: Center Button
Mine is more complete:
1: All on
2: Home
4: Pickup Phone
8: Back
16: Hangup Phone
32: Center Button
128: Flash center button every 12.5 sec
256: charge cycle
512: same as 32
2048: center button counter clockwise
Maybe someone can do something with this, would be great!
If somebody could come up with a mortscript or any info on how to get these working would be great, i want to have a script to use in WAD2 so when i press a button the center circle flashes.
ANYBODY
Is there anybody still fancying this great Idea originally thought by Sergio PC????
It seems this Thread is quite forgotten.....
I've always been thinking about making a thread like this. One of the main things I would like it to do is change the amount of time between when it flashes when you have a new sms. I think it flashes every 3 or 4 seconds if you have a new sms but I would rather it be every 1 second so that i can quickly just glance at it to check if i have a new text. I know it would use a bit more battery but it will be a lot more convenient for me.
Really hope someone makes an app for this, it seems like there are a lot of apps to change things that aren't even worth changing but then something which would be really useful like this, there is no app for
AdamHC said:
I've always been thinking about making a thread like this. One of the main things I would like it to do is change the amount of time between when it flashes when you have a new sms. I think it flashes every 3 or 4 seconds if you have a new sms but I would rather it be every 1 second so that i can quickly just glance at it to check if i have a new text. I know it would use a bit more battery but it will be a lot more convenient for me.
Really hope someone makes an app for this, it seems like there are a lot of apps to change things that aren't even worth changing but then something which would be really useful like this, there is no app for
Click to expand...
Click to collapse
+1! it sounds great....anybody else?
Looks like this thread is probably just going to die again like it did last time...But I really want this app lol