WallX v1.93x

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: WallX v1.46x

Post by blueznl »

Which version are you using?
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
GG
Enthusiast
Enthusiast
Posts: 254
Joined: Tue Jul 26, 2005 12:02 pm
Location: Lieusaint (77), France

Re: WallX v1.46x

Post by GG »

Last one : WallX v1.50x c2010..2011 EJN 19.06.2011 build 131 save 3017.
Purebasic 6.04 64 bits - Windows 11 Pro 64 bits 23H2
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: WallX v1.46x

Post by blueznl »

That's weird, it should work. I'm using a regular API call to set the wallpaper. Does it have enough rights?
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
GG
Enthusiast
Enthusiast
Posts: 254
Joined: Tue Jul 26, 2005 12:02 pm
Location: Lieusaint (77), France

Re: WallX v1.46x

Post by GG »

It's on a new server at work. Seems to be a local admin.
Do the program need write access to registry or something like that ?
Purebasic 6.04 64 bits - Windows 11 Pro 64 bits 23H2
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: WallX v1.46x

Post by blueznl »

I have it here running on the kids PC, as well as my wife's PC. Both systems are running as limited rights users, without any problems.

However, WallX does need to create a temporary file, which it does at the temp directory. From the source code:

Code: Select all

Global wall_filename.s = GetTemporaryDirectory()+"wallx.bmp"
It does create a file there, so you would need writing rights to that folder. On XP that never poses a problem either with full or limited rights.

With full rights it works fine on Vista and Win7. I have not tried WallX on Vista or Win7 yet with limited rights. (If someone else would be able to try, feel free to do so and give me some feedback :-))

There is one registry setting affected:

Code: Select all

x_registry_set(#HKEY_CURRENT_USER,"Control Panel\Desktop","TileWallPaper",#REG_SZ,0,"1",1)
The above sets the wallpaper to a tiled format. This is a per user setting. I've included the source code and you could comment it out.

The wallpaper is set by the following api call:

Code: Select all

SystemParametersInfo_(#SPI_SETDESKWALLPAPER,0,@wall_filename,0)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
HeX0R
Addict
Addict
Posts: 973
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: WallX v1.46x

Post by HeX0R »

Shouldn't the original Desktop-picture be reshown, when calling "wallx kill"?

It's a little bit strange here, i got a grey background instead of my former picture, allthough in the desktop settings the picture is still active.
(Win XP/32Bit)

[Edit]
This snipped works as expected and resets my pic:

Code: Select all

OpenConsole()
a$ = "D:\Wallx\DSC01140.bmp"
SystemParametersInfo_(#SPI_SETDESKWALLPAPER, 0, @a$, 0)
Input()
SystemParametersInfo_(#SPI_SETDESKWALLPAPER, 0, 0, 0)
Input()
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: WallX v1.46x

Post by blueznl »

Nope, the first thing wallx does is create a random coloured background. It's a remnant of previous bughunts and testing, but it didn't bother me so I kept it in :-)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: WallX v1.46x

Post by blueznl »

Small update / bugfix. Well, actually, it isn't a bug in WallX per se...

Turns out Windows Vista did things in its own way, but Windows 7 is not a stranger to that either.

On Windows 7, WallX sometimes does NOT update the background, even though the API's are correctly called, and proper values are returned. After some fooling around it seems Windows 7 only updates the background IF there is a real file and / or specific action. Valid events are theme changes etc.

So, for Windows XP and Vista the following works:

Code: Select all

SystemParametersInfo_(#SPI_SETDESKWALLPAPER,0,@wall_filename,0)
But not for Windows 7, which might require saving a file, and telling Windows 7 to load that file on next bootup:

Code: Select all

SystemParametersInfo_(#SPI_SETDESKWALLPAPER,0,@wall_filename,#SPIF_UPDATEINIFILE)
SystemParametersInfo_(#SPI_SETDESKWALLPAPER,0,@wall_filename,#SPIF_SENDWININICHANGE)
Just adding the command 'keep' to WallX's instructions executes the last two commands listed above, and then things work as expected.

Edit: in addition to the above Windows 7 sometimes gets confused when using themes that do not have a wallpaper. Still, the above works, unless you select a new theme without a wallpaper. It's different from Vista, but it's still somewhat weird...

'Keep' may also solve any issues on Windows Server 2008. I don't have a Server here to check. Feel free to report back if 'keep' works on Server 2008, or not...

In other words, if the following doesn't do anything:
wallx mark "test"
Then try this:
wallx mark "test" keep resident
Test with a reboot to make sure...
Last edited by blueznl on Sat Mar 31, 2012 11:00 pm, edited 1 time in total.
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
GG
Enthusiast
Enthusiast
Posts: 254
Joined: Tue Jul 26, 2005 12:02 pm
Location: Lieusaint (77), France

Re: WallX v1.59x

Post by GG »

It's OK now with this release on Windows Server 2008.

Thanks a lot ! :)
Purebasic 6.04 64 bits - Windows 11 Pro 64 bits 23H2
Little John
Addict
Addict
Posts: 4519
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: WallX v1.59x

Post by Little John »

Hello blueznl,

I just downloaded "wallx.zip" from http://bluez.home.xs4all.nl/purebasic/p ... d_wallnutt.
It contains a folder named "source", but I can't find source code inside it.

Regards, Little John
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: WallX v1.59x

Post by blueznl »

I've re-upped the file(s). If you want to compile it, you'll also need x_lib.pb, which is included with CodeCaddy, but WallX is that simple that you probably won't need it, or can easily replace the few procedures from that include file.
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Little John
Addict
Addict
Posts: 4519
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: WallX v1.59x

Post by Little John »

It's a good source of information for me, especially when I'm going to add e.g. support for multiple monitors to my program.
Thank you!

Regards, Little John
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: WallX v1.59x

Post by blueznl »

And here we go... a new version of WallX... featuring (tada...) a GUI.

Update v1.70x

- gui
- lots of other internal stuff

Just launch it. Press the help button. Fool around. It's now bloody easy to use :-) although more tricky stuff requires the command line.

I would like to have some feedback on the current useability. It's primarily for my own use, but I'm using it as a testbed for something else.

Image

Download here (source included):

http://bluez.home.xs4all.nl/purebasic/p ... d_wallnutt
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: WallX v1.73x

Post by blueznl »

Update v1.73x

- fixed shown preset
- fixed a bug with 'set'
- improved pad detection in generated commandlines
- improved shortcut naming
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: WallX v1.80

Post by blueznl »

Update v1.80:

- bugfix: sometimes missed one or more adapter (changes), fixed
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Post Reply