Scripting partner

I need a script buddy :)

I need someone with a quite vast knowledge of DX-scripting.

It's not like I can't do any scripting at all, but I would need someone to help me with more complex scripts...

SO, everyone who helps me will be added in About sections of widgets, with links to their desired pages and similar

Basically, I will be eternally thankful to anyone willing to help me

If anyone is interested, please e-mail me to viperworm_virm@yahoo.com ...

Hopefully someone will
8,914 views 21 replies
Reply #1 Top
scripting keeps me from mucking about too much in DX.good luck VW.  
Reply #2 Top
Can you give us a little more info on what it is you are wanting to make?
I might be able to work with you.
Reply #3 Top
Yes, it'd be good to have an idea of what you're after.
Reply #4 Top
Firstly, thank you all for replying

Now that I saw thomassens reply it became quite funny, because this particular object I need help with was inspired by his 'switch' which made a lot of people mad, but I found it to be a great inspiration for my object

I named this almost finished object LOCK-UP. As its name implies it can be used to lock any workstation with DX installed on it. It is very user-friendly, has few neat features and everything, BUT there are still some problems: right-click menu that can close the object, Task Manager - which can also be used to terminate DX, and start menu popping-out when win-key is pressed, that can't actually do anything to stop the LOCK-UP, but still it allows unwanted people to see your installed programs and similar...
What I need now is: a script that would disable right-click, a script that would somehow disable Task Manager and start menu form popping-out when win-key is pressed. I have some ideas how to do this,and they would probably work, but I don't seem to be able to create any useful scripts

If you are interested I can send you current version of LOCK-UP for a detailed preview of what I would need.
Reply #5 Top
It sounds like you will have to do this through external wscripts. DesktopX doesn't allow that much control over the shell and for good reason.
Reply #6 Top
hehe. don't mention this to Justin if it's in any way related to dah Switch! I'm still amazed how much attention that thing got. It was only made as an joke originating from a random conversation on #stardock...

anyways; As SirSmiley says, DesktopX scripting doesn't provide any features to do what you are looking for. (Except being able to prevent the right click menu.)
Stardock sells DesktopX Enterprice which has a feature to lock down the desktop, so that's why you don't get those features in the DX script.
You'd have to rely on an external component to disable those features. Either an ActiveX control or a plugin. I don't know how to do plugins and I've not managed to wrap my head around ActiveX controls in C# yet.
I think such an external app could perform such a feature by making the system believe that the screensaver is running. I think I did a similar app like this in Visual Basic years ago. But that technique could have been a nasty hack, I'm not sure.
Reply #7 Top
Well, It does seem undoable, but, if you open, let's say Task Manager it does get in front of an object with 'Always on top' Z-Order, BUT, if you click on that object it will get in front of Task Manager, the same happens if you have properties window opened and you click apply, so I figured is there a way to 'emulate' any of these two things?
Or just to start a script, when ctrl and del are pressed, which would refresh the main object and place him over the Task Manager?

Sounds doable to me from this point of view..
Reply #8 Top

hehe. don't mention this to Justin if it's in any way related to dah Switch! I'm still amazed how much attention that thing got. It was only made as an joke originating from a random conversation on #stardock...


Damn youuuuu!!! 

Good times
Reply #9 Top
C'm on guys, what do you think of a method which I have written last?
I'm anxious to see either I should keep working on LOCK-UP or just post it...

And one more question, is it possible to trigger a script with a key on keyboard?

Waiting for your replies.:.:.:.:.:.:....
Reply #10 Top
I think you could lock the computer with vbscript just pack it to an exe then execute from DesktopX.

And one more question, is it possible to trigger a script with a key on keyboard?


If you have permissions then yes.
Reply #11 Top
What do you mean permissions? And where do I get them if I don't have them?

And could you throw in a little example of key-triggered script, so I can try to work something out
Reply #12 Top
I've just encountered a new problem :S
I am trying to write a script for one of my widgets. I need it to, on command executed, start moving one of the object downwards until it gets to defined top=1000.

This is what I have now:

Sub Object_OnStateChange(state)
If state = "Command executed" Then

Object.SetTimer 90909, 10

End If
End Sub

Sub Object_OnTimer90909
DesktopX.Object("iKC_Arm_S").Top = DesktopX.Object("iKC_Arm_S").Top + 10
End Sub

Sub Object_OnTimer90909
If DesktopX.Object("iKC_Arm_S").Top > 1000 Then
Object.KillTimer 90909
End If
End Sub


This script won't move the object even for 1 px

The problem must be somewhere in last Sub, because If I delete it form script, it moves the object downwards.. That's cool, but it has to stop the object form moving outside my screen....

Please, If anyone knows what to do, post a reply
Reply #13 Top
It's reading the second sub after the first so, obviously it will kill it.

Try this:
Sub Object_OnTimer90909
If DesktopX.Object("iKC_Arm_S").Top > 1000 Then
Object.KillTimer 90909
Else
DesktopX.Object("iKC_Arm_S").Top = DesktopX.Object("iKC_Arm_S").Top + 10
End If
End Sub
Reply #15 Top
Now I need some help with object I'd like to act as a taskbar. I need it to be vertical and look like this:

I need it to be of fixed width and height. Layout on the picture above is as I would like it to be when the object is finished (number of buttons, their colors and dimensions are as they should be).

If anyone feels like helping me out, please send me *.dxpack on: viperworm_virm@yahoo.com

I need this in order to finish a very cool project, so I'll really appreciate any help given (like tutorials
Reply #16 Top
Well here I have another problem with a script....

I tried to create a gauge that would rotate accordingly with CPU usage... So this is the script I wrote for it:

Sub Object_OnScriptEnter
Object.settimer 1234,100
End Sub


Sub Object_OnTimer1234
If Object.rotation < system.CpuActivity Then
Object.rotation = Object.rotation + 1
End If
If Object.rotation > system.CpuActivity Then
Object.rotation = Object.rotation - 1
End If
End Sub


And for some reason the object is perfectly still or twitching... I really cant' see where I made a mistake, I mean this script is pretty simple and straight-forward...

I would really appreciate any kind of help
Reply #17 Top
I ran some additional tests and I figured out that it's nothing wrong with this script. Twitching is caused because DX sometimes reads CPU's activity as 0 allthough it's really not...
Reply #18 Top
Code: vbscript
  1. Sub Object_OnStateChange(state)
  2. If state = "Command executed" Then
  3. Object.SetTimer 90909, 10
  4. End If
  5. End Sub
  6. Sub Object_OnTimer90909
  7. DesktopX.Object("iKC_Arm_S").Top = DesktopX.Object("iKC_Arm_S").Top + 10
  8. End Sub
  9. Sub Object_OnTimer90909
  10. If DesktopX.Object("iKC_Arm_S").Top &gt; 1000 Then
  11. Object.KillTimer 90909
  12. End If
  13. End Sub


This could be better simplified to:

Sub Object_OnStateChange(state)
If state = "Command executed" Then
Object.SetTimer 90909, 10
End If
End Sub

Sub Object_OnTimer90909
If DesktopX.Object("iKC_Arm_S").Top > 1000 Then
Object.KillTimer 90909
Else
DesktopX.Object("iKC_Arm_S").Top = DesktopX.Object("iKC_Arm_S").Top + 10
End Sub

Reply #21 Top
It's been a while since I wrote sth in here so here's my new question:

Is there any Sub instruction that would make that sub engage whenever mouse cursor changes its position?
For now I am using Sub Object_OnTimerxxxx and it works OK, but it consumes too much CPU power, so an alternative would be greatly apprechiated (name in credits etc...)

**Well I came to a conclusion that timer is actually only thing I can use here..
I also found a few great sources of information, so now I can pretty much find anything I need there.
Those are:
WWW Link
WWW Link
WWW Link --->there are also links at the bottom of first post directed to sViz's older tuts and to RomanDA's

So everyone who is looking for some help, try looking for the answer on these pages.
I learned a lot form them.