PDA

View Full Version : Auto alignment using Mortscript


thescum
12th September 2006, 11:41 AM
am trying to write a script, using mortscript so that it'll perform the screen alignment automatically. So far i can only get to the stage where it'll get to the screen alignment, where i'd then have to use the stylus to get the screen aligned.

Was hoping for more inputs from others as to how we can resolve this.


This is what i have so far:
<script>
run \windows\screen.lnk
WaitForActive "Settings",5
MouseClick "Settings",170,160
Sleep 100
GetWindowText 20,20
MouseClick"Settings",120,160

<This portion onwards does not work>
Sleep 100
MouseClick"Align Screen",20,20
<end script>

the error i get is reading back the Windows text, presumably because its not a window.

would appreciate any tip.
For simulation purposes, you'll have to create the lnk as such (JIC)
<link>
20#ctlpnl cplmain.cpl,7?\windows\cplmain.cpl,-5080
<end link>

Thanks in advance

aekkasint
12th September 2006, 04:50 PM
Wow...I am so exciting about this... Let's god make this workkkk :wink:

ktka
12th September 2006, 05:43 PM
Maybe you can just write a script to over-write the regitry values, since the actual calibration values are in the registry. The location is

\HKLM\Hardware\DeviceMap\Touch\CalibrationData (string)

There are five sets of values with a space between each set:
1st - Centre
2nd - Portrait Top Left
3rd - Portrait Bottom Left
4th - Portrait Bottom Right
5th - Portrait Top Right

The sets of values are measured from the Top Right with the first value being across, second being down (i.e. -x, -y). Ever since making a backup of a set of "good" values I have been over-writing the current values with that. Maybe all we Hermes users can compare our values and see if the screens are really that inconsistant. Mines are:

491,525 732,229 726,817 239,810 246,226

tjongi
12th September 2006, 06:05 PM
502,524 770,224 777,810 242,807 242,225

vpacIIman
12th September 2006, 07:22 PM
530,513 765,228 761,809 274,800 277,217

goestoeleven
12th September 2006, 08:10 PM
wouldn't it be much easier to replace your hardware? This is a known issue, and HTC is swapping the bad units out...

marka2k
12th September 2006, 08:23 PM
wouldn't it be much easier to replace your hardware? This is a known issue, and HTC is swapping the bad units out...

I have heard this but is there anything in writing? I sent mine back (vendor) for screen alignment and they can not duplicate the issue - go figure

ktka
12th September 2006, 08:58 PM
I know a guy in Taiwan who sent his CHT9000 back but got it returned without any replacement in hardware, Taiwan CHT (telco) simply flashed a newer ROM and hard-reset. There are numerous debate on whether this is a hardware issue or a software one, in my case it seems to be software.

First I tried a suggestion on this forum to loosen the two screws on the back, didn't help. Then tried the 'tape to shield magnet trick' under the keyboard, didn't help either. Then changed the unit and even tried the Dopod 838Pro/Dopod CHT9000/O2 trion, all had the same problem after a week of use. Lastly flashed the CHT9000 to the 838pro ROM posted on the FTP, also didn't help.

When I started to play around with the calibration data and manually playing around with the numbers, everything seems fine and has been running for about a week now without any problems.

goestoeleven
12th September 2006, 10:00 PM
wouldn't it be much easier to replace your hardware? This is a known issue, and HTC is swapping the bad units out...

I have heard this but is there anything in writing? I sent mine back (vendor) for screen alignment and they can not duplicate the issue - go figure

You won't see anything in writing... but I hadn't heard of anyone being denied an exchange, either...

bydandie
12th September 2006, 10:06 PM
wouldn't it be much easier to replace your hardware? This is a known issue, and HTC is swapping the bad units out...

I have heard this but is there anything in writing? I sent mine back (vendor) for screen alignment and they can not duplicate the issue - go figure

Email HTC :)

mightyeric
12th September 2006, 10:21 PM
Email HTC :)

I did - over the weekend. 3:20 Tuesday afternoon and no response yet.

goestoeleven
12th September 2006, 11:02 PM
It doesn't make sense for you to contact HTC directly. They are not set up for enduser support, and they don't know you from a hole in the wall. It's not at all surprising that you haven't heard anything... chances are you won't... ever!

Your best bet is to go through the reseller from whom you bought the phone. They're the ones that can easily facilitate any exchanges and/or service....

This is why picking the right supplier is so important!

hukoeth
12th September 2006, 11:29 PM
It doesn't make sense for you to contact HTC directly. They are not set up for enduser support, and they don't know you from a hole in the wall. It's not at all surprising that you haven't heard anything... chances are you won't... ever!

Your best bet is to go through the reseller from whom you bought the phone. They're the ones that can easily facilitate any exchanges and/or service....

This is why picking the right supplier is so important!

Hi,
I already posted this in another thread. I wrote to HTC and got a response rather quickly. They wrote:

Good Morning,

We are aware of issues with the touchscreen losing alignment on a few early batches of TyTN devices. This does appear to be a hardware issue which has been solved and no longer appears on the devices.

Obviously, we have no way of controlling how long a device is stocked before it is sold, either by our distribution channel, or in the case of network devices, how long the networks take to customise their devices before releasing them.

As the device you have ordered is an O2 XDA Trion, any warranty would be with O2 and not with HTC. I would suggest that if you are unlucky enough to get one of the devices that does suffer from this issue, simply return it to the retailer or O2 for a replacement.

As the device is an O2 Trion rather than an HTC TyTN, I am afraid I will have to refer you to O2 for future support on the device. We do not currently support network devices due to the legal agreements in place over the customisation of their devices.

Best regards,

Well I'm not sure about the part with the "early batches" but anyway I wanted to share this with you.
Kind regards,
Uli

daddyo
12th September 2006, 11:53 PM
This is a strange problem to say the least.

Had M3100 for a month

first two weeks no screen issues

then a 24 hour period or so where realignment as needed every time the device was turned on

then ok for a week

then 2 days of frequent realignments again

now ok for 3 days

I hope you can get this script to work, although my latest sure way of realignment is to go into standby

run my finger around the perimeter of the screen, power on - sorted!!

JR_de
13th September 2006, 02:02 AM
mine is:

495,514 690,232 706,811 271,804 294,227

thescum
13th September 2006, 05:26 AM
Maybe you can just write a script to over-write the regitry values, since the actual calibration values are in the registry. The location is

\HKLM\Hardware\DeviceMap\Touch\CalibrationData (string)

There are five sets of values with a space between each set:
1st - Centre
2nd - Portrait Top Left
3rd - Portrait Bottom Left
4th - Portrait Bottom Right
5th - Portrait Top Right

The sets of values are measured from the Top Right with the first value being across, second being down (i.e. -x, -y). Ever since making a backup of a set of "good" values I have been over-writing the current values with that. Maybe all we Hermes users can compare our values and see if the screens are really that inconsistant. Mines are:

491,525 732,229 726,817 239,810 246,226

You are very right, and thanks for the tip. Its very doable.

Mine is: 511,520 765,234 759,799 250,806

dhave attached installation cabs that will auto configure the screen alignment by inserting the above string in. I do hope that this is global.
Could some test the attached zips to see whether you're alignment runs.
Thanks.

If not so, do inform us, and to resolve the issue, goto \programs\mortscript\ and open ScreenAlignReg.mscr in a text editor.
Now just insert your values at the end of the first line (don't forget the inverted commas ;).

In anycase, please do a backup before trying this. Hate to be the one that cause your device to fail ;)

Have noticed that the device will not boot up once the reg keys are inserted this way. Have to HR. Have since changed the syntax abit, but still to no avail. Does anyone else have this issue.

*EDIT* tried this script with a clean system. After the writeback was done, i reset and i couldn't get out of the boot phase. Had to HR. As such, am deleting the zip and would recommend that we refrain from using this method.

With reference to Post #1, if anyone can enlighten me on what the Window text is for the Screen Alignment, i can set the keytaps, to simulate recalibration.

thescum
13th September 2006, 03:34 PM
The attached zip contains ver 0.2, a stopgap.

Instead of writing directly to registry in mortscript, am now (thanks Gohyc for the idea) rewriting via a .reg file. The "cal.reg" file will be installed in \programs\mortscript\. You can edit the .reg file to include your "figures"

Major limitations, it requires Resco File Explorer, and will run correctly only in portrait mode.

But for those of us who have it works fine. Stable and reliable.


Meanwhile for the mortscripters,
1. could someone tell me the Window Text for Screen alignment is.
2. don't think there's anything wrong in the syntax below:
RegWriteString HKLM,HARDWARE\DEVICEMAP\TOUCH,CalibrationData,"511,520 765,234 759,799 250,806 "

much appreciated :)


*Version 0.2.1 has been uploaded. Script now has longer delays, and thus far runs more true. (these delays unnoticeable by the end user).

cal.reg file included contains this key:
CalibrationData="491,516 756,221 757,805 233,801 236,220 "

cyberdude
14th September 2006, 12:45 AM
although my latest sure way of realignment is to go into standby

run my finger around the perimeter of the screen, power on - sorted!!

I tried this strange but beautifully simple method today and so far it has worked great.

Thanks Daddyo!

thescum
14th September 2006, 07:54 AM
had a screen misalignment.

Since i've mapped it to a keypress, once run, i had to turn off my device for about 20sec, before everything was realigned.

Do notice that sometimes the wait is not enough and it won't auto dismiss itself.

I have since increased the time out delay. For those brave souls that have tried this script, do you have the same problem. Do you need me to increase the timeout.

Am awaiting any feedback. Thanks

cyberdude
14th September 2006, 07:11 PM
Day two after doing Daddyo's finger lap method and alignment problem has not recurred.

My problem had gotten progressively worse to the point where I was re-calibrating several times a day but so far, rock solid.

Could this be static-related?

HTC insists it is hardware as in this message from them:

There are now procedures in place for fixing the Screen alignment issue with the TyTN devices. This is a hardware issue that we have identified and we are offering a replacement to owners of affected devices with two conditions.

1: The device must be returned with all accompanying accessories.
Everything that was in the box when you bought the device must be in the box when you return it.

2: The device must be a Genuine HTC Badged device. This means that the device cannot be a Vodafone v1605, an O2 XDA Trion, a T-Mobile Vario II or any other device based on the TyTN, but that is not actually a TyTN. For these devices, you must contact the Network/Reseller for further advice on this issue.

If you meet these two provisions, you may contact your nearest repair centre to arrange the swap. Please place everything back into the original box and arrange to have the device picked up. It will then be tested to confirm that it has the problem, and then it will be swapped for a replacement unit.

If you are unable to return everything, you will be eligible for a repair under the warranty.

mightyeric
14th September 2006, 08:56 PM
HTC insists it is hardware as in this message from them:

There are now procedures in place for fixing the Screen alignment issue with the TyTN devices. This is a hardware issue that we have identified and we are offering a replacement to owners of affected devices with two conditions.

1: The device must be returned with all accompanying accessories.
Everything that was in the box when you bought the device must be in the box when you return it.

2: The device must be a Genuine HTC Badged device. This means that the device cannot be a Vodafone v1605, an O2 XDA Trion, a T-Mobile Vario II or any other device based on the TyTN, but that is not actually a TyTN. For these devices, you must contact the Network/Reseller for further advice on this issue.

If you meet these two provisions, you may contact your nearest repair centre to arrange the swap. Please place everything back into the original box and arrange to have the device picked up. It will then be tested to confirm that it has the problem, and then it will be swapped for a replacement unit.

If you are unable to return everything, you will be eligible for a repair under the warranty.

Really? I've sent multiple emails to HTC-USA and HTC-UK and get nothing. (I did get an automated response with an issue number from HTC-UK, but no follow-up). Where did this email come from? Who can I contact?

daddyo
14th September 2006, 09:06 PM
If this is hardware (which I think it must be) it's very strange to say the least as the need for realignment does appear to follow a cyclic pattern reaching a peak of realignments (almost every time you use it) then it's gone.


For example, my last series of misalignments started last Saturday evening. On Sunday morning I was realigning every time I turned the m3100 on. Suddenly it sorted itself and i've not realigned since. :?:

cyberdude
14th September 2006, 09:30 PM
daddyo
Have you had the trouble at all since your "finger lap" trick?

to previous poster, I will try to find the contact info when I get home. I also got the auto reply but a human msg followed the next day from the UK.

cyberdude
15th September 2006, 06:46 AM
HTC insists it is hardware as in this message from them:

There are now procedures in place for fixing the Screen alignment issue with the TyTN devices. This is a hardware issue that we have identified and we are offering a replacement to owners of affected devices with two conditions.

1: The device must be returned with all accompanying accessories.
Everything that was in the box when you bought the device must be in the box when you return it.

2: The device must be a Genuine HTC Badged device. This means that the device cannot be a Vodafone v1605, an O2 XDA Trion, a T-Mobile Vario II or any other device based on the TyTN, but that is not actually a TyTN. For these devices, you must contact the Network/Reseller for further advice on this issue.

If you meet these two provisions, you may contact your nearest repair centre to arrange the swap. Please place everything back into the original box and arrange to have the device picked up. It will then be tested to confirm that it has the problem, and then it will be swapped for a replacement unit.

If you are unable to return everything, you will be eligible for a repair under the warranty.

Really? I've sent multiple emails to HTC-USA and HTC-UK and get nothing. (I did get an automated response with an issue number from HTC-UK, but no follow-up). Where did this email come from? Who can I contact?


mightyeric,
I don't know what country you're in but you can forget abou getting any TyTN support from HTC-USA. I tried as if I were in the UK:
http://www.europe.htc.com/support/customerservices.html

Here is an email reply I received just today:

Unfortunately there is no repair centre in the US. In order to have this device exchanged, please contact our UK repair centre. Their details are -

HTC Europe
Capella House
Snowdon Drive
Winterhill
Milton Keynes
MK6 1AJ

+44 (0) 87122 30217
mail_in@htceurope.com

Yours sincerely

callservice@htceurope.com
http://www.htc.com

thescum
15th September 2006, 07:59 AM
have just made an update to 0.2.1.

For more info on the changes, please check Post#16
And do let me know, how i could make this better or if its a total waste of time ;)

daddyo
15th September 2006, 10:32 AM
Have you had the trouble at all since your "finger lap" trick?



I first did this last sunday morning but had to do it a few times (each time it worked but when I finished using the phone and went back to it I had to do it again). since Sunday I've not had any further problems

mightyeric
15th September 2006, 03:15 PM
thanks cyberdude - i pinged the mail_in address this morning - fingers crossed

blcc
15th September 2006, 11:18 PM
have just made an update to 0.2.1.

For more info on the changes, please check Post#16
And do let me know, how i could make this better or if its a total waste of time ;)

Thanks thescum, you are great!

keinerf
17th September 2006, 02:37 AM
just to add something..

Finger-trick doesn't help, neither putting saved reg-keys using
resco explorer. Poking around, bending the screen, loosening
screws - nothing has any effect on my device.

Screen still disalignes during usage, sometimes in intervals of
10 secs to a minute, then it's again ok for another hour or so.
(drawing lines on a note to verify, major disalignment starting
from the middle getting worse on the right side, sometimes
about 5mm or more). Now I'm at around 10-20 alignments a
day.

It's a German Vodafone VPA Compact III, HT626F serial with the
metal-plated battery.

The problem suddenly appeared, so I don't think anymore it's
software-related. After it first happened I immediately hard-
reseted it, but since then it is still present :cry:

sectorlord
17th September 2006, 03:32 AM
This is a nightmare .....

I spent a lot of time reloading ROMs, tricks etc etc... to minimize it to once a week... But I spent a lot of bucks on this unit to be annoying...so I returned it back and go back to my Universal.

I'll be happy to go back, IF HTC has officially FOUND the fix on this epidemic !!!

:cry:

thescum
23rd September 2006, 06:58 AM
sad to say, after running the autoaligner (Resco .reg file version) you have to switch off for 10-20sec for system writebacks, then soft-reset for the changes to be effectuated.

This 1 min 30sec delay to get the screen aligned does take its toll on patience.

Hence am sticking to the original method. The script now just runs the control panel screen alignment, then awaits for you to tap the 5 (+)s. Once completed, you're screen's aligned.

Limitations
Works only on potrait mode.

ToDos
Still can't figure out the capturing of the windows title for "Screen align", the one when the 5 pluses come out. Any help, will be greatly appreciated.

Cabs.
Contains one with mortscript, one without.
Those of us that have mortscipt already installed, install the ScreenAlignwithoutMortscipt.cab.

Both cabs will place a shortcut in your start menu\programs.

christopherwoods
23rd September 2006, 07:19 AM
[quote="mightyeric"][quote=cyberdude]HTC Europe
Capella House
Snowdon Drive
Winterhill
Milton Keynes
MK6 1AJ


The amount of times I've driven past that building (live near MK, unfortunately)... It's a very dour building. :/

Then again, MK could turn a Tickle-Me Elmo into a manic depressive.


Sorry there was nothing of substance in this post ;)

jasmanng
23rd September 2006, 08:02 AM
Can someone do a better Japanese-to-English translation?

Original link (+ PHOTOS!) : http://inuchanbt.blog54.fc2.com/blog-entry-86.html

Google translation

Because spare time was possible with the [tsu] lever after a long time, with previous disassembly it could not correct completely, in order that the tap screen it slips and slips and cancels problem, now one time CHT9000 was disassembled.

Preparation careful it is not, whether there probably is also such a thing, that in Hiroshima* It had had the type driver!

And, when you say from conclusion, it slipped and slipped and cancelled problem completely!
It is not, the genius! \ ^o^/[ha] ゙ [nsa] ゙ [i]

… Well, you will try looking at the photographic playback. This time furthermore, it could separate also the liquid crystal.

First, it is back of the liquid crystal framework! And, the dense Tsuga it slips and slips and it is cause of problem.
This criminal

This time however there is no relationship, the baseplate of the button. With respect to the left- Is “the viewphone” button.
Is not hTc Z?

This is the liquid crystal!
You took at last!

Well, that when you say, it slipped and it did what in order to cancel the gap, the sponge seal of the part which is stretched on the framework which inserts the liquid crystal, contacts with the liquid crystal was peeled!

Well, it is difficult to explain. ## (--#)

In other words like this is!


With the first photograph in the place where the liquid crystal is inserted the black sponge seal is pasted in letter type “of [ro]”, but is, with this photograph peeling one side, it probably will be recognized or that it becomes letter type “of [ko]”!?

Truth should take the first photograph with the same angle, it is it is the [tsu], but is, what you become aware was after resetting to all origins, (the ^^ HKDRT

In any case, it slipped with this and the gap stopped completely happening. Well, it is splendid.
Perhaps, the sponge being too thick, unreasonable tension depends on the touch screen, the sensor causes the malfunction and slips and slips and probably causes problem.

“You obtained and -, the rubbish became easy to enter from the place where the sponge is peeled it is it is not!?”
How, as for uncouth question doing, is not good.

But outside the storm, it is not, heart is fine weather!
Well, general/universal passing, it probably is how happy what, \ (^o^)/

chinadan
23rd September 2006, 09:22 AM
all this guy did was to remove the gasketing foam in the offending part of the bezel, suggesting that the aligment problem was being caused by the foam gasket applying uneven pressure to the LCD, thus causing erratic beahvior.

I doubt that though as the pressure, assuming this touch screen is of the resistive kind, should simply mimic a stylus push, not render portions of the screen unresponsive...but then, observations are mostly true, conclusions rarely.

Maybe somebody w/ Japanese skills can clarify this contribution...

keinerf
23rd September 2006, 11:09 AM
Well if there just was a better description how to disassemble
the device.. (without breaking any seals in case of needing to
send it in of course). The pictures are nice, at least you see where
the screws are placed.

Edit: found more pics on this page :lol:

http://inuchanbt.blog54.fc2.com/blog-entry-83.html#more

inuchanbt
11th October 2006, 01:31 PM
Hi, there. I am the writer of the blog.
I have added to my blog, how to disassemble CHT9000 and fix the alignment problem in English.

Enjoy it at YOUR OWN RISK!

http://inuchanbt.blog54.fc2.com/blog-entry-100.html

Sorry for my poor English writing.

pof
11th October 2006, 01:43 PM
@inuchanbt: thanks for the translation :D The pics are great!

keinerf
11th October 2006, 01:43 PM
Many thanks, really good description!

yca
30th October 2006, 08:46 PM
Hi 4 All
Ther Is Any News

pablofields
27th April 2008, 03:36 AM
Maybe you can just write a script to over-write the regitry values, since the actual calibration values are in the registry. The location is

\HKLM\Hardware\DeviceMap\Touch\CalibrationData (string)

There are five sets of values with a space between each set:
1st - Centre
2nd - Portrait Top Left
3rd - Portrait Bottom Left
4th - Portrait Bottom Right
5th - Portrait Top Right

The sets of values are measured from the Top Right with the first value being across, second being down (i.e. -x, -y). Ever since making a backup of a set of "good" values I have been over-writing the current values with that. Maybe all we Hermes users can compare our values and see if the screens are really that inconsistant. Mines are:

491,525 732,229 726,817 239,810 246,226

To this non-techie, you tinkerers are geniuses. I just started having alignment problems after switching ROMs and doing a bunch of button mapping (specifically stylus taps seemed to be a few mm off kilter) and the problem was solved after changing to the reg values posted by ktka. Thanks a bunch!

WheelieKing
5th December 2009, 11:13 AM
What I found from reading several threads from this forum in regards to Screen Alignment issue is due to poor choice in the "GASKET MATERIAL" that goes around the inner lip of the top and both sides of the screen. That is why some people have success with sticking a business card along the cracks of the screen. It worked for me, too, but not to my satisfaction as there was a small portion in the middle lower right of the screen that would go haywire when I put the pen there. So I used a piece of plastic cutout of packageing that was hard, but flexible, and thin. I made it in a shape of a triangle and used the sharp point to get in there and run it up and down the cracks and managed to pull out some of that "GASKET MATERIAL" and new I had to take it apart.

So I searched around and found a picture of the "GASKET MATERIAL" around the screen, in the following link. It is the 10th picture down of a series that show the breakdown of an 8525:

http://www.howardforums.com/showthread.php?t=1152710

Then I used the following video tuturial to disassemble the 8525:

http://www.youtube.com/watch?v=zsljpn74SW0

There is a missing scene from the video right before the motherboard is removed. It should show a black screw just like the 1st 4 you removed with your number T6 torque screw driver. It is at the top of the phone and is shown in the pictures of the first link from howardforums.com.

My "Gasket" was in rough shape. Seemed to be made out of some type of foam that disinegrates easily. I used small strips of the furry side of some velcro, cut to about the width of the preivous "Gasket". Had some very fine scissors to do it with. I also cut as much of the furry hairs as I could, off each strip. I took my time and it took me about 2 hours, as I was winging it.

I NO LONGER HAVE THE SCREEN ALIGNMENT ISSUE. Good luck in your endevours!!!