yashsingh1/xdaforums huggingface dataset:
[Touch HD Themes and Apps] Cret:
Thanks guys

I had already got mortscript installed but never got round to looking at it.

Just had a look through the manual and it doesn't look massively different to the language I use at work so I decided to try a basic test script to pop up a message with the time.

I've written this 3 different ways to see if any/all of them worked:

GetTime( hours, minutes, seconds )

Message( "Time: " & hours & minutes & seconds)

or

GetTime( hours, minutes, seconds )

message( "Time: " & hours & minutes &seconds )

Message( message )

or

GetTime( hours, minutes, seconds )

message( "Time: " & hours & ":" & minutes & ":" & seconds )

Message( message )

All three of these work, with the first two giving the same output.

However the second and third ones give a second (blank) message that pops up and must be ok'd after the time message is ok'd. Why is this?

I've found the reset command in the manual, and I guess I need to use RunAt?

Not sure how I'd use the pin number though so a point in the right direction with that would be cool if you don't mind.

I noticed also a comment with RunAt that if the display is not on it may not work correctly and this can be fixed hopefully by toggling the display first.

I'm guessing that's the same problem I get with the reboot program I linked to above?

Cheers anyway - Mortscript looks fantastic fun now I've looked into it! :D
[Touch HD Themes and Apps] str0nz0:
Ok i try to answer your questions

Thats easy. You just need to use the message command once, and not two times :-)

The last line is just unnnecessary.

Thats correct if you want to reset your device at a specific time, or a regular interval.

Here is a part of a script i wrote some time ago for my old device. I think it will help you

toggledisplay(on)

Run("\Windows\WirelessManager.exe")

WaitForActive("Wireless Manager",9 )

sleep( 2000 )

mouseClick(30,50)

WaitForActive("Phone",40 )

sleep( 2000 )

mouseClick(90,240)

sleep( 1000 )

mouseClick(50,180)

sleep( 1000 )

mouseClick(120,240)

sleep( 1000 )

mouseClick(120,170)

sleep( 1000 )

mouseClick(190,270)

sleep( 10000 )

The main important thing is, that you wait for the Pin windows and then start to automate clicks on the numbers by using the correct coordinate values. the one i used are for qvga, the touch hd has a range from 0-480 and 0-800. Its a bit trial and error to get the right coordinates of the buttons to be pressed.

Good luck, and i f you stil have questions, just ask.
[Touch HD Themes and Apps] oruam57:
http://xdaforums.com/showthread.php?t=273309
[Touch HD Themes and Apps] Cret:
Thanks str0nz0 that's very helpful :)

I think that my message doubled up because I meant it to be a assigned to a variable that was then called in the Message command but I did it wrong!

I've got a script working now that runs a message script after 30 seconds, so I need to:

1) Change it from a 30 second timer to a fixed time each day

2) Make it perform a reset instead of display a message (or add the reset after changing the message to a warning).

I had to use the toggledisplay(on) command or else it doesn't work for me.

oruam57 - thanks for your link. I've just installed your app but for some reason it does not work to reboot my touch HD when I try it.

I suppose I could add a reset script in but it seems odd that it doesn't do the reset by itself. Any idea why?
[Touch HD Themes and Apps] str0nz0:
you can use this for example:

runat (timestamp()+86400, "\Storage Card\script.mscr")

This will run from now on in 24 hours (86400 seconds) the script "\Storage Card\script.mscr"

In that Script just make a sleepmessage and the reboot.

This will repeat daily at the same time automatically
[Touch HD Themes and Apps] Cret:
Thanks - I've been using code the same as this (near enough) for testing it by running the script file 30 seconds after the scheduler file is started.

What I was thinking for the timing was more along the lines of:

GetTime( hours, minutes, seconds, day, month, year )

RunAt(year, month, day+1, 07, 00, "\My Documents\Reset.mscr")

I'm guessing the 'day+1' syntax is not correct, so I need to check how to do that, but by using a command like this, it won't matter what time the script is initiated as it will use tomorrow's date, but the same time every day at 7am.

Will this work?

By the way - this might be a stupid question, but what is it that makes the script repeat every day instead of just running once?
[Touch HD Themes and Apps] Cret:
I've just been doing a little testing and I think it might work if it goes something like the following (I have to use a message instead of RunAt command as that does not work for the PC of course):

GetTime( hours, minutes, seconds, day, month, year )

day2 = day +1

Message("Current time = " & day & "/" & month & " " & hours & ":" & minutes, "Title")

Message("New time = " & day2 & "/" & month & " " & 07 & ":" & 00, "Title2")

So it seems that day+1 can be set on one line as day2, then day2 can be used with a fixed time in the RunAt command in the real schedule file.

I guess I could have it ask for a time to be input by the user for some flexibility but I'll get this working first! :)
[Touch HD Themes and Apps] Cret:
This is the content of the two files I am trying out at the moment. It's nearly the end of the day so it's easy to try out my day2 = day+1 theory and see the result soon if it works.

Might try and make it play a sound file too in case I'm not paying attention when it tries to do it!

File 1 - Schedule Reset.mscr:

GetTime( hours, minutes, seconds, day, month, year )

day2 = day+1
RunAt( year, month, day2, 00, 01, "\My Documents\Reset.mscr")

File 2 - Reset.mscr:

ToggleDisplay(on)
Reset

Is there any reason why this won't work?

I've run it anyway so I just have to wait 80 minutes or so til just after midnight....
[Touch HD Themes and Apps] str0nz0:
have a look at my old script, i am sure this will help you!

RemoveNotifications("\Storage Card\scripts\timecheck.mscr")
gettime(h,m,s,d,mo,y)

if (h = 23)
callscript("\Storage Card\scripts\gogsmoff.mscr")
d = (d+1)
if (d = 32)
d = 1
mo = (mo+1)
endif
if (mo = 4 or 6 or 9 or 11)
if (d = 31)
d = 1
mo = (mo+1)
endif
endif
if (mo = 2)
if (d = 29)
d = 1
mo = (mo+1)
endif
endif
RunAt(y, mo, d, 8, 5, "\Storage Card\scripts\timecheck.mscr")
#callscript("\Storage Card\scripts\podcast.mscr")
callscript("\Storage Card\scripts\potd.mscr")
sleepmessage(3, "going to sleep" )
exit
endif

if (h = 8)
callscript("\Storage Card\scripts\gogsmon.mscr")
#callscript("\Storage Card\scripts\mailcheck.mscr")
RunAt(y, mo, d, 23, 0, "\Storage Card\scripts\timecheck.mscr")
exit
endif

if (h < 8)
RunAt(y, mo, d, 8, 5, "\Storage Card\scripts\timecheck.mscr")
exit
endif

if (h > 8)
RunAt(y, mo, d, 23, 0, "\Storage Card\scripts\timecheck.mscr")
exit
endif
[Touch HD Themes and Apps] Cret:
Thanks mate - thats cool

Well - the good news is that I had the cunning plan of cheating and adjusting the clock on the phone so I'd only have to wait a couple of minutes. Should have thought of that one sooner! :D

And the next good news is that my code for the reset worked perfectly. The phone was asleep and when the clock changed to 00:01 the phone woke up, vibrated, and reset itself. Excellent!

So the only thing now is whether it will repeat that again tomorrow? I'm still not 100% certain about whether it will do this from the code above or only run once. Perhaps if it only does it once I should put the Schedule Rest.mscr file in the startup folder?

One other weird problem I have got at the moment though is that the PlaySound command does not work for some reason.

I've got a test file (PC) which is as follows:

PlaySound("C:\Users\Jim\Documents\sonar.wav")
PlaySound("C:\Users\Jim\Documents\hadoken.wav")
PlaySound("C:\Users\Jim\Documents\owl.wav")
Vibrate( 1500 )
Message ( "Test End" )

This works perfect and I get all 3 wavs playing then a beep for the vibrate and the message.

On the phone though with the following code the sounds do not play even though they are all there in the correct directory. I don't understand why.

The reason there are 3 wavs is to try and rule out format issues on the sound files by adding more than one.

What am I doing wrong?

PlaySound("\My Documents\sonar.wav")
PlaySound("\My Documents\hadoken")
PlaySound("\My Documents\owl.wav")
Vibrate( 1500 )
Message ( "Test End" )
[Touch HD Themes and Apps] PoisonWolf:
Cret,

Were you able to get it to reset at a specific time yet?

Cheers.
[Touch HD Themes and Apps] Cret:
Yes mate

You can see the code I wrote that's in post#12 uses 1 minute past midnight:

GetTime( hours, minutes, seconds, day, month, year )

day2 = day+1
RunAt( year, month, day2, [b]00, 01[/b], "\My Documents\Reset.mscr")

So it gets the current date/time on the first line, then the second line creates a new variable 'day2' which is 1 day after 'day' (ie today's date), if that makes sense!

It basically tells it to run the reset script 'tomorrow - at 00.01am', and it worked just fine.

My only questions now are

1) why the wav files won't play when this script works fine on the pc and the wav files themselves play fine on the phone, just not through the script

2) will the reset run every day? And if not, will adding the schedule file into start menu cure this?
[Touch HD Themes and Apps] PoisonWolf:
Cret,

This is what I've scripted up. You need to place it anywhere on your phone, preferrably on the device memory. Then use something like Resco Explorer or Total Commander to create a shortcut. Place the shortcut inside the Windows/Startup/ folder.

You simple place the time (international format) on the bolded lines below and ignore the rest. In the preview below, it is set to reset at 05:00 hours, meaning 5:00 AM (e.g., 8:00 PM = 20:00 hours, etc).

With this script, it'll reset everyday at a minute before the specified time (for logic purposes). There shouldn't be any bugs and there shouldn't be a need to toggle the display on. I've tested it and it seems to have worked. Let me know if there are any quirks. Enjoy.

Cheers.

# Scheduled Shutdown

Sleep(60000)

# Place your times here.
# Hour: 0 ~ 23
# Minute: 0 ~ 59

[COLOR="Red"]	RTHour = 5
RTMinute = 0[/COLOR]

If( RTMinute = 0 )
RTMinute = 59
If( RTHour = 0 )
RTHour = 23
Else
RTHour = RTHour - 1
EndIf
Else

RTMinute = RTMinute - 1

EndIf

While(1)
GetTime( Hour , Minute, Second )
if( Hour = RTHour && Minute = RTMinute )
Reset
EndIf
Sleep(30000)
EndWhile
[Touch HD Themes and Apps] Cret:
Thanks mate

I'll give this a try. I don't mind using yours now that I've had a good initial dabble with this code to get an idea of what Mortscript is about. I like it and it looks really useful!
[Touch HD Themes and Apps] str0nz0:
@PoisonWolf: Are you sure your Script works?

You only mention 3 parameters for the gettime command. This normally leads to a "invalid parameter count", because it expects to fill up 6 variables and not only 3.

@Cret: For the script i posted above. It should give you an idea how to solve the problem with reoccuring tasks. Your script will get a problem if you reach day 31, because it will go to 32 and will never run again :-) Thats why i wrote my script above. It should cover all options in a year.

For the Waves not playing, i have no idea why. I have never used it.

And for the every day running of a script: There is no need for a shortcut in the startup folders. Have a closer look at the runat / rerun command and the notification queue. You just have to tell your script to rerun every 24 hours
[Touch HD Themes and Apps] Cret:
Poisonwolf - Just tried yours after adding it into My Documents on the device memory and it worked perfectly.

What I'm not sure about though is that after the phone rebooted I changed the time in the code and ran the script again, but it does not work now. Eg it ran fine once but after changing the time it now does not work when the script is run again.

Any idea why?

Is there something that I need to find and kill off before it can be ran again?

I understand that adding it into the startup folder is how you get it to run the script after each daily reboot and add the reset to the notification queue in a looping structure, but this should happen just by launching the script manually so I don't know why it won't do that.

Thanks str0nz0 - I see the point you're making. I've not properly looked at rerun either so I will have a look at it - cheers :)
[Touch HD Themes and Apps] PoisonWolf:
Cret,

@stron: Yeah, it works. The gettime() function accepts either 3 or 6 variables. The manual explains this.

And yes, if you have changed the time, you need to overwrite the original file. Now, you can either reset your phone in order for the new changes to take place, or you can simply go under running processes and kill the mortscript.exe. If you have killed it instead, you'll need to go to the .mscr file and run it again.

Right now, I've tested it last night, and it doesn't seem to have run at 5 AM when I tried it. I'm not sure if it's due to the fact that the screen is turned off, so I'm going to try it again with ToggleDisplay(on) this time.

In case if you're wondering about battery drain using my route, I do not believe it uses much because it fluctuates anywhere from 0.0 to 0.70 (though not often at 0.70).

Cheers.
[Touch HD Themes and Apps] Cret:
Cool, cheers

Yeah I had the problem with stuff not running unless I turn the screen on. That seems to cure it.

That's useful to know I just kill the exe then run the exe/script again. Easy solution.

I'm guessing that if I wrote & ran a repeating script to reset once a day, then edited, renamed & ran it again with a different time, I would end up with several daily resets until I kill the exe?

I wish I could figure out why the wavs won't play though. Fine on the PC but the phone just won't have any of it!:rolleyes:
[Touch HD Themes and Apps] str0nz0:
Ok, i modified the Script from Poisonwolf to work correct.

First i removed the sleep in the first line, because it makes no sense.

Then i just added one line in the while loop

runat (timestamp()+86395, "\Storage Card\script.mscr")

You will have to correct the location and name of your script in that line.

So there is no need for a shortcut in the startup, because the entry in the notification queue survives the softreset. and after the first run the script will only launch at the given time and there will be no more looping.

I havent tested but this should work

# Scheduled Shutdown

# Place your times here.
# Hour: 0 ~ 23
# Minute: 0 ~ 59

[COLOR="Red"]	RTHour = 5
RTMinute = 0[/COLOR]

If( RTMinute = 0 )
RTMinute = 59
If( RTHour = 0 )
RTHour = 23
Else
RTHour = RTHour - 1
EndIf
Else

RTMinute = RTMinute - 1

EndIf

While(1)
GetTime( Hour , Minute, Second )
if( Hour = RTHour && Minute = RTMinute )
toggledisplay(on)
runat (timestamp()+86395, "\Storage Card\script.mscr")
Reset
EndIf
Sleep(30000)
EndWhile
[Touch HD Themes and Apps] PoisonWolf:
Cret,

No, you cannot have multiple instances of the same script. You can have multiple script, just not multiple instances. So even if you keep pressing on the .mscr file, only one of it will be running. Simply kill mortscript.exe to kill all running scripts (save for those that are on the notification queues).

About your sound file issues, one more thing to rule out is the spacing in "My Documents". Try to put it in a direct path without empty spaces. Notice how the PC version of your testing is different from the PDA version.

PlaySound("C:\Users\Jim\Documents\sonar.wav")
PlaySound("C:\Users\Jim\Documents\hadoken.wav")
PlaySound("C:\Users\Jim\Documents\owl.wav")

PlaySound("\My Documents\sonar.wav")
PlaySound("\My Documents\hadoken")
PlaySound("\My Documents\owl.wav")
Vibrate( 1500 )
Message ( "Test End" )

If it's not that, the only other guess I can tell you is to try running a single sound file at a time.

Cheers.

I personally prefer to avoid putting things in the notification queue. But if that's the route you wish to go, feel free to go that route. The 60 second sleep in the beginning is to let everything startup first before attempting the script starts. The delay also serves to ensure that the phone does not double reset on itself.
[Touch HD Themes and Apps] PoisonWolf:
Guys,

I apologize, my bad. Don't use my script. It doesn't work because for some reason, I've tested it and the phone is not able to turn on if you don't use RunAt. ToggleDisplay(on) is not able to wake the phone up from Standby.

Sorry Cret, you're going to have to use the RunAt route.

Cheers.
[Touch HD Themes and Apps] voetpad:
Do we have a robo defence game for The Blackstone ??? ! :D:D i like that game

i have played it on the dream!
[Touch Pro2, Tilt 2 Themes and Apps] Mahmoud Moussa:
please can you help me to get the Fring program for the TP2
[Touch Pro2, Tilt 2 Themes and Apps] SEQ:
Don't use Fring!!!

It'll slowdown your TP2 while it's running in the background...
[Touch Pro2, Tilt 2 Themes and Apps] Roberto79:
Just dl that one for TP(1) works for me...
[Touch Pro2, Tilt 2 Themes and Apps] Mahmoud Moussa:
Many many thanks for everyone
[Touch Pro2, Tilt 2 Themes and Apps] Inc:
1. Stop shouting

2. Yes I can. Download it at www.fring.com

/Inc
[Touch Pro2, Tilt 2 Themes and Apps] Deleted member 1096392:
Indeed, the shouting thing is quite annoying...

Edit: typo... :)
[Touch Pro2, Tilt 2 Themes and Apps] Mahmoud Moussa:
:eek::eek::eek::p:p:p:eek:
[Touch Pro2, Tilt 2 Themes and Apps] bhloo:
Fring doesn't detect wifi

Installed fring on my tp2, can't detect wifi. Any one got any idea or solution to this issue? :confused:
[Touch Pro2, Tilt 2 Themes and Apps] Deleted member 1096392:
I had the same issue, no WiFi connection. I uninstalled Fring, I didn't like it at all. The only advantage it has is audio through the earpiece. If Fring can do it, why can't skype?

Having said that, why are all the buttons so small in Skype? I have a WVGA screen, the buttons should be HUGE! ;)
[Touch Pro2, Tilt 2 Themes and Apps] arcanehacker:
hehe.. Whats even more annoying is asking for something that can be downloaded from the developers site itself.. is Google so hard to use?

http://tinyurl.com/nfj4vp
[Touch Pro2, Tilt 2 Themes and Apps] slaman:
Use audiorouter from the same company that makes SpeedBooster (teknosof or something?)... I have routed Skype to my earpiece successfully... now to only get Skype working with my cellular connection instead of wifi only...
[Touch Pro2, Tilt 2 Themes and Apps] bhloo:
Latest Version fring v3.35 works with WIFI

Downloaded fring v3.05.3.248 from www.fring.com, works with WIFI very well.

Alternatively can use Nimbuzz...
[Touch Pro2, Tilt 2 Themes and Apps] bhloo:
fring v3.35 all works

try install latest version of fring v3.35, works flawlessly....;)
[Touch Pro2, Tilt 2 Themes and Apps] bhloo:
try fring v3.35, works flawlessly

try using v3.35 works flawlessly ;)
[Touch Pro2, Tilt 2 Themes and Apps] aZzz.bZzz:
please anybody can share fring cab that works in earpiece? my rom is in signature

i tried dl it from official site (for tp1), also tried several cabs from another forums, no luck
[Touch HD Windows Mobile ROM Development] texture:
Hi,

I want to remove some elements in Settings>System like About and others,but I don't find where is created these shortcuts,anyone can help me?

Thanks.
[Touch HD Windows Mobile ROM Development] EpiphanyNL:
[HKEY_LOCAL_MACHINE\ControlPanel\MyCpl\3]

or

[HKEY_LOCAL_MACHINE\ControlPanel\3]
[Touch HD Windows Mobile ROM Development] texture:
I don't want to remove HTC cpl elements but system elements like Memory or Certificates for example...but in the registry i don't find is it possible to disable or hide these.
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] bigsteve:
I have a new TyTn now, (lost old one), I changed the boot screen too a CIA one i found.

I cant remember how i did it...

I have search put can only find THIS THREAD but that is for a different

model.

Can some one point me to a thread that allows me to change the TyTn boot screen???

Please.
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] scousemartin:
Depends on which boot screen you want to change. There are three of them. First one when you switch on , second when it initiates the gsm and third is windows boot screen. First two you need to create and flash to your device the third is simply called welcomehead.96.png and resides in the windows directory overwrite that file with one of your own thats 240x320 and it will show on startup

is this the image you are referring to

http://xdaforums.com/showpost.php?p=3078867&postcount=14

If thats what you want to have on your hermes

unzip the first attachment then run the ruu_wrapper copy the welcomehead.96 file over to the windows directory if you want to change the windows mobile loading screen too.

If you fancy creating your own use the splashscreenmaker attached, although its for the artemise it works fine on the hermes and wizard too, not sure about other devices. Just make sure the images are 240x320 and no more than 256 colours(well thats what i have found works)

Oh before anyone asks , as i am sure they will, this will not wipe your phone all it does is upgrade the boot screens
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] bigsteve:
Thanks very much

if i had known that the artemise worked i would of used that.....
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] scousemartin:
no problem steve, was that the screen you wanted
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] bigsteve:
sure was buddy

thanks again
[Touch Pro2, Tilt 2 Windows Mobile General] ancapeso:
On a new touch pro2, no mods no nothing, how can i check batery % ?

When TP2 connects to internet HDSPA or 3g how can i make it disconnect ? the solution i got was to disconnect phone and reconnect (my old tytn was easy... just click on the icon and disconnect...)

why the weather on the tf3d doesn't refresh auto? ie: updating at nigth i will get allways the moon on it... on the next day the moon will be there doesnt refresh to the next day and put the sun...

actually they are 3 questions :)

tanks in advance
[Touch Pro2, Tilt 2 Windows Mobile General] mbtmn:
You can't see battery percentage, but you can see a green indicator bar. Go to start > Settings > More. Then on the first tab (I think) you'll find an icon for battery.

For disconnecting data connection, go to start > Settings > Communication (or something) and touch the green bar next to 'Data Connection'. It will turn grey.

When on the weather tab, there are 2 buttons: Refresh and Menu. When going through the menu, you will somewhere find a setting to automatically download weather information.

I'm not sure on all the English terms as I don't use an English device, but I think I got close enough to the correct ones.
[Touch Pro2, Tilt 2 Windows Mobile General] ancapeso:
i don't use in english also :)

about the weather tab if i do that i will automaticly go to the internet get the lastest info that willl be charged by my operator... (not good) the problem is that i gets info for a couple days and should refresh that info that he was previous downloaded... even then the weather tab is a incomplete... millions of cities missing :| spw weather is far more complete...
[Touch Pro2, Tilt 2 Windows Mobile General] lovelldr:
You could just disable the weather tab, and use spb weather from the start menu if you'd prefer to do that? (I know the advice is not the best, but maybe usefull?!).

As for the missing cities in default weather app, if you download the Weather Database Editor, this allows you to add your local city...
[8525, TyTN, MDA Vario II, JasJam General] mushtash:
I have Upgraded custom ROM 6.1 with Radio 1.48.10. When I use Vodafone SIM it just searching for Network or shows No Services. In the same device I'm using other SIM from different ISP provider no issues. And I used same Vodafone SIM in different device no issue.

I have changed all the possible Radio from Hermes Wiki. Problem still persist.

What is the problem SIM or Device or ROM or Radio

It is Imate JasJam device.
[8525, TyTN, MDA Vario II, JasJam General] MystaMagoo:
Is it 'unlocked' ?