Object linking? Need Help

DesktopX Theme

Hi Folks;

I have listed a fw post here trying to get someone into this, so I took to info from one post and came up with the following.

Object:

Name: Today Test

The object is set to run a short cut and then scripted to change the background. This is how far I have gotten with this.

The script for Object 1 "today test" is as follows and when I click on it it starts to shortcut and then the script changes the background.

............................

Sub Object_OnStateChange(state)
If state = "Command executed" Then
Object.State = "Mouse down"

System.SetWallpaper "C:\Iron Man Start\Windows Exit.jpg", 1

End If

Second object just makes the first one "Today test" run

I can't seem to get this vbscript correct? When I click on the second object it doesn't make the first object " Today Test " run..

Second one I click to make the first one run is as follows:

Sub Object_OnStateChange(state)
If Object.State = "Command executed" Then

DesktopX.ScriptObject "Today Test".state = "Command executed"

End If
End Sub

X(  If someone could help on this I will give out the theme with another Background instead of Iron Man Screen Capture:

Thanks folks

I'm really feeling stupid here....

Merry Christmas to all an have a great holiday season!!!!!:blush:

Automan

 

6,873 views 10 replies
Reply #1 Top

im not sure what your trying to do, but those scripts are all messed up, where did you get them?

As for mouse acitvation i would out the code for this in 1 object, not both:
Where "Object1" and "Object2" are the names of your objects.

Function Object_OnLButtonUpEx(obj,x,y,dragged)
 If Not dragged Then
    Select Case obj.name
    Case "Object1"
      System.SetWallpaper "C:\Iron Man Start\Windows Exit.jpg", 1
    Case "Object1"

    End Select
  End If
End Function

I have no idea what your doing with the above.  what is it you are wanting to do?

Reply #2 Top

Hi RomanDA;

How have you been, doing good I hope?

To try and make it simple.

1st object "Short ciut" has Script also that sets the background on the fly.

Second object - for testing will just make the code in the first post fire off and run.

 

A program is set to run and also scripted to switch backgrounds.

The second object fires off the "Command executed" on the first one running the first object ( Shortcut and script for the background.

The first object will be later added to make My Desktop Set the Background by script.

Also First object runs another program and is configured through the normal configuration to start a short cut.

Hope this helps?

Good to see you here!!!

I don't think you remember me, I haven't been here for a good while.

Col. Larry Hutcheson
a.k.a. Automan

 

 

Reply #3 Top

I do remember you.

Ok, So the code i have above will work for what you want.

In Object1 - simply have an "empty" script, it doesnt need anything in it.

In Object2 - put the code from above, and it should work as long as the object1 name in the CASE "Object1" is the name of the first object, then you just put in it whatever you want it to do.

Reply #4 Top

Hey RomanDA;

The Function worked, but instead of calling the first object just " object1 " I gave it the real name of the object and sure enough it changed the back ground. So I set the CASE to a link to a program called Samurize and it loaded my Today Current conditions just fine.

Thank You for the help!!!

Automan

 

Reply #5 Top

Hey Again;

One thing I am trying to figure out with VB is how to use Scripting to load other programs like the code and all I have to do is load my desktop and the Object with the app load scripting start the other programs.

One other area is the apps are the Samurize program. I use it a lot for my weather and email seeing as how I can't get the email that I built and was working fine in my desktop and animated and showed how many emails I had waiting, That scripted email section won't work with DesktopX any longer???

Any way I built one with Samurize and I have to let my system load them " All Three Instances " of my Samurize.

So the way the shortcut works is I set the Client to run in the objects Shortcut area, but then I have to use the line below the shortcut, and place the instance in like " i=today " that would be my Today current conditions..

If you have any way you can think of to load all three instances of the Samurize program, it will load with DesktopX.

One Note:

I have with DesktopX Html items that I built to show a radar screen and also I have a Image button I can hit on my System control bar at the top of the screen that will show an east coast much larger current radar that rolls down " Timed " for me to see a larger image of the current radar. I would be glad to give you the html pages andlet you take a look at them, they are way better than all the Weather items I have downloaded at wincustomize.

Thanks for all your help and nice typing at you again. I am a Col. Fighter Pilot and fly the cool new F22 Rapter!!!

I work for  the Gov. and they send my team out to retreive military personel and civilians that have been captured and the insurgents want a ransom or what ever or they will be-head the folks they have.

Thats why you don't see any of that going on in Iraq or Affgan area any longer. Those idiots have finally learned that we will come after them!!!.

Take Care amd Happy holidays.!!!5* 5* :ninja: B)

l8tr

Col. L. A. Hutcheson
a.k.a. Automan

 

Reply #6 Top

I'm still not 100% sure i get what you are trying to do, i know nothing about Samurize, so i cant really help with that.

DX can run just about anything you throw at it, in script you can load multiple programs, or links, etc.

Do some googeling on "VB Script" and see what can be done, just about anything that VB Script can do, DX can do.  OR you could switch over to Java Script (and dont ask me anything about that one, as i have no clue).

If you are trying to load 3 programs with one click just put them in order.

Function Object_OnLButtonUpEx(obj,x,y,dragged)
 If Not dragged Then
    Select Case obj.name
    Case "Object1"
      System.SetWallpaper "C:\Iron Man Start\Windows Exit.jpg", 1
      Set WshShell = CreateObject("WScript.Shell")
      WshShell.Run "iexplore.exe https://www.wincustomize.com"

---ETC ETC

    Case "Object1"

    End Select
  End If
End Function

Good Luck

Reply #7 Top

RomanDA;

I used the code from your last post and all went well except I ran into a small glitch on the line below start the program.

WshShell.Run "C:\Program Files\Samurize\Client.exe""i=Today"

The area in question is haveing a space at the part for the directory :

C:' Program Files.....looks like the VBscript needs something to let DesktopX run because of the space in " Program Files "

If eberything is on C:\ then it's fine but when you use Program Files where the program is the space breaks the command and then look at the " Arguments " I have to use an argument as to which client to load?

Any ideas

Thanks guy

To let you know what I am doing - here goes.

A simple Image based object that uses scripting instead of building 3 objects to load them.

Then when DesktopX loads them theme I can get it to load all three other programs and their instance like today " Current Weather ", mail instance " email ", 5Day instance " 5 Day Weather outlook".

With all of these I have to load this = C:\Program Files\Samurize\Client.exe with the arguments of all of the instances above.

Does this help a little on grasping my idea.

The reason for this is that if I place all three different "C:\Program Files\Samurize\Client.exe " i=Today into the Startup menu the programs start and don't go to the position on the screen like they were built to do.

When I load one or all three from with-in DesktopX when it starts my theme they work perfect and are placed where they belong when they were built. It must be a clash because these are trying to load at the same time as DesktopX?

So I decided to load them when my theme loads.

I change the back grounds because I have an exit windows that plays a sound file for exit that came from the Iron Man movie then windows restarts and ha anothe wav file from the movie for startup sound.

It's pretty cool.

Thanks again!!!!

Automan     

Reply #8 Top

Hey RomanDA;

As to the last posted message here replying to you, I actually have started all three programs when the Desktop is loaded!!!!8C 8C

Had to review some topics at the MSDN and then placed it all together.

Thought I would let you know.

l8tr

Automan

Reply #9 Top

Im glad its all working, how about posting the code so we could see what you ended up with.

Reply #10 Top

Hi RomanDA;

I will be glad to  post all of the code compiled for all the folks.

Now I have the last part to do is run a DiVx movie shot  "Short" time it correctly when DesktopX Starts. After the timer goes off it will stop the program DiVx af then I see the rest of my desktopX theme.

I will let ya chew on that one for a little I just have take the file name itself run at the beginning of either loading windows, which I haven't figured out yet or make sure it runs first when DesktopX starts toload.

Thanks a milion for all of the help..

Automan......:grin: :grin: :moon: