#12 - Stepping Thru States
A series by RomanDA
Listing of other DX Tutorials: Click here
Today's Lesson: "Stepping Thru States" is a very simple way to setup multiple states with a button to change between them.
In this lesson we will cover how to create a simple object, then add multiple states to it, and add a simple button to "step" thru the states.
For this and all the Step-By-Step DX Tutorials you will need to purchase DesktopX for $14.95 from Stardock.
See previous tutorials for how to load DX & create a new object.
Lets get started.
Edit the above object and click on "NEW SCRIPT". We will be adding the following script.
Thanks for this Roman, just one question, how do you toggle through the states? is there an option to toggle?
Edit.. I'm an idiot Roman, that WAS for the button doh! <---
yep.. the whole object is the button.
if you want to make a seperate button somewhere, just look at the code:
You would have to make some changes to this to make it work, but its not that hard. If you download and look at my "Kewl-Klock" it had all of this code in it.
I've done it dear! just exporting it now, I'm still half asleep, that's my excuse , thanks again for this script, and for suggesting it to me hon, you rock
RomanDA feels the Karma
RomanDA must be related to HG, he also speaks in the third person
Thanx David. BTW, How's that gadget coming? Or did I miss it's finish?
HG_Eliminator thinks it must be a Dave thing.
Tailsgirl means it affectionately
Very nice!
RomanDA wonders What gadget?
RomanDA thinks others should think like he does.
RomanDA likes to use '/ me'
Tailsgirl is going to test /me out
Hey it works!! coolies
Wincustomize Community Wall Gadget, of course!
oh, Sorry.. no, it had a lot of issues with screen resolutions, and i just gave up at one point, it was just too time consuming to get working the way i wanted it to. sorry.. I can send you whats done if you want.
The main issues were with the "desktop" icons not showing with it setup, and that sorta defets the purpose of a "wallpaper"
Roman couldit be set it up with layered pages like Lcars? one full of the Links as proposed and a second with Desktop Icons available, alternatively switched back and forth with a control button.
Anything I could do would , of course, require that desktop icons be hidden.
What I am proposing will not be a wallpaper, it will be a full screen gadget.
https://www.wincustomize.com/skins.aspx?skinid=3223&libid=31
Crikey Jim, you're gonna need some horsepower to push something like that ..... or in my case, I'll need a LOT of extra mice to run in that wheel, that powers my CPU
I uploaded it here: https://www.wincustomize.com/skins.aspx?skinid=1503&libid=34
its a DXPACK (in a zip file), its also HUGE (size). Its very complicated in the script, but if you want to take it apart, and try and make it work, its all yours. I just have not had the time (desire) to make it work. Maybe VAD could make it work, but i dont know its really a complext thing.
Sorry i never managed to get it 100%.
Actually, It shouldn't use any cpu at all. It will just be a wallpaper with built in shortcuts. The problem is in keeping from accidentally using those shortcuts. Probably set to double click. But you won't be able to use it with fences, probably.
Update:
If you want to change multiple objects with 1 object/button just change the code to show:
Where "objectname1,2,3,4" are the names of the other objects you want to change the state of.
EX: Face,MinHand,HourHand,Background etc.
If you NAME your objects "Object1" "Object2" "Object3" and so on, you could do the code like this:
Keep in mind that only 1 object needs the code, dont put all this code in every object.The above tutorial is setup to use the above object as the button as well as the main code. Again, you could make 1 object a button (like i have in the above tutorial). Its always best to keep your code in one object.
Before you start messing with code, i would suggest looking over some BASIC Vbscript tutorials, and the first tutorials I created here as well. Scripting isnt hard, its about knowing what you want to do.
I hope this helps.
Keep in mind that the "State" name needs to be the same on ALL objects. If you used "1" "2" "3" then they all need to have "1" "2" "3". if one is missing a state or is named wrong the script will crash.
Awesome David!!! It works great!! People get ready for Chameleon DX!!!!
Sweet David, thanks for the update
glad i can help.
now.. i need to beat Zubaz in Karma.. LOL
There are many great features available to you once you register, including:
Sign in or Create Account