Phar0e...I need some help with scripts

Thursday, July 22, 2004 by Jafo | Discussion: Stardock Software

Phil....I need some help with scripts....

I want to have a script to textedit an ini file in a conditionals statement....namely to relocate the x co-ord in rainmation.ini depending on screen res.

but....

Am stuffed if I can get it to work.......never was the brightest spark with scripts....

Koasati
Reply #1 Thursday, July 22, 2004 11:10 PM
never was the brightest spark with scripts....

That would make me an icicle with scripts.





Powered by SkinBrowser!
yrag
Reply #2 Thursday, July 22, 2004 11:35 PM
...That's why two sticks come with Popsicles
Jafo
Reply #3 Friday, July 23, 2004 11:17 AM

*Script exec !textreplace $LSImageFolder$vent\Rainmation.ini "X=" "X=700"
That's the sort of thing I need to execute via conditional statement....but I've lost the plot somewher, I think...

Phar0e
Reply #4 Friday, July 23, 2004 3:43 PM
How many different values do you want to use for the X coordinate?
If there's just two, there might be any easy way to do it.

If there's more than two, you might want to use an enviromental variable in the ini file. (X=$Spot$)

Then in an rc file define spot:
Spot 100

Then apply a textedit to the spot definition.

But let me know how many different values first.
Jafo
Reply #5 Friday, July 23, 2004 7:40 PM

Hi, Phil.....there'd be a 8 to a dozen or so X co-ords.....one for each resolution....for each rainmation.

Each rainmation has its own ini file....the idea is to use probably three animations....which only means duplicating what works with the first ini file.

Thing is...the rainmation is a fairly old module which might have issues within itself with evars.

I think my problem is with understanding how to have the editing 'executed' through a conditional statement....the actual syntax...

 

Phar0e
Reply #6 Saturday, July 24, 2004 9:30 PM
Ahh, I think I see.
You could use something like this:

If ResolutionX = 800
X=70
ElseIf ResolutionX = 1024
X=100
ElseIf ResolutionX = 1152
X=120
ElseIf ResolutionX = 1280
X=140
ElseIf ResolutionX = 1600
X=160
EndIf

That kinda thing. You can use simbols too.
Or have I really missed the boat?

Phar0e
Reply #7 Saturday, July 24, 2004 9:33 PM
Now if the ini files won't work with the resolution evars...
Make the X coordinate in the ini file as "$Spot$" (with no commas)

Then in an rc file do something like this:

If ResolutionX = 800
Spot 70
ElseIf ResolutionX = 1024
Spot 100
ElseIf ResolutionX = 1152
Spot 120
ElseIf ResolutionX = 1280
Spot 140
ElseIf ResolutionX = 1600
Spot 160
EndIf

pretty sure that would do it.
Phar0e
Reply #8 Saturday, July 24, 2004 9:33 PM
Course if the ini file won't read evars at all, that won't work.
moshi
Reply #9 Sunday, July 25, 2004 6:41 AM
and why not using layercut (under development, PNG support) for the animations and math expressions (for negative or centered) for the coordinates?
this way you can completely avoid scripts and conditional statements.
Jafo
Reply #10 Sunday, July 25, 2004 7:44 AM

Phil.....I think it's not that simple....it's a matter of editing the actual ini file that is to be read.

I think it needs the conditional statement to 'launch' the textedit of the ini file....but the code of actual bang and/or exec or script command is where I get lost.

I need a module to execute the text ion......even to just get one input edited....then adapt for multiple conditionals......

ElseIf ResolutionX = 1024
*ckHotspot -260 -20 260 20 !Sys-Show !Sys-Hide Systray
*ckHotspot 0 -20 260 20 !Tsk-Show !Tsk-Hide Tasks
VWMX   480
*Slider "" 560 -37 2 Volume1.png Volume-Handle.png #0ABHTIU [VOLUME] 0
*Script exec !textreplace $LSImageFolder$vent\Rainmation.ini "X=" "X=700"

That's the sort of thing I'm 'trying to do.....the rest of it works of course....just the last line is a dud...

Jafo
Reply #11 Sunday, July 25, 2004 7:47 AM
moshi.....if all else fails I may have to do that....you keep pushing me towards layercuts [you must have shares in the company]...but I got stuck on rainmation....and hate to chuck it in without a fight....
moshi
Reply #12 Sunday, July 25, 2004 9:44 AM
you know ... layercut works nicely with lsdynamic (same module author). this way you could not only make an animation disappear at one place and popping it up at an other, but actually move the whole thing across the screen with the speed you´d prefer. with these two modules it would be no problem to port this Aquarium Desktop thing (but for steppers "fun" means something different than fish on the desktop of course).

i have not used Rainmation since a while, but as long as each Rainmation has it´s own window title (find out with WinSpy) it should be possible to move it around with lsdynamic as well.

btw: are you trying to do this with mzscript? then you have to check the docs again. this syntax can´t work. this link might help you: http://leaf.terica.net/tutorials/mzscript-overview.html
Jafo
Reply #13 Monday, July 26, 2004 2:11 AM
Oh, poo....now I can't get the animations to work with layercuts.....someone up there wants me to stop using LS....
Jafo
Reply #14 Monday, July 26, 2004 7:09 AM

Ah....Trial and error.....for the life of me I can be thick sometimes....got it going.....and looks like I might just dispense with rainmation afterall.

 

Thanks, moshi for pushing me over the edge......sometimes the longest journey starts with but one step....

Jafo
Reply #15 Monday, July 26, 2004 9:10 AM
I'm feeling positively proud of myself.....have got things to do exactly what I wanted them to......[I'll relegate rainmation to the history books]....
Phar0e
Reply #16 Monday, July 26, 2004 11:39 AM
I'm glad to hear that...
cause the scripting you were talking about was getting faily complex
yrag
Reply #17 Monday, July 26, 2004 7:45 PM
I'm feeling positively proud of myself


Well gee Honey, we're real proud of you too
Jafo
Reply #18 Friday, July 30, 2004 9:13 PM

Seems the Z-Order of Layercuts is still a bit 'iffy'....but the ANTARES LS theme for OTS2 is up and running.

Animations work OK...which is the main thing....though they aren't as simple to configure as ye olde rainmation was...

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