Wallchangers

Saturday, March 31, 2007 by ArileenDesign | Discussion: DesktopX

Hi
I search for a long time a way to solve this issue.
In fact, in all wallchangers (objects/widgets) i have checked out there is the same mater.
When you click on them to change the wall often you need to press F5 or to go in display properties to refresh the wallpaper on desktop. that's su*censored* a lot.
If there somebody who can help me to solve this.

PS: i have try also with the Omni wallchanger by Tiggz and it's the same....
First Previous Page 1 of 2 Next Last
Erk.
Reply #1 Saturday, March 31, 2007 9:24 AM
Wallpaper changer from Microsoft

This might help ...though it's not a widget, of course
ArileenDesign
Reply #2 Saturday, March 31, 2007 9:32 AM
Hi Dear Erk maybe i haven't explain well the mater here
I'm sorry your link it's really interesting but i'm care about script for widget not for a wallchanger i have mine and it's good the only mater is refreshing...
I talk about widget scripting.
In all Wallchanger (WIDGET/OBJECT) there the same problems with the refreshing and i'm wondering if there are here a guy who know a way to solve this.
SirSmiley
Reply #3 Saturday, March 31, 2007 10:02 AM
This worked for me.

' Refresh the desktop to remove the deleted shortcuts correctly
set oShell = createobject("shell.application")
set oDesktop = oShell.Namespace(0)

oDesktop.self.invokeVerb "R&efresh"
set oShell = Nothing
set oDesktop = Nothing

Found it here JTB World Blog
ArileenDesign
Reply #4 Saturday, March 31, 2007 10:10 AM
Thanks SirSmiley i'll try this now!
Erk.
Reply #5 Saturday, March 31, 2007 10:17 AM
No probs Quentin ...thats why I said "Might help"

wasn't sure what you wanted
SirSmiley
Reply #6 Saturday, March 31, 2007 10:41 AM
You're Welcome!

I wanted that a while back for another reason.

PS. Found another Key Script at visualbasicscript.com

Option Explicit
Dim WSHShell, strDesktop
Set WSHShell = WScript.CreateObject("WScript.Shell")
strDesktop = WSHShell.SpecialFolders("Desktop")
WSHShell.AppActivate strDesktop
WSHShell.SendKeys "{F5}"
WScript.Quit
ZubaZ
Reply #7 Saturday, March 31, 2007 10:54 AM
Nice job SirSmiley
SirSmiley
Reply #8 Saturday, March 31, 2007 11:06 AM
Thanks Z!

Here's another one from that same thread at visualbasicscript.com.

Direct Link to the thread


Set WApp = CreateObject("Shell.Application")
WApp.Namespace(0).Self.InvokeVerb "Refresh"

Incidentally, I found that by typing vbscript refresh desktop into Google
ArileenDesign
Reply #9 Saturday, March 31, 2007 11:19 AM
Thanks you so much SirSmiley and i agree with Zubaz good job
Next time i'll try google like you i' haven't think at it
here the code i have made in regards at all you show me
I must changed and reworked all cause i can't get your code to work why i don't know tell me if that run for you?
here the code:

Sub Object_OnStateChange(state)
If state = "Command executed" Then
On Error Resume Next
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.SendKeys "{F5}"
Set WSHShell = nothing
End If
End Sub

if that run also for you that's cool and i have just to included it in the wallchanger code.
hope i'm clear and that mean something

EDIT: *Censured* that's run fine in DX and when DX is unload not....


SirSmiley
Reply #10 Saturday, March 31, 2007 11:42 AM
Set WSHShell = WScript.CreateObject("WScript.Shell")

Should be
Set WSHShell = CreateObject("WScript.Shell")
ArileenDesign
Reply #11 Saturday, March 31, 2007 11:59 AM
I try i try but not it's the same that's works on DX but as soon as DX is Unload That isn't work at all...
I'm wondering really
ArileenDesign
Reply #12 Saturday, March 31, 2007 1:25 PM
BUMP!
SirSmiley
Reply #13 Saturday, March 31, 2007 1:45 PM
There are limitations to what DX can do directly with the system, this is for security reasons. You may need to put it into an external script then call it using the run or exec command.

Create an external vbs file call it refreshscript.vbs
Place this code in the file:

'SendKeys script to refresh desktop
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.SendKeys "{F5}"
Set WSHShell = nothing

Add it to your object as a custom file

This should be the code to run it.

Sub Object_OnStateChange(state)
If state = "Command executed" Then
On Error Resume Next
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "refreshscript.vbs"
End If
End Sub

This worked for me
SirSmiley
Reply #14 Saturday, March 31, 2007 1:46 PM

BUMP!

Hey,
Had to write & test it, Give me some time man!
ArileenDesign
Reply #15 Saturday, March 31, 2007 1:52 PM

Hey,
Had to write & test it, Give me some time man!


SO sorry it's just i hate when i can't make a thing thank you so much for the time you take for this problems i'll try this and i tell you
SirSmiley
Reply #16 Saturday, March 31, 2007 1:55 PM
I understand and know the feeling!

FYI On a positive note this might be an easier way to run command line applications for all those interested?
ArileenDesign
Reply #17 Saturday, March 31, 2007 2:17 PM
Ok That's refresh icons on desktop but not the wall...

And yes it could be help some people
SirSmiley
Reply #18 Saturday, March 31, 2007 2:26 PM
Clear your cache & try it? Because it's not working for me on a clean start. If that's the case then a MoveFile or Copyfile command might need to be added?

Ok That's refresh icons on desktop but not the wall


Got to do some errands; so, not able to look into this until later. Maybe try a google search for "vbscript refresh wallpaper"?

SirSmiley
Reply #19 Saturday, March 31, 2007 3:18 PM
Why not use the System Namespace callbacks from the manual? It does this all automatically! Just wondering.

DesktopX Manual


System.SetWallpaper

This allows you to specify the Windows wallpaper. You need to provide a full path to the wallpaper and then an option to feine how to display the wallpaper.
Option:

0 = use default wallpaper
1 = Center wallpaper
2 = Tile wallpaper
3 = Stretch wallpaper

Examples:

System.SetWallpaper "C:\temp\wall1.bmp", 1
System.SetWallpaper Object.Directory & "wall1.jpg", 1
System.SetWallpaper "", 0 This will restore the original wallpaper.

ArileenDesign
Reply #20 Sunday, April 1, 2007 5:22 AM
winjpg = windowspath & "\q94wallpaper12.jpg"
System.SetWallpaper winjpg,3

the code i already use


An idea maybe make a script who call a shortcut.
and shortcut call F5
I need only to know the .dll who admin the function keys or refreshing of screen and subdll to make that
i'll go to search that

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01