PDA

View Full Version : Force Titanium to Refresh?


digital_elysium
6th July 2009, 11:43 AM
This is hopefully painfully easy for experienced developers on here, but I've googled till my fingers bled and have not been able to find a suitable answer.

How do I force the Titanium menu in WM6.5 to refresh... i.e. pick up new data from the Windows registry?

For the old "Today" screen, advice seems to be use the Send Message command to broadbast an INI change to all open Windows:


Public Shared HWND_BROADCAST As IntPtr = IntPtr.op_Explicit(&HFFFF)
Public Const WM_WININICHANGE = &H1A
---------------------------------------
ret = SendMessage(HWND_BROADCAST, WM_WININICHANGE, 252, 0)


But this doesn't seem to be working for Titanium.

Anyone got any ideas?

larbke666
6th July 2009, 12:08 PM
I'm just using the refresh Titanium.exe which can be found in Twolf's Multiplugin Cab found here: http://forum.xda-developers.com/showthread.php?p=3906994

digital_elysium
6th July 2009, 12:37 PM
Thanks for the link.

Couldn't see any exes in the cab, just what I assume are mortscripts. Do you write you apps in .NET or in mortscript? If the former, how do you "shell" the script from within your program?

larbke666
6th July 2009, 01:35 PM
Thanks for the link.

Couldn't see any exes in the cab, just what I assume are mortscripts. Do you write you apps in .NET or in mortscript? If the former, how do you "shell" the script from within your program?

Me & Twolf, use mortscript, the plugin you see there is by Twolf.

Owh yh, it probably is the Refresh Titanium.mscr, which i ment, there's just a link made in the start menu folder. Refresh Titanium will refresh the today screen...

To use it in another mortscript file, just use: Run(\Program Files\...\Refresh Titanium.mscr) where ... stands for the folder where you put it in...

claus1953
6th July 2009, 10:14 PM
Maybe a bit off topic but does somone know what is the command to disable and enable (not refresh) the today screen in wm6.5? I need it for use in a mort script.

larbke666
6th July 2009, 10:45 PM
Maybe a bit off topic but does somone know what is the command to disable and enable (not refresh) the today screen in wm6.5? I need it for use in a mort script.

I don't really know, but i wonder why Twolf uses double RefreshToday in his mscr. So maybe just one time will disable it?:s not sure.

---edit---

i figured it out for you claus...

So first write 0 (for disable) to: HKEY_LOCAL_MACHINE\Software\Microsoft\Today\Items\"Windows Default":Enabled

Then RedrawToday

Now today screen will be empty and you can do whatever you want... :)

claus1953
7th July 2009, 02:54 AM
I don't really know, but i wonder why Twolf uses double RefreshToday in his mscr. So maybe just one time will disable it?:s not sure.

---edit---

i figured it out for you claus...

So first write 0 (for disable) to: HKEY_LOCAL_MACHINE\Software\Microsoft\Today\Items\"Windows Default":Enabled

Then RedrawToday

Now today screen will be empty and you can do whatever you want... :)

Thanks a lot, it worked

twolf
7th July 2009, 10:49 AM
Sorry, only read this now.

I used to use the refresh.exe made by a forum menber (I have no idea who... :().

Now Im using only the today refresh option of Mortscript that is simply:
RedrawToday

tito12
7th July 2009, 11:52 AM
Thanks a lot, it worked

Hi,
I don't know much about mortscript, I am looking for one that will reload Windows Default after I change the cpr ( I hope this is what you are talking about :))

twolf
7th July 2009, 05:32 PM
In case you dont have it yet... ;)

tito12
7th July 2009, 09:21 PM
Thanks Twolf, my life is easier now :D

AndiCP
7th October 2010, 02:08 PM
This is hopefully painfully easy for experienced developers on here, but I've googled till my fingers bled and have not been able to find a suitable answer.

How do I force the Titanium menu in WM6.5 to refresh... i.e. pick up new data from the Windows registry?

For the old "Today" screen, advice seems to be use the Send Message command to broadbast an INI change to all open Windows:


Public Shared HWND_BROADCAST As IntPtr = IntPtr.op_Explicit(&HFFFF)
Public Const WM_WININICHANGE = &H1A
---------------------------------------
ret = SendMessage(HWND_BROADCAST, WM_WININICHANGE, 252, 0)


But this doesn't seem to be working for Titanium.

Anyone got any ideas?

I don't know if you still want to do this in .net but here is the working code:

Declare Function SendMessage Lib "coredll.dll" (ByVal hWnd As IntPtr, ByVal Msg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As IntPtr
Declare Function GetDesktopWindow Lib "coredll.dll" () As IntPtr
Private Const WM_WININICHANGE As Long = &H1A ' 0x1a = 26 ; &HF2 = 242

SendMessage(GetDesktopWindow(), WM_WININICHANGE, &HF2, 0)



have fun! ;)