Related
Hi folks,
You guys might already know about this but I just discovered how to do it after doing some heavy googling over the past couple of days. Many thanks to the guy at this link who made the discovery!
How to lock down the clock on Windows Mobile devices
I was reading through some of the messages on the microsoft.public.dotnet.framework.compactframework newsgroup when I came upon a real gem of a message.
The key piece of knowledge being, that there is a special registry key, that will disable GUI access for the clock on Windows Mobile devices.
Application State Registry Key for Windows Mobile Clock
HKEY_LOCAL_MACHINE\Software\Microsoft\Clock\
If this is set to 0x11 the clock is enabled, as by default. If it is set to 0x30, or probably anything not 0x11, it is disabled and ignores any attempts to run.
If you are writting any kind of salesforce automation applications, or route management software, then you can see just how useful this feature is. You just add a special admin feature to enable and disable the ability to set the time, or handle it entirely from within your application.
Now I just need to find out why this key even exists, since I hate to find out the OS likes to change it under circumstance X.
// disable clock
System.Byte[] offValue = new byte[1];
offValue [0] = 0x30;
OpenNETCF.Win32.RegistryKey registryKey =
OpenNETCF.Win32.Registry.LocalMachine.OpenSubKey(@"\Software\Microsoft\Clock\", true);
registryKey.SetValue("AppState", offValue);
registryKey.Close();
// enable clock
System.Byte[] onValue = new byte[1];
onValue[0] = 0x11;
OpenNETCF.Win32.RegistryKey registryKey =
OpenNETCF.Win32.Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Clock\", true);
registryKey.SetValue("AppState", value);
registryKey.Close();
Click to expand...
Click to collapse
And the link to the original source -
http://www.cjcraft.com/Blog/PermaLink.aspx?guid=0b590db3-cc90-45fa-822e-acf91f031052
I was pulling my hair out over that one the last couple of days!
Cheers,
Dav
Hi dav!
I am sorry to burst your bubble, but I tried this registry hack, and found there is an easy way around it, with out editing the registry.
If you hold the OK hardware button (in the center of the joystick, on those devices that have it) then tap and hold the clock (in the task bar) you get a little menu with 2 options: Run and Clock.
If you choose clock from this menu, the app will start and the registry setting will automatically be altered so you will be able to open clock settings normally from now on.
Further investigation showed that the lower 4 bit of the AppState walue (ones digit) simply selects on what tab the clock app will open. Legal values are 1-3. Any illegal value (like 0) will jam the app preventing it from opening by tapping the icon in settings. I suspect that if a command line switch is specified it overwrites the registry value and the app opens any way. (that’s how the menu works)
Just thought you should know.
Hi levenum,
Thanks for the insights! I just tried it too and sadly that is the case ;-( Mmmh, I wonder if there is a way to hide 'Clock' from the Run\Clock thingy? or disable the Clock in some other way?
mmh, back to the drawing board...
Dav
Here's what you might try:
Create a cab that deploys an empty clock.exe to windows directory on the device.
Clock.exe is a ROM file, but a cab should be able to overwrite it (it won't work manually). This way no matter who calls it (menu or control panel) they will see the empty exe and nothing will happen.
Sounds like a good idea to me! I'll give it a try and see how it goes. Thanks for your continued help
Dav
Worked nice Thankyou!
btw, do you think that overwriting the Clock.exe would have any effect on the 'displaying' of the date in the Today Screen? By clicking the date we launch the Clock.exe program, but something else other than Clock.exe must control what shows the current date, right? I mean, the current date wouldnt just stay on the date on which we delete Clock.exe?
Cheers and thanks again,
Dav
Actually, if the exe was responsible for the date on the today screen, you wouldn't see anything once you overwritten it. Today date is just another plug-in. I think its clockdll.dll but I am not sure. Whatever the file name, it takes the date directly from the system clock.
As I understand it clock.exe is just a little GUI utility for setting system time, and alarms.
That sounds right and what i was thinking, always good to have a second opinion for confimration.
All the best,
Dav
seems like you guys might know what your doing, so do you know how to get the battery removed and the clock back on the today screen of WM5 latest rom releases....
levenum said:
Hi dav!
I am sorry to burst your bubble, but I tried this registry hack, and found there is an easy way around it, with out editing the registry.
If you hold the OK hardware button (in the center of the joystick, on those devices that have it) then tap and hold the clock (in the task bar) you get a little menu with 2 options: Run and Clock.
If you choose clock from this menu, the app will start and the registry setting will automatically be altered so you will be able to open clock settings normally from now on.
Further investigation showed that the lower 4 bit of the AppState walue (ones digit) simply selects on what tab the clock app will open. Legal values are 1-3. Any illegal value (like 0) will jam the app preventing it from opening by tapping the icon in settings. I suspect that if a command line switch is specified it overwrites the registry value and the app opens any way. (that’s how the menu works)
Just thought you should know.
Click to expand...
Click to collapse
wow..thanx for this. worked like a charm on my wing (and 2 yrs after it was posted i might add =P). i thought my alarm clock was lost FOREVER!
Hi,
I found the following code in this discussion thread:
// disable clock
System.Byte[] offValue = new byte[1];
offValue[0] = 0x30;
OpenNETCF.Win32.RegistryKey registryKey =
OpenNETCF.Win32.Registry.LocalMachine.OpenSubKey(@"\Software\Microsoft\Clock\", true);
registryKey.SetValue("AppState", offValue);
registryKey.Close();
It looks pretty useful to me but It has some OpenNETCF keyword.
Please suggest me what is OpenNETCF? Is it an additional third
party compact framework and how can I get this?
Also, if it is inbuild reference by Microsoft, from where to get it?
-Abhishek Maitrey
OpenNETCF is an extra SDK for WiMo devices. Search for it....
In this situation it's not needed.
Is there any way to refresh the Today screen background without using
Code:
PostMessage(HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0);
That message causes the Today executable to reload all the plugins, so if I send that message from within a plugin, I will cause an endless loop...
Scewbedew said:
Is there any way to refresh the Today screen background without using
Code:
PostMessage(HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0);
That message causes the Today executable to reload all the plugins, so if I send that message from within a plugin, I will cause an endless loop...
Click to expand...
Click to collapse
Here ya' go...
hmm, you can create a simple check in ur app to avoid the loop (like a registry setting) if the value is set then dont post the message and then clear the setting..
That "Refresh Today.exe" seems to do the trick. What's the secret? Is there some API calls I can incorporate in my application?
No, can't do that. In order to be non-intrusive, my Today plugin must restore the original background image when it is unloaded. So the first thing that happens when I've changed the background is that my plugin gets unloaded...and I restore the background. Then my plugin gets re-loaded, and I change the background, which causes my plugin to be unloaded...
Scewbedew said:
No, can't do that. In order to be non-intrusive, my Today plugin must restore the original background image when it is unloaded. So the first thing that happens when I've changed the background is that my plugin gets unloaded...and I restore the background. Then my plugin gets re-loaded, and I change the background, which causes my plugin to be unloaded...
Click to expand...
Click to collapse
Will this program get rid of the taskbar at the bottom when the programs are no longer running? I have this problem with Palringo. Even after I close the program the taskbar is there with nothing on it.
Scewbedew said:
No, can't do that. In order to be non-intrusive, my Today plugin must restore the original background image when it is unloaded. So the first thing that happens when I've changed the background is that my plugin gets unloaded...and I restore the background. Then my plugin gets re-loaded, and I change the background, which causes my plugin to be unloaded...
Click to expand...
Click to collapse
About the refreshtoday.exe, it works because it is an exe, not a today plugin, hence it is not reloaded when the screen is refreshed.
And if the above statement was in response to my suggestion, then I think you didnt get what I suggested. I suggest the following steps.
1. Create a registry entry (say HKLM\mySoft\refresh) and init it with 0.
2) Have a check in the beginning of ur plugin to check for this registry entry. If value is 0 then you can refresh, if value is 1 just set it to 0 and do nothing.
3) Now, when you are about to post the refresh message, before posting set this registry entry to 1.
Following these three steps will do wht u want...
Just figured out that New Gsensor Driver from Dimond2 is suitable for customisations. You do not need 3rd party solutions to make other application to rotate the screen. But it could be done directly in the registry, but i think it's a matter of time to have GUI
Special thanks to the person how created the attached cab unfortunetely i do not know his name (Jmz i assume)
here is the example for RSSHub
You need to specify the module name (application exe)
and put into the white list Window names (could be found by TaskMrg)
Then reboot and enjoy
[HKEY_CURRENT_USER\Software\HTC\HTCSENSOR\GSensor]
"AutoRotation"=dword:00000001
[HKEY_CURRENT_USER\Software\HTC\HTCSENSOR\GSensor\WhiteList]
"RSSHub_ItemView"="ItemViewWindow"
"RSSHub_HeadLine"="HeadLineWindow"
"RSSHub"="NewsBreak_Main"
"Calculator"="CalculatorMain"
[HKEY_CURRENT_USER\Software\HTC\HTCSENSOR\GSensor\ModuleName]
"RSSHub"="\Windows\RSSHub.exe"
"Calculator"="\Windows\htcCalculator.exe"
PS. The entry for Calculator is for New HTC Calc with a landscape mode
bangkokru said:
Just figured out that New Gsensor Driver from Dimond2 is suitable for customisations. You do not need 3rd party solutions to make other application to rotate the screen. But it could be done directly in the registry, but i think it's a matter of time to have GUI
Special thanks to the person how created the attached cab unfortunetely i do not know his name (Jmz i assume)
here is the example for RSSHub
You need to specify the module name (application exe)
and put into the white list Window names (could be found by TaskMrg)
Then reboot and enjoy
[HKEY_CURRENT_USER\Software\HTC\HTCSENSOR\GSensor]
"AutoRotation"=dword:00000001
[HKEY_CURRENT_USER\Software\HTC\HTCSENSOR\GSensor\WhiteList]
"RSSHub_ItemView"="ItemViewWindow"
"RSSHub_HeadLine"="HeadLineWindow"
"RSSHub"="NewsBreak_Main"
"Calculator"="CalculatorMain"
[HKEY_CURRENT_USER\Software\HTC\HTCSENSOR\GSensor\ModuleName]
"RSSHub"="\Windows\RSSHub.exe"
"Calculator"="\Windows\htcCalculator.exe"
PS. The entry for Calculator is for New HTC Calc with a landscape mode
Click to expand...
Click to collapse
check the thread by nissedilligaf......
will this cab work on HD?
HTC HD2
I've tried it on my HTC HD2. Seems it does not work. But I just downloaded the application on my device and opened it. Then I soft reset. But as I saaid nothing happened. Any help?
bangkokru said:
Just figured out that New Gsensor Driver from Dimond2 is suitable for customisations. You do not need 3rd party solutions to make other application to rotate the screen. But it could be done directly in the registry, but i think it's a matter of time to have GUI
Special thanks to the person how created the attached cab unfortunetely i do not know his name (Jmz i assume)
here is the example for RSSHub
You need to specify the module name (application exe)
and put into the white list Window names (could be found by TaskMrg)
Then reboot and enjoy
[HKEY_CURRENT_USER\Software\HTC\HTCSENSOR\GSensor]
"AutoRotation"=dword:00000001
[HKEY_CURRENT_USER\Software\HTC\HTCSENSOR\GSensor\WhiteList]
"RSSHub_ItemView"="ItemViewWindow"
"RSSHub_HeadLine"="HeadLineWindow"
"RSSHub"="NewsBreak_Main"
"Calculator"="CalculatorMain"
[HKEY_CURRENT_USER\Software\HTC\HTCSENSOR\GSensor\ModuleName]
"RSSHub"="\Windows\RSSHub.exe"
"Calculator"="\Windows\htcCalculator.exe"
PS. The entry for Calculator is for New HTC Calc with a landscape mode
Click to expand...
Click to collapse
Hi bangkokru,
I am struggling a little with the 'White List Window Names' bit. What do I need to enter in this section for Adobe Reader LE? Using TaskMrg brings up 'Adobe Reader LE' but this doesnt seems to work.
Your help is greatly appreciated.
For some time, I've been using WVGAFIX3 on my Blackstone to run older games supporting only 320x240 (QVGA) or 640x480 (VGA) resolutions.
As excellent as WVGAFIX3 is, running WVGAFIX3 "by hand" has always been annoying, especially if I forget it the first time, and copying and editing the typical Mortscript for each new game is a hassle:
Code:
RunWait("\Windows\WVGAFIX3APP.exe", "-640")
Sleep(500) # pause suggested by mr_deimos, to allow the dust to settle
RunWait("\path\to\game.EXE)
Run("\Windows\WVGAFIX3APP.exe", "-800")
These scripts have to be stored somewhere, and icons can't be assigned to them, so they're not a good alternative to the plain shortcut.
My next step was to generalize the script (called RunVGA.mscr):
Code:
RunWait("\Windows\WVGAFIX3APP.exe", "-640")
Sleep(500)
RunWait(arg1)
Run("\Windows\WVGAFIX3APP.exe", "-800")
Now, arg1 can be given at the command line in the shortcut - this example is Shift.lnk (for this free, excellent little time waster):
Code:
132#"\Windows\Mortscript.exe" "\bin\RunVGA.mscr" arg1="\Program Files\Shift\Shift.exe" ?\Program Files\Shift\Shift.exe,
(The Shift game can really mess up the Blacstone's display if WVGAFIX3 is not used - I've had to soft reset a couple of times when I forgot!)
This shortcut will look like the original, as the icon is preserved (by repeating the EXE path between "?" and ",", and providing no icon ID after ",", thus using the default ID). When launched, RunVGA script above will do its thing.
Now, the next improvement would be to simplify the shortcut (at the cost of launching an extra process). I have modified RunMscr.exe found here. When renamed to yourscript.exe, the original executes
Code:
Mortscript.exe yourscript.mscr argument1 argument2 ...
My patched version (attached) executes
Code:
Mortscript.exe yourscript.mscr arg1=argument1 arg2=argument2 ...
Notice that RunMscr.exe implicitly names the arguments, something which should have been done by Mortscript a long time ago, in my opinion. Thus, I can copy RunMscr.exe to RunVGA.exe, and modify the shortcut above to
Code:
132#"\bin\RunVGA.exe" "\Program Files\Shift\Shift.exe" ?\Program Files\Shift\Shift.exe,
(Notice that I keep all scripts and manually copied executables in \bin - adjust accordingly in the scripts provided!)
Having RunVGA.exe with my method of passing arguments, means that you can also launch an executable in VGA mode directly from Resco Explorer by using tap and hold, "Open With...", and browsing to RunVGA.exe.
Now, I was pretty happy with this, but wanted a lazy man's solution for creating these shortcuts (and reverting to the original). The following describes how to toggle a shortcut between its original version and its RunVGA version, again using "Open with..." in Resco Explorer.
First create ToggleVGAfix.mscr:
Code:
line=ReadLine(arg1)
Split(line,"#",1,length,shortcut)
Split(shortcut,"?",1,shortcut,icon)
If (Find(shortcut, "RunVGA") = 0)
# This is a normal shortcut, convert to RunVGA shortcut
If (icon eq "")
icon = shortcut
# Strip quotes from icon string
While (CharAt(icon, Length(icon)) eq """")
icon = SubStr(icon, 1, Length(icon)-1)
EndWhile
While (CharAt(icon,0) eq """")
icon = SubStr(icon, 2)
EndWhile
icon = icon & ","
EndIf
line = length & "#" & """\bin\RunVGA.exe"" " & shortcut & " ?" & icon
Else
# This is a RunVGA shortcut, revert to original
Split(shortcut,"RunVGA.exe"" ",1,dummy,target)
line = length & "#" & target
EndIf
# Uncommment if you want to keep the original
#Rename(arg1, arg1 & ".bak", TRUE)
WriteFile(arg1, line)
Next, copy RunMscr.exe to ToggleVGAfix.exe (next to the ToggleVGAfix.mscr script above).
In Resco Explorer, navigate to a shortcut you want to test this on, tap and hold, select Open With, and browse to ToggleVGAfix.exe. Then try launching the shortcut itself - if all goes well, the program will run in VGA mode, and revert back to WVGA when ended.
With all this behind us, we've accomplished this: The next time you install a QVGA/VGA game, navigate to the \Windows\Start Menu\Programs\Games (according to your locale) folder, tap and hold the shortcut, select ToggleVGAfix, and you should be good to go from your normal Games menu.
A small caveat: I've noticed that WVGAFIX3 occasionally doesn't kick into effect in time for the "wrapped" exe. I may look into this if it proves to be enough of a problem. Edit: added a Sleep which fixed this problem for mr_deimos.
great job! I wish wvga worked on wm 6.5 so I could use this with wvga
this can be useful with other programs tho too, do you think i can use this to disable windows mobile's setting temporarily while certain programs are running? I'm having a problem with an music player going into sleep mode while I'm playing a song but I don't want to disable windows mobile sleep completely cause it saves so much battery life.
also is it possible to use this to run a program automatically in the background by ridirecting to the today screen right after running the program?
Nice job. Believe me or not, but i made a script identical to the first one you posted a week ago - just for launching Shift on my wvag toshiba g900 But i just put the shortcut to mscr file in the start menu - you actually can change it's icon so it was good enough for me.
My shortcut is:
Code:
104#"\Storage Card\Program Files\Games\Shift\Shift.mscr"?\Storage Card\Program Files\Games\Shift\Shift.exe,0
But of course, your automagic solution for toggling wvgafix is much better than doing everything by hand
Just a little note - you might want to add a Sleep(500) or even Sleep(1000) before running the app itself. Just using the RunWait to launch wvgafix usually works, but today when i launched shift with script without Sleep() the game actually started before wvgafix finished resizing the screen. So all i got was a black screen. I could close shift by tapping in the top-right corner of the screen, but taskbar remained hidden and i had to soft-reset to get it back. It happened twice in a row. It's seems to be the same problem you're facing. In my case it was probably caused by the fact that my pda is running underclocked a bit (when i was first testing the script it was running at full speed). After putting in the additional 1-second sleep everything works like a charm And the difference in startup time isn't really noticeable.
CowMix said:
great job! I wish wvga worked on wm 6.5 so I could use this with wvga
Click to expand...
Click to collapse
Yes, this is one of the reasons I'm postponing 6.5. (The other, of course, is that kwbr has not yet released a Topix based on 6.5 )
this can be useful with other programs tho too, do you think i can use this to disable windows mobile's setting temporarily while certain programs are running? I'm having a problem with an music player going into sleep mode while I'm playing a song but I don't want to disable windows mobile sleep completely cause it saves so much battery life.
Click to expand...
Click to collapse
Unless your player has the option to disable sleep, modifying my script(s) will probably work fine. Simply replace the Run statements for WVGAFIX3 with whatever executables or registry changes you want to happen. For registry changes, you may want the safeguard of resetting the "standard" values at startup, in case your phone resets or turns off while your player (and the script) is running.
also is it possible to use this to run a program automatically in the background by ridirecting to the today screen right after running the program?
Click to expand...
Click to collapse
Probably! Replace the code in the first script with something like this (untested):
Code:
Run(arg1)
Sleep(1000)
Show("Start")
A different take:
Code:
Run(arg1)
title = "Title of window to hide"
WaitFor(title, 30)
Minimize(title)
This will need more work to use with my shortcuts, as this script also needs the title of the window to hide. The benefit is that Windows will show the previously active window instead of Today, which is usually what you want.
mr_deimos said:
Nice job. Believe me or not, but i made a script identical to the first one you posted a week ago - just for launching Shift on my wvag toshiba g900
Click to expand...
Click to collapse
I think many of us have done a similar job with Shift .
But i just put the shortcut to mscr file in the start menu - you actually can change it's icon so it was good enough for me.
Click to expand...
Click to collapse
That works - I would have preferred to put the mscr directly into the Start menu (to avoid having to stash them somewhere else). In this case the icon is determined by the mscr extension, which looks dull, to say the least .
Code:
104#"\Storage Card\Program Files\Games\Shift\Shift.mscr"?\Storage Card\Program Files\Games\Shift\Shift.exe,0
Is 0 the icon ID, or just the "default" icon? I simply tried with nothing after the comma, and it seemed to pick up the default icon in each EXE/DLL.
But of course, your automagic solution for toggling wvgafix is much better than doing everything by hand
Click to expand...
Click to collapse
Thanks - it's something I've been meaning to figure our for at least 6 months, since I learned that WVGAFIX3 takes command line parameters.
Just a little note - you might want to add a Sleep(500) or even Sleep(1000) before running the app itself. ...
Click to expand...
Click to collapse
Thanks - added!
ugumba said:
Is 0 the icon ID, or just the "default" icon? I simply tried with nothing after the comma, and it seemed to pick up the default icon in each EXE/DLL.
Click to expand...
Click to collapse
It seems the default icon ID - the one displayed by the OS. I didn't even know you can just omit this parameter So probably both ways will give the same results.
Great thing! I tried and it works! But I have another problem. I am using Fingerkeyboard and when I switch the resolution to VGA it is still showing me error that this resolution is not supported (there is download for each resolution and it is not possible to have WWGA and VGA installed).
So my question is - it is possible to change software keyboard by Mortscript? And then, when application ends change it back?
Thank you
I found the solution, I am switching the keyboards with this tool from Vijay555: http://forum.xda-developers.com/showthread.php?t=242503
Great thing, so now I don't have to remember to change keyboard, change screen...
ugumba said:
For some time, I've been using WVGAFIX3 on my
In Resco Explorer, navigate to a shortcut you want to test this on, tap and hold, select Open With, and browse to ToggleVGAfix.exe.
Click to expand...
Click to collapse
It seems that you don't need the non-freeware resco explorer for that - the file explorer extension from here:
http://forum.xda-developers.com/showthread.php?t=421723
also provides this functionality. You would just need to make sure that the shortcut to ToggleVGAFix.exe is in the start menu (the file explorer extension can't browse for program to open file with).
ugumba said:
For some time, I've been using WVGAFIX3 on my Blackstone to run older games supporting only 320x240 (QVGA) or 640x480 (VGA) resolutions.
As excellent as WVGAFIX3 is, running WVGAFIX3 "by hand" has always been annoying, especially if I forget it the first time, and copying and editing the typical Mortscript for each new game is a hassle:
Code:
RunWait("\Windows\WVGAFIX3APP.exe", "-640")
Sleep(500) # pause suggested by mr_deimos, to allow the dust to settle
RunWait("\path\to\game.EXE)
Run("\Windows\WVGAFIX3APP.exe", "-800")
These scripts have to be stored somewhere, and icons can't be assigned to them, so they're not a good alternative to the plain shortcut.
My next step was to generalize the script (called RunVGA.mscr):
Code:
RunWait("\Windows\WVGAFIX3APP.exe", "-640")
Sleep(500)
RunWait(arg1)
Run("\Windows\WVGAFIX3APP.exe", "-800")
Now, arg1 can be given at the command line in the shortcut - this example is Shift.lnk (for this free, excellent little time waster):
Code:
132#"\Windows\Mortscript.exe" "\bin\RunVGA.mscr" arg1="\Program Files\Shift\Shift.exe" ?\Program Files\Shift\Shift.exe,
(The Shift game can really mess up the Blacstone's display if WVGAFIX3 is not used - I've had to soft reset a couple of times when I forgot!)
This shortcut will look like the original, as the icon is preserved (by repeating the EXE path between "?" and ",", and providing no icon ID after ",", thus using the default ID). When launched, RunVGA script above will do its thing.
Now, the next improvement would be to simplify the shortcut (at the cost of launching an extra process). I have modified RunMscr.exe found here. When renamed to yourscript.exe, the original executes
Code:
Mortscript.exe yourscript.mscr argument1 argument2 ...
My patched version (attached) executes
Code:
Mortscript.exe yourscript.mscr arg1=argument1 arg2=argument2 ...
Notice that RunMscr.exe implicitly names the arguments, something which should have been done by Mortscript a long time ago, in my opinion. Thus, I can copy RunMscr.exe to RunVGA.exe, and modify the shortcut above to
Code:
132#"\bin\RunVGA.exe" "\Program Files\Shift\Shift.exe" ?\Program Files\Shift\Shift.exe,
(Notice that I keep all scripts and manually copied executables in \bin - adjust accordingly in the scripts provided!)
Having RunVGA.exe with my method of passing arguments, means that you can also launch an executable in VGA mode directly from Resco Explorer by using tap and hold, "Open With...", and browsing to RunVGA.exe.
Now, I was pretty happy with this, but wanted a lazy man's solution for creating these shortcuts (and reverting to the original). The following describes how to toggle a shortcut between its original version and its RunVGA version, again using "Open with..." in Resco Explorer.
First create ToggleVGAfix.mscr:
Code:
line=ReadLine(arg1)
Split(line,"#",1,length,shortcut)
Split(shortcut,"?",1,shortcut,icon)
If (Find(shortcut, "RunVGA") = 0)
# This is a normal shortcut, convert to RunVGA shortcut
If (icon eq "")
icon = shortcut
# Strip quotes from icon string
While (CharAt(icon, Length(icon)) eq """")
icon = SubStr(icon, 1, Length(icon)-1)
EndWhile
While (CharAt(icon,0) eq """")
icon = SubStr(icon, 2)
EndWhile
icon = icon & ","
EndIf
line = length & "#" & """\bin\RunVGA.exe"" " & shortcut & " ?" & icon
Else
# This is a RunVGA shortcut, revert to original
Split(shortcut,"RunVGA.exe"" ",1,dummy,target)
line = length & "#" & target
EndIf
# Uncommment if you want to keep the original
#Rename(arg1, arg1 & ".bak", TRUE)
WriteFile(arg1, line)
Next, copy RunMscr.exe to ToggleVGAfix.exe (next to the ToggleVGAfix.mscr script above).
In Resco Explorer, navigate to a shortcut you want to test this on, tap and hold, select Open With, and browse to ToggleVGAfix.exe. Then try launching the shortcut itself - if all goes well, the program will run in VGA mode, and revert back to WVGA when ended.
With all this behind us, we've accomplished this: The next time you install a QVGA/VGA game, navigate to the \Windows\Start Menu\Programs\Games (according to your locale) folder, tap and hold the shortcut, select ToggleVGAfix, and you should be good to go from your normal Games menu.
A small caveat: I've noticed that WVGAFIX3 occasionally doesn't kick into effect in time for the "wrapped" exe. I may look into this if it proves to be enough of a problem. Edit: added a Sleep which fixed this problem for mr_deimos.
Click to expand...
Click to collapse
Hi, sounds really great. but i have problems to understand...
which files do i need and where i have to place them?
do i need for every game a own file?
greetings
Clearly, getting this setup on your device is left as an exercise for the reader! I basically did this for myself, but wanted to share something I found useful, and explain how I got there. Maybe if there's enough interest, I'll try making a CAB.
I'll try to clarify a bit, though:
1. You need Mortscript installed (I use 4.2 which comes with SASHIMI)
2. You need WVGAFIX3 installed.
3. You need 2 scripts copied from my first post, named RunVGA.mscr and ToggleVGAfix.mscr. If you already have a folder for your personal scripts collection (I use \Storage Card\bin), I suggest you put them there.
4. You need my version of runmscr.exe, attached to my first post, copied to your scripts folder as RunVGA.exe and ToggleVGAfix.exe.
5. You need a file explorer capable of handling alternate associations, so that you can register the two executables as "handlers" for the .lnk extension. On my device, Resco Explorer is indispensable.
6. Finally (the hard part) you need to loosely follow and understand the instructions in the first post, and adjust them to your situation when needed. The important part is after the ToggleVGAfix code (2 paragraphs).
Except for editing ToggleVGAfix.mscr according to your scripts folder, you should never have to edit a file, understand the .lnk format or really understand Mortscript. (All my talk around the Shift shortcut is just me being long winded and feeling I have to explain everything. See how this "little" post turned out? )
If this seems mystical or unclear, I suggest reading the Mortscript manual - you'll be happy you did. Also, Barbudor's page on the original runmscr might shed some light on my rants.
Hey, sorry for jumping on after the horse has bolted, I've been dead for a while, but it's better now...
There's another version of SipSwitch out, called VJSipSwitch (I think).
Don't use the old one, because although functional, I wrote it when I didn't know how to code, akin to a thousand monkeys = Shakespeare.
V
Hi All,
I have written this little tutorial by piecing togethor bits of info from other forums and threads. Some of you will probably know this already but this is for those who are struggling:
To get the g sensor rotating any application that doesnt do so already you will need to edit the registry on your device.
Using your preferred registry editor navigate to:
HKCU\Software\HTC\HTCSENSOR\GSensor\ModuleName
Here you must create a new string value. The name of your string is whatever you want it to be. The value of your string would be the path to the exe of the program you wish to rotate.
Once this is done you must then navigate to:
HKCU\Software\HTC\HTCSENSOR\GSensor\WhiteList
Here you must again create a new string value.
The name again is whatever you want it to be... the value would be the class name of the application you are attempting to rotate.
For example.... to get excel rotating with the G sensor:
HKCU\Software\HTC\HTCSENSOR\GSensor\ModuleName
Create new string value... i named it Excel Mobile. Value is:
windows\pxl.exe
HKCU\Software\HTC\HTCSENSOR\GSensor\WhiteList
Create new string value... again i named it Excel Mobile. Value is:
BOOKWIN
Create second new string value... i named it Excel Mobile2. Value is:
PXLMainWnd
Exit your registry editor and soft reset the device. Job done. Excel will now rotate within the open file browser (PXLMainWnd) and also within any open workbook (BOOKWIN)
For any particular app you should be able to figure out what the full path is to your exe but to get class names use dotfreds task manager:
http://www.dotfred.net/TaskMgr.htm
Once the task manager is installed.... start your app... then start the task manger... go to applications tab and long press on your app which will be listed if it is still running... select details. Go to the windows tab... this screen will list all of the classes currently accessed by your app. Ususally the ones to add into the whitelist will be the ones that are preceded by the app name but not always.
To get you guys started here are the settings for word:
windows\pword.exe
and you need to add two classes to the white list:
WordPad
Pocket Word
Remember that class names are case sensitive.
disclaimer: I TAKE NO RESBONSIBILITY FOR ANY DAMAGE TO ANYONES DEVICE BY POSTING THIS QUICK TUTORIAL. YOU CAN SERIOUSLY DAMAGE YOUR DEVICE IF YOU EDIT THE REGISTRY INCORRECTLY... IF YOU DO NOT KNOW WHAT YOU ARE DOING LEAVE IT WELL ALONE!!!!
bump cos ive changed the title!
can you find the modulename/whitelist for the messaging (SMS/MMS) tab? It's the only one I have trouble rotating.
lude219 said:
can you find the modulename/whitelist for the messaging (SMS/MMS) tab? It's the only one I have trouble rotating.
Click to expand...
Click to collapse
ill have a look if i get some time.
im having trouble getting the lifestyle home page in spb shell rotating atm!
Audio Oblivion said:
ill have a look if i get some time.
im having trouble getting the lifestyle home page in spb shell rotating atm!
Click to expand...
Click to collapse
thank you, and take your time =) btw, I just wanna be clear that I didn't mean the messaging tab on the home/sense screen, I meant the default win6.5 screen.
Thanks for this post, I am trying to find the details for a new app called DynaInk. I've followed your instructions and I am about to see if it worked?
*** Drum Roll ***
It worked, I used #NETCF_AGL_BASE_
Thank You
I applied this trick for Notepad which is a simple text editor that doesn't even require installation:
http://www.shamasis.net/projects/notepad-mobile/
After installing Dotfred's Task manager it showed me several string values for Notepad.exe and one of them was same as Nighthawk's DynaInk: #NETCF_AGL_BASE_ so I added it for my Notepad.exe.
Now it rotates with G-sensor
Thank you, Audio Oblivion for this guide!
p.s. What kind of damage to the device could possibly be done by adding those strings with those values? One could delete them if there's no result ?!?
Great post, works very well except for 1 program.
Perhaps you can help me out with the class name of TomeRaider3.
Program is TomeRaider3AU.exe, but for the Whitelist entry I always get different ClassNames when I start it as just like: "Afx:83ab6eaa:0, next time I get Afx:d54d7832:0, and so on.
Can anyone please help me out with this ?
many thanx in advance
Edit: Found the solution. I have added a ModuleName Wikipedia with Value "\Programme\TomeRaider3\Wikipedia.tr3 and a Whitelist entry for Wikipedia called "Dialog", for the Whitelist entry of TomeRaider I also used "Dialog", now it works very well.
lude219 said:
thank you, and take your time =) btw, I just wanna be clear that I didn't mean the messaging tab on the home/sense screen, I meant the default win6.5 screen.
Click to expand...
Click to collapse
I launched the default wnimo messaging screen and saw a process called tmail.exe appear.
search for tmail.exe on you device and use its full path as the module name. its probably windows\tmail.exe
for class entry in whitelist try: Dialog
If thats not it then start messaging, lauch dotfreds task manager, long key press on tmail.exe... click on windows and try every class you see!
I have now found that gyrator works quite well if you want EVERY screen on your device to rotate with the acceleromter... however... even though it is set to rotate everything... not all windows work. I still had to add in certain aspects of SPB shell to the whitelist for instance. Also... HTC Sense homescreen doesnt like being rotated.
drkalo said:
p.s. What kind of damage to the device could possibly be done by adding those strings with those values? One could delete them if there's no result ?!?
Click to expand...
Click to collapse
You wont damage your device if you follow my instructions carefully. The values you are changing are safe to add, delete and edit at any time (although dont touch what is already in the registry before you started adding to it). The discalimer is there in case someone messes up their registry by doing something incorrectly!
What about the programs that have the same Class name eg. "Dialog".
As i noticed it's enough to add process name to ModuleName or Class Name to WhiteList. No need to put both.
Better to use ModuleName if you have several applications that both have eg "Dialog" but one of them you do not want to rotate.
Eg. Nimbuzz - Dialog, HTC phone app - also Dialog. I do not want to rotate Phone So for me works only the ModuleName for the Nimbuzz.
For other apss I only include data to whitelist In fact there is two lists - by process name and by Window class...
Is there a similar way to enable the "Pinch to Zoom" feature for programs by just adding the programm to some registry entries?
TomTom
This is great
added TT7 = MunichWinClass to the white list.. now I can use TomTom in landscape
Thank you for this information.
I've done 3 programs;
Resco Explorer 2008
ModuleName
\Program Files\Resco Explorer\Explorer.exe
WhiteList
RESCO_EXPLORER_CLASS
and
Palm Digital Media eReader for windows mobile
ModuleName
\Program Files\Peanut Press\eReader.exe
WhiteList
PalmDigitalMediaWin
IME
and
1-Calc
ModuleName
\Program Files\OmegaOne\1-Calc\1-Calc.exe
WhiteList
Dialog
I can't take responsibility if these changes don't work for someone or if they brick their device.
Google maps, OziExplorer, File Explorer & Garmin
Thanks for the detailed info
ModuleName
"GMaps"="\Program Files\GoogleMaps\GoogleMaps.exe"
"Ozi"="\Storage Card\OziExplorer 2\OziExplorerCE.exe"
"FileMan"="\Windows\fexplore.exe"
"Garmin"="\Storage Card\Garmin\Apps\WM\QuePPC.exe"
WhiteList
"GMaps"="GoogleMapsMobile"
"Ozi"="OziExplorer"
"FileMan"="FEXPLORE"
"Garmin"="QUE_SUBAPP_WND_CLASS"
Thanks for this have done tomtom too. Perfect!!
Edit: Could anyone put this in a cab for me please?
Dir of .exe = \Storage Card\Program Files\TomTom Navigator.exe
Value = MunichWinClass
Not working
Hi all,
I have tried to apply this procedure but my applications still do not rotate.
I have tried both modifying the registry by hand, and using BsB Tweaks to rotate Excel but with no success. Any suggestions to share?
EDIT: I have tried disabling and re-enabling the Rotate feature (AutoRotation -> 0 -> 1), resetting the phone after each change, and now NO APPLICATION will rotate: not even HTC messaging nor the Sense Pictures tab.
HELP!!!!
EDIT 2: Solved! I've just found out by pure chance that rotating works only counterclockwise, while I assumed it should work both ways!