Results 1 to 7 of 7

Thread: every_hour_beep script

  1. #1

    every_hour_beep script

    Hello All!
    Somebody can help me to write every_hour_beep.nrx with functions ON/OFF? It function like in samsung phones...

  2. #2
    I trying to change minute_beep.nrx by Yak

    What we have now...

    /*
    hour_beep.nrx Version 0.1
    --------------- Copyright (c) 2004 ShadoW


    After patching, you will hear a short beep every hour.


    Config ID:

    hour_beep

    Set it to:

    hour_beep/on - if you want to hear the beep every hour
    hour_beep/off - if you want to disable it

    */

    pool="ENVIRONMENT"


    say "Patching..."

    patt=x2c(203E217DF02AF9F048D1210022002301F044F8FF4CCF78202801D10548D4210022002301F044F8F578602801D000E22148D32100)
    mask=x2c(FF00FF00F800F800FF00FFFFFFFFFFFFF800F800FF00FFFFFFFFFF00FF00FFFFFFFFFFFFF800F800FF00FFFFFFFFF000FF00FFFF)
    find x2d(200000) "patt" "mask"
    inc_phonetime=rc
    place=inc_phonetime+x2d(10)

    if inc_phonetime=0 then do
    patt=x2c(203E217DF000F800260024011C2348D61C311C32F000F8004DD488282801D10548D61C311C321C23F000F8008868)
    mask=x2c(FF00FFFFF800F800FFFFFFFFFFFFFF00FFFFFFFFF800F800FF00FFFFFFFFFFFFFF00FFFFFFFFFFFFF800F800FFFF)
    find x2d(200000) "patt" "mask"
    inc_phonetime=rc
    place=inc_phonetime+x2d(14)
    end

    if inc_phonetime=0 then do; say "# Can't find needed functions!"; exit 1; end
    else if vb>0 then say "inc_phonetime found at 0x"d2x(inc_phonetime)


    call locate "play_tone_hour"; play_tone_hour=result

    call create_config_id 2; config_id=result
    own_get_config=value("func/own_get_config",,pool)

    call value "confid/hour_beep",config_id,pool

    call value "arg/hour_beep/off",0,pool
    call value "arg/hour_beep/on",1,pool


    /* create tone */
    tone_data=x2c(8a029002890290028802920287029002860290028502900284029002830290028202900281020bc0)
    create "tone_data"; tone_data=rc
    tone=d2c(tone_data,4)||x2c(02040000)
    create "tone"; tone=rc


    code=x2c(B50F1C03480BF000F8002800D010A10B5C092900D1047818785A18802800D00778984288D104480421002200F000F800BD0F46C0000000000000

    0000FF003732)
    create "code"; own_hour_beep=rc
    setbl own_hour_beep+x2d(06) OWN_GET_CONFIG
    setbl own_hour_beep+x2d(2c) PLAY_TONE_HOUR
    setlong own_hour_beep+x2d(34) CONFIG_ID
    setlong own_hour_beep+x2d(38) TONE

    code=x2c(B50046C046C0F000F800BD0000000000)
    create "code"; own_hook=rc
    setbl own_hook+x2d(06) OWN_HOUR_BEEP

    if vb>0 then say "own_hour_beep created at 0x"d2x(own_hour_beep)

    hook place own_hook 2 12
    if vb>0 then say "Hooked at 0x"d2x(rc)


    /* done */

    say "Done!"
    exit 0





    Now it's working like minute_beep.nrx OFF=OFF ON=beep every minute during the call...

    How to change it? ON must be beep every hour (without call)
    Last edited by ShadoW2004; 06-09-2004 at 06:48 AM.

  3. #3
    Join Date
    Mar 2003
    Location
    UK, England
    Posts
    2,011
    I guess you would have to hook this in when the phone is idle
    so it would need to run this all the time right?

    I think this would slow your phone down alot but it is possible

    You will need to find a function that is run all the time

    so for example a draw function
    then hook this in so it runs it aswell

    regards,
    Danny
    One day the world will end, the next day who will care??
    __________________

    Read the forum rules by posting!!

    Please see This thread for help with posting

  4. #4
    Join Date
    Apr 2003
    Location
    Portugal
    Posts
    1,256

    check the clock

    @shadow

    You can't change it this way, i think. Things aren't that linear.

    The minute_beep script works when phone is on call so to have your script beeping you'd have to make a call for more than an hour, right?

    i think dan's way is a good way, but my bet goes to checking the clock and then beep or vibrate (or both) when it reaches the hour.

    Nokix already has a script that checks if the clock is set. From there all the new code has to do is what i said above

    just a thought
    cheers

  5. #5
    mestrini can you help me with this?

  6. #6
    Join Date
    Apr 2003
    Location
    Portugal
    Posts
    1,256
    I surely would if i knew how to write a script with arm code.

    All i can do so far is link to other codes and functions already existent in nokix

    I'm reading some ASM notes and soon, i hope, will start with ARM/THUMB.
    Then i'll probably start doing my own scripts

    Let's wait for yak's return... or someone else's help

    cheers

  7. #7
    2 mestrini

    Ok! Lets wait....

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Idea for a script!!!
    By thedogcow in forum NokiX
    Replies: 2
    Last Post: 08-10-2004, 07:36 PM
  2. Problem writing script
    By kraze1984 in forum NokiX
    Replies: 16
    Last Post: 04-09-2004, 07:31 PM
  3. Fastwatch script Q
    By BenLags in forum DCT 3 Flashing / Upgrading / Modding
    Replies: 5
    Last Post: 22-02-2004, 01:36 AM
  4. fastwatch script
    By gab0r in forum DCT 3 Flashing / Upgrading / Modding
    Replies: 5
    Last Post: 22-02-2004, 01:27 AM
  5. g3n0lite script
    By ZiR in forum DCT 3 Flashing / Upgrading / Modding
    Replies: 2
    Last Post: 04-02-2004, 10:51 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •