PDA

View Full Version : Mortscript Help please?


warmkiwi99
26th July 2008, 06:50 PM
SImple script that is supposed to toggle the sound notification for Incming text message

currentstate=Regread ( "HKLU", "ControlPanel\Notifications\{A877D65B-239C-47a7-9304-0D347F580408}", "options")
If (currentstate=0)

RegWriteDWord ( "HKLU", "ControlPanel\Notifications\{A877D65B-239C-47a7-9304-0D347F580408}", "options",1 )
Else
RegWriteDWord ( "HKLU", "ControlPanel\Notifications\{A877D65B-239C-47a7-9304-0D347F580408}", "options",0 )
endif

but i get a Mortscript error:

Invalid main key for RegKeyExists. Line 1

What have i done wrong?

strikeone
26th July 2008, 07:15 PM
^ try looking through this (http://forum.xda-developers.com/showthread.php?t=289197) Mortscript thread for a solution...I've seen quite a few volume solutions in there.

warmkiwi99
26th July 2008, 07:48 PM
yeah - that thread's my bible but can see why I'm getting an error trying to read this key

holmanm
26th July 2008, 08:41 PM
SImple script that is supposed to toggle the sound notification for Incming text message

currentstate=Regread ( "HKLU", "ControlPanel\Notifications\{A877D65B-239C-47a7-9304-0D347F580408}", "options")
If (currentstate=0)

RegWriteDWord ( "HKLU", "ControlPanel\Notifications\{A877D65B-239C-47a7-9304-0D347F580408}", "options",1 )
Else
RegWriteDWord ( "HKLU", "ControlPanel\Notifications\{A877D65B-239C-47a7-9304-0D347F580408}", "options",0 )
endif

but i get a Mortscript error:

Invalid main key for RegKeyExists. Line 1

What have i done wrong?

There is no "HKLU". I think you mean "HKCU".

warmkiwi99
26th July 2008, 08:50 PM
Duh! What a dork.

Thanks, well spotted. I was looking for something more complicated :(

holmanm
26th July 2008, 09:05 PM
Duh! What a dork.

Thanks, well spotted. I was looking for something more complicated :(
I can't believe you called me a dork just for trying to help you.

Just kidding, I know you meant you.

Don't sweat it. I always try to use MyMobiler to copy and paste from Total Commander because I will make a typo every time. It's a lot easier for some one else to see because they don't have the preconceived notion of what its supposed to be.

P.S. I am a Dork, though.

warmkiwi99
26th July 2008, 09:19 PM
don't believe you :)