PDA

View Full Version : [SCRIPT] SMS preview function



nuukiaworld
28-01-2007, 04:53 PM
It seems that this NokiX forum is almost dead... :cry: However, I continue trying to keep it living... ;)

Another small script I have written adds a "Preview" option in the SMS editor of the phone. The preview option helps in reading your message before sending. As you might know, reading your own message is frustrating because you need to move the cursor character by character through the message. Also the keyboard repeat of up and down arrow keys is incredibly slow.

Download SMS Preview 1.0.1 from:
www.panuworld.net/nuukiaworld/download/nokix/ (http://www.panuworld.net/nuukiaworld/download/nokix/)

joci2000
28-01-2007, 05:58 PM
Hi again

So first could you check the link also for this script?:roll:

second on 3310 V6.39 the messages buffer is at 0x10981c as i found

druidbartek
28-01-2007, 06:11 PM
from tfs_mail_suite:


236: patt = x2c(4885e75020007020497f)
237: mask = x2c(FF00FF00FFFFF000ff00)
238: find x2d(200000) "patt" "mask"; WRITE_SMS_BUF_LOC=rc
239: if vb>0 then say "WRITE_SMS_BUF_LOC: 0x"d2x(WRITE_SMS_BUF_LOC)

241: findldr WRITE_SMS_BUF_LOC+2; a=rc
242: getldr a; getlong rc; write_sms_buffer = rc
243: if vb>0 then say "write_sms_buffer: 0x"d2x(write_sms_buffer)

BlinK_
28-01-2007, 07:33 PM
Thank you for your work. Yea it seems it is dead, but I check it daily. Cant wait till I get my 3310 to test all your new scripts. BTW I have an idea floting in my mind and I want to realise it on my 3310 with the help of NokiX. Hope you guys will help me.. (:

LoMaster
28-01-2007, 09:06 PM
Just to mention: there is already a script for SMS previewing, created by druidbartek and MaximusResetus and called sms_preview.nrx - download (http://druidbartek.info/index.php?dl=./download/scripts/_obsolete/sms_preview_1.31.zip) (hope the authors won't mind... :))

druidbartek
28-01-2007, 09:11 PM
yeah, we made this script some time ago but we stopped developing this patch

nuukiaworld
28-01-2007, 09:50 PM
Just to mention: there is already a script for SMS previewing, created by druidbartek and MaximusResetus and called sms_preview.nrx
Oh, I could have slept last night instead of trying make the preview work. :(

So I probably trash my design and start using the already known one instead. Unless somebody says why I should use my time on my own preview patch... Thanks for the tip!

Edit: I take my words back. The sms_preview.nrx referenced by LoMaster does not work on my 6110, and as we have heard, it is not developed anymore. That's why at least I have a need for my version of the script. I also tried to minimize the flash footprint by not having a new dispatcher for the preview mode - on 6110 every byte is valuable!

I renamed my project with the name I originally gave to it, just to differentiate (at least a little) from already known similar scripts. The new name is preview_sms.nrx. I also added the write_sms_buffer detection from Mail Suite (thanks, druidbartek), although it does not work on 6110. But now the preview_sms.nrx tries both methods to find the buffer.

deadspot
29-01-2007, 02:48 AM
hi...

i think not totally dead heheheh...coz u still here!!!!

mr.dvirus already closed his site....http://www.dvirus.co.uk/

also SI33 and others no show on this forum...

regards,

lempacks
29-01-2007, 10:22 AM
Hi sir.

On my 3310 v6.39 the message buffer is located @ 0x10981C. Same as what joci2000 posted.
Also, I cannot find the Preview string on options menu in this firmware version.

Hope this helps...

nuukiaworld
29-01-2007, 10:35 AM
On my 3310 v6.39 the message buffer is located @ 0x10981C. Same as what joci2000 posted.
Also, I cannot find the Preview string on options menu in this firmware version.
Thanks, the version 0.2 of the preview_sms.nrx finds out the same address from my 3310 image. I expect the preview is now working (at least) on 3310, too.

If you mean that the Preview options is not added the SMS editor menu, the problem may be a conflict with the send_flash_sms.nrx. Currently, to avoid any problems, the send_flash_sms.nrx (if exist) must be processed before preview_sms.nrx. I try to fix this asap.

lempacks
29-01-2007, 11:39 AM
Currently, to avoid any problems, the send_flash_sms.nrx (if exist) must be processed before preview_sms.nrx. I try to fix this asap.

Hi sir. I follow the above recommendations and it works, thanks.
But another problem arise. The preview just shows a blank text...:( Maybe we are missing something on the correct address of message buffer. I just figured out in memory editor that just before addr 0x10981C, shows a data of the amount of characters being type in the message editor. I guess this is the right address (@ 0x109818). Atleast on 3310.

nuukiaworld
29-01-2007, 02:10 PM
The preview just shows a blank text...:(
Yes, I expected that. The message text is probably in a ucs-2 string on thone phones (instead of plain ASCII like in 6110). I have to fix the patch to handle it correctly. However it will be difficult to do the development without possibility of testing...

joci2000
29-01-2007, 02:23 PM
There is another problem with this script. if i try to quit from preview it will change the navi functions. With back (C) it closes the preview window but doesn't come back to write sms. it shows only back(c)/options(navi). With options does nothing just changea the navi buttons again to back/ok.

With double Back it will return to write sms but i can't send it, becasue navi button will be -(C)/back(navi) so it will cloce the write sms function.

druidbartek
29-01-2007, 02:33 PM
Yes, I expected that. The message text is probably in a ucs-2 string on thone phones (instead of plain ASCII like in 6110). I have to fix the patch to handle it correctly. However it will be difficult to do the development without possibility of testing...
yes, ure right. in my sms_preview a solve this problem (my method wasnt so clean but works:-D )

in newer models (33xx,5210,5510 etc) before sms buffer is stored cursor position (Word) for example 5510 v03.53:
0x1170a0 - write sms buf
0x11709e - cursor position

maybe you could reuse some parts of code from my old date patch(3310-compatible) and merge with your script(5110-compatible)?

sms_preview_1.31.zip (http://druidbartek.info/index.php?dl=./download/scripts/_obsolete/sms_preview_1.31.zip) (src included)

nuukiaworld
29-01-2007, 10:07 PM
I still continue keeping my version of this patch to contain only assembler hooks, without any dispatchers. :cool: However, now the patch (ver. 0.3) has separate hooks for UCS-2-enabled phones, which use druidbartek's method of adding 0x04FF temporarily in the front of write_sms_buffer.

Probably the message text is now visible but what happens from the Send and Back buttons?

http://www.panuworld.net/nuukiaworld/download/nokix/preview.zip

druidbartek
29-01-2007, 10:52 PM
@nuukiaworld - version 0.3 still have problem with actions but i know how to solve this bug:
simply in hook_ucs.s must be added dialog_close call:



76: preview_close: @ 0x1e07 - Back pressed in preview
77: bl dialog_close @ we must close our dialog (required only on newer phones ?)
78: mov r1,#2
79: ldr r0,_msg_45e7
80: bl send_message

I compiled it and works fine on newer models too :)

nuukiaworld
30-01-2007, 08:18 AM
in hook_ucs.s must be added dialog_close callHmmm. dialog_close() should be there already in 0.3 (I made a late modification to the 0.3 just after announcing here about the version.) Although I put the dialog_close() call to close: to ensure that it is called also when Send is pressed:

preview_send: @ 0x1e06 - Send pressed in preview
ldr r0,_msg_4c31
bl send_message @ initiate sending
b close

preview_close: @ 0x1e07 - Back pressed in preview
mov r1,#2
ldr r0,_msg_45e7
bl send_message

close:
bl dialog_close
ldr r1,_global_buffer @ restore backup
...Is it important to close the dialog before sending the messages? I have thought that send_message() just queues the message and returns... :-?

@druidbartek: You are correct, old phones seem not to require dialog_close() there, both Send and Back works great without any such call.

druidbartek
30-01-2007, 12:23 PM
[...]Although I put the dialog_close() call to close[...]

and it works perfect o newer phone (5510,5210) :)

nuukiaworld
01-02-2007, 07:44 PM
@druidbartek (or anybody)
Do you mean that the newest 0.3 version is ok now? Or do I still need to move the dialog_close() call to another place in the code...?

cieszak
02-02-2007, 12:33 AM
@druidbartek (or anybody)
Do you mean that the newest 0.3 version is ok now? Or do I still need to move the dialog_close() call to another place in the code...?
Works fine on 3310 (3330 with 3310 firmware)

SmaRkieS
18-02-2007, 04:41 AM
hi...

i think not totally dead heheheh...coz u still here!!!!

mr.dvirus already closed his site....http://www.dvirus.co.uk/

also SI33 and others no show on this forum...

regards,

hheheheh me too... im busy with my family.. (: I love my 1yr old baby.. *sigh* life.. (: move on..

demon_lite
19-02-2007, 01:55 PM
There is some idea. How to viewing sms is on when a hot key is pressed, for example 1 or 0?

P.S. Sma-a-Rki-i-e-eS!!! Please!!! Answer on my thread Rhythmic backlights in Smarkies flash (http://nokiafree.org/forums/t82048/s.html) How you could make blinking all time?:eek:

GsmCyber
06-03-2007, 02:24 PM
It seems that this NokiX forum is almost dead... :cry:

Never :-D i hope...;)

druidbartek
28-12-2007, 06:07 PM
hi

I noticed pattern from mail_suite doesn't fit all models with UCS-2 based editor(8xxx)

the correct patt/mask for all newer phones is:

patt = x2c(e74e200077284974800848e5f166fa284873)
mask = x2c(ff00fffff000f800fffff800f800f800f800)

nuukiaworld
31-12-2007, 06:12 PM
Thanks druidbartek; I updated the pattern today. — Download link is in the first message of this thread (and I guess that the change will be included in SourceForge soon, too).

druidbartek
31-12-2007, 06:15 PM
Thanks druidbartek; I updated the pattern today. — Download link is in the first message of this thread (and I guess that the change will be included in SourceForge soon, too).
it is already included :)