Notices

Applications and Utilities Talk about apps and utilities for Windows Mobile and PPC

Reply
 
LinkBack Thread Tools
Old 07-27-05, 12:46 AM   #31 (permalink)
Contributing Reviewer
 
Join Date: Jan 2005
Posts: 4,572
Thanked 1 Time in 1 Post
Originally Posted by Ken S
In regards to your solution for toggling this feature on and off I must be having problems setting the correct file associations (though I'd swear I did it right ), if I open the script from ns.exe it works perfectly, but if I try to open it through the script file I get two errors: FILE OPEN ERROR and FUNCTION NOT FOUND from within ns.exe. Not sure what I'm doing wrong. I know the script is correct since it runs fine from ns.exe so it must be with the association, but I don't quite know how it could be screwed up since I just used Resco . I looked at the registry entries it made and they look fine. I am running this on an iPAQ 5555 using 2003, both the script and ns.exe are loaded on my SD card in "Storage Card/Program Files/NSSCRIPT/".
ns.exe may have problems with the spaces in directory names. Try putting the .ns file in, say, the root or in a subdirectory that has no spaces in the name and try running your script from there.

EDIT: yes, that's the case, I've tested it. That is, locate your .ns files so that their path doesn't contain spaces - for example, to a directory named \nsfiles.
__________________
MS MVP- Mobile Devices.

Last edited by Menneisyys; 07-27-05 at 01:09 AM.
Menneisyys is online now   Reply With Quote
Sponsor Ads
Old 07-27-05, 01:32 AM   #32 (permalink)
Ken S
Guest
 
Posts: n/a
Thanks, that did the trick. I put it in the root directory and it works fine. Odd that it works if I manually open the file, but I'm no programmer so I wouldn't want to guess why it works one way and not the other.

This is a pretty neat setup, is there a command that would force a today screen refresh? If so it would be pretty easy to create a script which would toggle between two today plugins which you could place on the task bar as an icon.
  Reply With Quote
Old 07-27-05, 02:53 AM   #33 (permalink)
Contributing Reviewer
 
Join Date: Jan 2005
Posts: 4,572
Thanked 1 Time in 1 Post
Originally Posted by Ken S
This is a pretty neat setup, is there a command that would force a today screen refresh? If so it would be pretty easy to create a script which would toggle between two today plugins which you could place on the task bar as an icon.
So, you want to dynamically enable/disable today plugins with similar tools (that is, nscript)?

Unfortunately, I haven't found a really working solution. I'm posting here what I've foujnd out - perhaps someone will join our discussion.

First, if you just toggle the value of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Today\Items\ "<plug-in name>"\Enabled with the following code (here, with Spp Pocket Plus as an example):

Code:
key="HKEY_LOCAL_MACHINE";
subkey="\\SOFTWARE\\Microsoft\\Today\\Items\\\"Pocket Plus\"";
rggetvalue(key,subkey,"Enabled",buff);
if (buff == 0)
{
 rgset(key,subkey,"Enabled",1,"REG_DWORD");
 puts("ON");
}
else
{
 rgset(key,subkey,"Enabled",0,"REG_DWORD");
 puts("OFF");
}
the change won't be visible because the Today screen won't be reloaded.

If you force a Today reload with the following code (it kills the "Desktop" (=Today) window and reloads shell32):

Code:
hwnd=findwindow("Desktop");
DestroyWindow(hwnd);
Shell ("shell32.exe");
(after running this from \Windows - interestingly, the 3-parameter version didn't work with me, that is, I wasn't able to invoke shell32 from other directories -, you'll need to do a reset to clean up the memory/get back your services!)

Then, shell32 will be in the memory 2 times (= increased memory consumption & usless waiting while shell32 loads - can even be 5-6 secs!) and the services (including all \Windows\Startup stuff) won't be visible.

Certainly the Today applet in Settings does the refresh much faster / much cleaner after you enable/disable applets; it's just that I don't know how (must be an internal call to shell32; can't check it myself because \Windows\cplmain.cpl, the control panel applet also having the Today applet, is locked and can't be read) and whether it can be achieved at all in nscript.

Does anyone have any ideas on this problem?
__________________
MS MVP- Mobile Devices.
Menneisyys is online now   Reply With Quote
Old 07-27-05, 03:17 AM   #34 (permalink)
Ken S
Guest
 
Posts: n/a
Thanks for your answer, not what I wanted to hear, but nothing new with that. Having to do a reset after a toggle kind of kills the beauty of the whole thing for me. I'll keep an eye on this thread in case someone comes up with an idea. Thanks again for the detailed response. I take it the commands for nscript are listed in your thread about programming on the PPC? I'll check them out in the morning.
  Reply With Quote
Old 07-27-05, 03:23 AM   #35 (permalink)
Contributing Reviewer
 
Join Date: Jan 2005
Posts: 4,572
Thanked 1 Time in 1 Post
Originally Posted by Ken S
I take it the commands for nscript are listed in your thread about programming on the PPC?
Yes, I've categorized the available functions of all the three non-Java apps in my article. That is, you'll find everything in a second.

Also, you may want to check out nsen.txt in nscriptm.zip. It lists all the commands. Unfortunately, it's not really categorized and there're a lot of overlaps and miscategorizations in there (I had done a lot of work on cleaning this up), but it also has some explanations.
__________________
MS MVP- Mobile Devices.
Menneisyys is online now   Reply With Quote
Old 07-27-05, 11:47 PM   #36 (permalink)
Ken S
Guest
 
Posts: n/a
You might trying looking at NoPlugins Today which toggles the today plugins off and on to see how it refreshes the today screen. At least in WM2003 it seems to refresh the today screen reasonably quickly after changing the registry entries for the today plugins.

The program is freeware and available here: http://www.webattack.com/get/pocketpc/notoday.html

Last edited by Ken S; 07-27-05 at 11:50 PM.
  Reply With Quote
Old 07-27-05, 11:50 PM   #37 (permalink)
Aximsite All Star
 
axim_wannabe's Avatar
Super Member
 
Join Date: May 2005
Location: Tokyo, Japan
Posts: 691
Device: Sharp WS004SH
Thanked 0 Times in 0 Posts

Awards Showcase
Aximsite Silver Contributors 
Total Awards: 1

Originally Posted by xdalaw
Menneissys-

You've been posting some really interesting and detailed tips lately. :)

They're a very nice addition to the body of knowledge here at Aximsite. Perhaps you might want to ask a mod or Chris to create a new forum topic for "Advanced or Power-User Tips and Tweaks" so that they can be kept together with similarly detailed tips?

I know I'd like a single forum to go to to find these threads when I'm feeling a little adverturous as a non-technical, non-coder user. :approve:
why dont we let this known to Chris or any of the Mods then?

there is just a lot of stuff inside Menneissys' head tha needs picking (forgive the pun)...

:approve:
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

- aka ipaq_wannabe @
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

- aka clie_wannabe @
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

- aka JadeShadow @
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.



To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
:rolling:
axim_wannabe is offline   Reply With Quote
Old 07-28-05, 05:10 AM   #38 (permalink)
Contributing Reviewer
 
Join Date: Jan 2005
Posts: 4,572
Thanked 1 Time in 1 Post
Originally Posted by Ken S
You might trying looking at NoPlugins Today which toggles the today plugins off and on to see how it refreshes the today screen. At least in WM2003 it seems to refresh the today screen reasonably quickly after changing the registry entries for the today plugins.

The program is freeware and available here: http://www.webattack.com/get/pocketpc/notoday.html
Thanks, that was a great tip! :approve:
__________________
MS MVP- Mobile Devices.
Menneisyys is online now   Reply With Quote
Old 07-28-05, 10:05 AM   #39 (permalink)
Ken S
Guest
 
Posts: n/a
No problem, let me know what you find out.
  Reply With Quote
Old 08-05-05, 01:02 AM   #40 (permalink)
Aximsite Prospect
 
Join Date: Jul 2005
Posts: 4
Thanked 0 Times in 0 Posts
Originally Posted by Ken S
I looked at the registry entries it made and they look fine. I am running this on an iPAQ 5555 using 2003, both the script and ns.exe are loaded on my SD card in "Storage Card/Program Files/NSSCRIPT/".
You probably need to wrap it in double-quotes. Here's what works for me:

Code:
30#"\Program Files\utils\ns.exe" "\My Documents\macros\multiclip.ns" import
BTW does anyone know what the "30#" is for?

-cheers
desertrat_blog is offline   Reply With Quote
Old 08-05-05, 01:11 AM   #41 (permalink)
Aximsite Prospect
 
Join Date: Jul 2005
Posts: 4
Thanked 0 Times in 0 Posts
Originally Posted by Ken S
This is a pretty neat setup, is there a command that would force a today screen refresh? If so it would be pretty easy to create a script which would toggle between two today plugins which you could place on the task bar as an icon.
In a similar vein, does anyone how to get the Today to reread the wallpaper (tdycust.jpg)? I'm thinking of making an automatic random wallpaper changer using nscript.

-cheers
desertrat_blog is offline   Reply With Quote
Old 08-05-05, 02:42 AM   #42 (permalink)
Contributing Reviewer
 
Join Date: Jan 2005
Posts: 4,572
Thanked 1 Time in 1 Post
Originally Posted by desertrat_blog
BTW does anyone know what the "30#" is for? -cheers
Yes, it contains the number of characters in the command line to follow. Can be always set to 255 to avoid counting it.
__________________
MS MVP- Mobile Devices.
Menneisyys is online now   Reply With Quote
Old 08-05-05, 11:50 AM   #43 (permalink)
Aximsite Prospect
 
Join Date: Jul 2005
Posts: 4
Thanked 0 Times in 0 Posts
Originally Posted by Menneisyys
Yes, it contains the number of characters in the command line to follow. Can be always set to 255 to avoid counting it.
Interesting, but what program uses it? The shortcut I gave in my previous post is an actual working one that I have on my system right now. And as you can see there are more than 30 characters in the rest of the line but the shortcut functions perfectly.

So, are the character count relevant (or is it some legacy thing?). If it is relevant, is there an easy way to reset all shortcuts so that they have the correct character count? (I have been manually editing a lot of shortcuts in a text editor and, since up to now, I had not known what the significance of the 'nn#' was, I had left it alone and hence a lot of my shortcuts have an incorrect character count.)

-cheers
desertrat_blog is offline   Reply With Quote
Old 08-06-05, 12:51 AM   #44 (permalink)
Aximsite Prospect
 
Join Date: Jul 2005
Posts: 4
Thanked 0 Times in 0 Posts
Originally Posted by desertrat_blog
In a similar vein, does anyone how to get the Today to reread the wallpaper (tdycust.jpg)? I'm thinking of making an automatic random wallpaper changer using nscript.
After some googling I found this:

http://www.pocketpcdn.com/articles/c...odaytheme.html

Unfortunately nscriptm doesn't seem to have the equivalent of SendMessage(). Quite surprising that, I would've thought that it should be a pretty common and useful function to have. If anyone know of a workaround ...?

-cheers
desertrat_blog is offline   Reply With Quote
Old 08-06-05, 05:38 AM   #45 (permalink)
Contributing Reviewer
 
Join Date: Jan 2005
Posts: 4,572
Thanked 1 Time in 1 Post
Originally Posted by desertrat_blog
So, are the character count relevant (or is it some legacy thing?). If it is relevant, is there an easy way to reset all shortcuts so that they have the correct character count?
It doesn't seem to be relevant in current operating systems (WM2003(SE)) - it seems to be a legacy from older WinCE versions. I will give it a try under old(er) op. system versions to find out whether you need to give the exact (or more) characters in their link files .
__________________
MS MVP- Mobile Devices.
Menneisyys is online now   Reply With Quote
Reply

Tags
cabinstl, changer, dialog, file, killer, mad, programmer, real

Sponsor Ads

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 07:34 PM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Copyright © 2003-09 LeckMedia, LLC