Is this possible to do in DesktopX?

Hi guys! I came to ask the proffessionals in DesktopX if this idea is possible.  The plan is to give each object in the scene a property to change it size depending the position in the screen. If somebody know please let me know how. THanks in advance!

38,443 views 8 replies
Reply #1 Top

It is possible to do that.

 

Reply #2 Top

Hey Frogboy!!! don't let me with the mystery!!! Do you know any tutorial or any clue to help me discover how to do this? Thanks!!!

Reply #3 Top

Hi D. Arnaez!

You can find the scripting reference on Stardock website. The function and properties you are interested in are:

  • Object.Top
  • Object.Left
  • Object.Width
  • Object.Height
  • Object_OnMove(x, y)

I've made a very small example object to get you started.

 

 

Reply #4 Top

Beautiful!!!!!!  That is very close to the idea!!!... now how can I set the 0 x and 0 y in the center of the screen for all monitors?

Thanks a lot!!!

Reply #5 Top

Ok I think that I got it!!!  Just modify the script in

Object.Width = 40 + 100 * (y / System.screeWidth)  instead (x / System.screeWidth)

 

Now only change it size only when go up or down. That is perfect.

Now have a question. Due to the first statement

Sub Object_OnScriptEnter

     'Reset position

Object.Top=100

Object.Left=100

 

When the user move the object to any new position, the object change its size, great.... but when the user restart Windows... the object back to the original position.

How can I keep the last position used?

 

Thanks again.

 

Reply #6 Top

Keeping the last used position is relatively easy, you just need to comment the 4 lines at the top (for resetting size & position) and when exporting your object as a gadget, use "Simple Deployment" and check the "Persist object status across reloads" checkbox.

For slightly more involved gadgets, you might need to store object properties by hand (if you have custom properties other than the DX-provided ones on your objects). You can use a custom configuration file or Object.Local/PersistStorage depending on your needs.

Hope this helped!

+1 Loading…
Reply #7 Top

I tried your solutions but I'm doing something wrong. The objects must be exported as DesktopX object because nobody want to open .exe files... even me when I tried the Kaspersky bring a lot of warnings. Here I attach an sample of the object that works but doesn't keep the latest position.

Object Test

Reply #8 Top

DesktopX Builder in its three variants (standard, pro, enterprise), let you build widgets, gadgets and desktop from DesktopX objects.

An object is the most elementary block over which complex functionality is built. Objects can be background images, text, buttons or ActiveX containers.

 

 

____________________________
http://www.flvplayerdownload.org