nnCron and nnCron LITE discussion
by mantra » Tue, 24 Jan 2006, 11:46
i found this
- Code: Select all
File: desktop.spf \ Author: dMitry Alexandrow \ Version: $Id: desktop.spf,v 1.4 2004/09/22 20:52:49 mitry Exp $ \ Description: Set desktop wallpaper/transparency and other desktop \ related routines \ Usage: \ WALLPAPER: "path_to\wallpaper.bmp" \ set wallpaper \ WALLPAPER: "" \ remove wallpaper \ DESKTOP-TRANSPARENCY \ Set transparent color for text under icons \ DESKTOP-HEIGHT \ Get display screen width in pixels \ DESKTOP-WIDTH \ Get display screen height in pixels \ OSD: "%hh%:%mm%" \ Rough OnScreenDisplay \ WIN-ROLL \ Roll/Unroll current window (Unix-like feature) \ WIN-HWND WIN-SIZE \ Returns width and height for the win handle \ ############################### WINAPI: SystemParametersInfoA USER32.DLL
: WALLPAPER ( a u -- ) DROP 1 SWAP 0 20 SystemParametersInfoA DROP ; : WALLPAPER: eval-string, POSTPONE WALLPAPER ; IMMEDIATE
\ ################################ WINAPI: GetShellWindow USER32.DLL WINAPI: InvalidateRect USER32.DLL WINAPI: UpdateWindow USER32.DLL
\ ################################ \ Set transparent color for text under icons on the desktop : DESKTOP-TRANSPARENCY ( -- ) GetShellWindow TO WIN-HWND FOR-CHILD-WINDOWS: "SHELLDLL_DefView" WIN-CHILD-HWND TO WIN-HWND FOR-CHILD-WINDOWS: "SysListView32" 0xFFFFFFFF 0 0x1026 WIN-CHILD-HWND SendMessageA DROP TRUE 0 WIN-CHILD-HWND InvalidateRect DROP WIN-CHILD-HWND UpdateWindow DROP ;FOR-CHILD-WINDOWS ;FOR-CHILD-WINDOWS ;
\ ################################ : OSD-FONT Z" Tahoma" ; \ : OSD-FONT Z" DS Crystal" ; 50 CONSTANT OSD-SIZE 100 VALUE OSD-X 50 VALUE OSD-Y 1000 VALUE OSD-PAUSE
WINAPI: GetWindowDC user32.dll WINAPI: ReleaseDC user32.dll WINAPI: RedrawWindow user32.dll
WINAPI: TextOutA gdi32.dll WINAPI: SetBkMode gdi32.dll WINAPI: SetTextColor gdi32.dll WINAPI: SelectObject gdi32.dll WINAPI: CreateFontA gdi32.dll
: OSD \ ( a u -- ) GetDesktopWindow GetWindowDC \ DC DUP 1 SWAP SetBkMode DROP DUP 0x0000FF00 SWAP SetTextColor DROP DUP OSD-FONT 0 0 0 0 1 0 0 0 0 0 0 0 OSD-SIZE CreateFontA SWAP SelectObject DROP DUP \ a u DC DC 2OVER SWAP \ a u DC DC u a ROT \ a u DC u a DC OSD-Y OSD-X ROT \ a u DC u a X Y DC TextOutA DROP ReleaseDC 2DROP OSD-PAUSE PAUSE 133 0 0 GetDesktopWindow RedrawWindow DROP ;
: OSD: eval-string, POSTPONE OSD ; IMMEDIATE
\ ################################ : DESKTOP-HEIGHT GetDesktopWindow WIN-RECT 2DROP DROP ; : DESKTOP-WIDTH GetDesktopWindow WIN-RECT 2DROP SWAP DROP ;
\ ################################ : WIN-SIZE ( hwnd -- w h ) WIN-RECT \ y2 x2 y1 x1 >R SWAP R> - >R \ w ->R - R> SWAP ;
\ ################################ : WIN-ROLL GetForegroundWindow TO WIN-HWND WIN-HWND WIN-SIZE \ w h 60 > IF 24 ELSE WIN-HWND WIN-POS SWAP DROP DESKTOP-HEIGHT SWAP - THEN WIN-RESIZE ;
\ EOF desktop.spf \\ vim: ft=forth:ts=8:noet:fenc=cp1251
i saved as desktop.spf , include like plugin in the option gave the simple command - Code: Select all
RunMissed Time: 38 9 * * * * Action: WALLPAPER: "C:\Senza nome.bmp" \ set wallpaper
but nothing
-
mantra
-
- Posts: 65
- Joined: Tue, 08 Mar 2005, 18:48
by VK » Tue, 24 Jan 2006, 12:59
As far as I understand, you can use a simple command without loading this plugin if you are using the latest nnCron build. Smth like this:
- Code: Select all
0 Z" C:\WINNT\picture.bmp" 0 20 SystemParametersInfoA DROP
- to set the wallpaper and - Code: Select all
0 Z" " 0 20 SystemParametersInfoA DROP
- to remove the wallpaper.
You can use these commands in your crontabs or test right into nnCron Forth console.
The tiling/stretching of the wallpaper is controlled by the following registry setiing:
\ HKEY_USERS\.DEFAULT\Control Panel\Desktop \ If you wish to tile the bitmap, double-click or Add Value name TileWallpaper, a string (REG_SZ) data type. A data value of 0 doesn't tile. A data value of 1 tiles the bitmap. \ If you wish to stretch the bitmap to fill the screen, double-click or Add Value name WallpaperStyle, a string (REG_SZ) data type. A data value of 0 doesn't stretch the bitmap. A data value of 2 stretches the bitmap. You may not set TileWallpaper to 1 if WallpaperStyle is a 2.
\ REG-SZ: "HKEY_USERS\%SID: kondakov%\Control Panel\Desktop\TileWallpaper" "1"
CU
VK
-

VK
-
- Posts: 680
- Joined: Wed, 14 Jul 2004, 19:17
-
by mantra » Tue, 24 Jan 2006, 16:10
nope i doesn't work!
-
mantra
-
- Posts: 65
- Joined: Tue, 08 Mar 2005, 18:48
by VK » Tue, 24 Jan 2006, 18:13
give me more details:
- your OS
- nnCron build
- what happens after '0 Z" C:\WINNT\picture.bmp" 0 20 SystemParametersInfoA DROP' execution
- what is in logs and nncron.out etc...
CU
VK
-

VK
-
- Posts: 680
- Joined: Wed, 14 Jul 2004, 19:17
-
by mantra » Tue, 24 Jan 2006, 18:49
nncron is the last beta build
windows xp sp2 with the last update
task name : Test
- Code: Select all
Time: 45 16 * * * * Action: 0 Z" C:\a.bmp" 0 20 SystemParametersInfoA DROP
the log - Code: Select all
16:46:38 1964 Load crontab 16:46:38 1964 C:\Programmi\nnCron\mantra.tab 16:46:41 3288 TASK: test 16:46:46 3412 TASK: test 16:46:54 1108 TASK: test
nncron.out - Code: Select all
OSD-FONT isn't unique OSD isn't unique OSD: isn't unique osd-x isn't unique osd-y isn't unique osd-size isn't unique osd-color isn't unique osd-font isn't unique ?OSD-INIT isn't unique OSD isn't unique OSD-CLEAR isn't unique OSD-PAUSED isn't unique OSD-POS isn't unique BGR>RGB isn't unique OSD-FONT isn't unique OSD: isn't unique OSD-POS: isn't unique OSD-FONT: isn't unique nnCron. v 1.91 RC4 Build 1066 08.11.2005 Copyright (C) 2000-2006 nnSoft. email:nemtsev@nncron.ru
what's about the plug in?? where can i download plugin for nncron outside the official page?
what happens after '0 Z" C:\WINNT\picture.bmp" 0 20 SystemParametersInfoA DROP' execution
nothing!
-
mantra
-
- Posts: 65
- Joined: Tue, 08 Mar 2005, 18:48
by VK » Wed, 25 Jan 2006, 12:18
Hmmm... Your task seems to work quite well on my Win2000 machine. Anyone can test it on WinXP right now? (I'll try to test it on my home PC with WinXP SP2 later this evening).
The 'not unique' messages in nncron.out means, that OSD plugin is included twice. Check this in nncron.ini.
Plugins: all official plugins are collected on our download page. Currently there is no other official plugins repository. From time to time user-plugins are posted in this forum and in RU.NNCRON newsgroup.
CU
VK
-

VK
-
- Posts: 680
- Joined: Wed, 14 Jul 2004, 19:17
-
by VK » Thu, 26 Jan 2006, 12:05
Just tested this on my WinXP SP2 machine (nncron.exe v 1.91 RC4 Build 1066 08.11.2005): entered the '0 Z" C:\WINDOWS\Coffee Bean.bmp" 0 20 SystemParametersInfoA DROP' command line in nnCron Forth console and pressed <ENTER>. This changed the wallpaper to the specified bmp-file.
If there is a chance you have Active Desktop enabled on your system? Or maybe some other Desktop enhancer whch does not allow to change the wallpaper?
CU
VK
-

VK
-
- Posts: 680
- Joined: Wed, 14 Jul 2004, 19:17
-
by mantra » Fri, 27 Jan 2006, 13:22
thanks VK for the answer
If there is a chance you have Active Desktop enabled on your system? Or maybe some other Desktop enhancer whch does not allow to change the wallpaper?
active desktop no is disabled -- control pannel --display--desktop--personalize desktop--i have only currnet page (disabled)
the only enhancer that is use are visual style UXTheme Multi-Patcher (Neowin Edition) 4.0--web ,
does the plug in work in your system too?
Last edited by mantra on Fri, 27 Jan 2006, 13:46, edited 2 times in total.
-
mantra
-
- Posts: 65
- Joined: Tue, 08 Mar 2005, 18:48
by VK » Fri, 27 Jan 2006, 13:44
the plugin uses exactly the same command, so it should work on unmodified WinXP as well.
CU
VK
-

VK
-
- Posts: 680
- Joined: Wed, 14 Jul 2004, 19:17
-
by mantra » Fri, 27 Jan 2006, 13:47
do u think is the visual style enabled that can make it not work?
-
mantra
-
- Posts: 65
- Joined: Tue, 08 Mar 2005, 18:48
by VK » Fri, 27 Jan 2006, 14:35
this is possible (I'm not sure though). to be honest, currently I have no idea why this code is not working on your system. you may want to try to reboot your machne in safe (protected) mode and execute the code again.
CU
VK
-

VK
-
- Posts: 680
- Joined: Wed, 14 Jul 2004, 19:17
-
by mantra » Fri, 27 Jan 2006, 15:50
if i run in safemode , i can't run nnron
i don't know why
-
mantra
-
- Posts: 65
- Joined: Tue, 08 Mar 2005, 18:48
by VK » Fri, 27 Jan 2006, 16:28
you can run it not as a system service, but as ordinary app (see -ns command line switch)
CU
VK
-

VK
-
- Posts: 680
- Joined: Wed, 14 Jul 2004, 19:17
-
by mantra » Fri, 27 Jan 2006, 18:39
yes i do , run on safe mode , run nncron -ns
console
set the command , nothing
it seems that doesn't work only with me
by the way thanks
-
mantra
-
- Posts: 65
- Joined: Tue, 08 Mar 2005, 18:48
Return to nnCron forum (English)
Who is online
Users browsing this forum: No registered users and 1 guest
|
|