Old 12th March 2004, 21:45   #1
venomfreeze79
Member
 
Join Date: Sep 2003
Location: N.C.
Posts: 61
Send a message via Yahoo to venomfreeze79
Question desktopalpha in maki

can someone tell me how to turn on desktopalpha using a maki script. When the skin is loaded I want it turned on for a demo of DTA, then it will switch off and show how it will look without it.


someone please.
venomfreeze79 is offline   Reply With Quote
Old 12th March 2004, 22:04   #2
hammerhead
The Shark
(Forum King)
 
hammerhead's Avatar
 
Join Date: Jul 2002
Posts: 2,537
Send a message via AIM to hammerhead
Make a togglebutton, then turn it on/off in maki when you need it
hammerhead is offline   Reply With Quote
Old 12th March 2004, 22:06   #3
carlosp
Major Dude
 
carlosp's Avatar
 
Join Date: Nov 2002
Location: Hamburg, Germany
Posts: 1,312
code:

Global ToggleConfigAttribute attr_desktopalpha;

system.onscriptloaded(){
ConfigItem item;
item = Config.getItem("Skins and UI Tweaks");
if (item != NULL) attr_desktopalpha = item.getAttribute("Enable desktop alpha");
if(StringToInteger(attr_desktopalpha.getData()) == 1){do what you want(); }
if(StringToInteger(attr_desktopalpha.getData()) != 1){do what you want();}

}



If you need any explenaitions just ask
carlosp is offline   Reply With Quote
Old 13th April 2004, 16:10   #4
venomfreeze79
Member
 
Join Date: Sep 2003
Location: N.C.
Posts: 61
Send a message via Yahoo to venomfreeze79
o.k. ..... I need help.

I feel like a monkey fucking a football.
I understand the simple things in maki,but this....
venomfreeze79 is offline   Reply With Quote
Old 14th April 2004, 06:24   #5
carlosp
Major Dude
 
carlosp's Avatar
 
Join Date: Nov 2002
Location: Hamburg, Germany
Posts: 1,312
just use this:

PHP Code:
togglebutton.onleftbuttondown(int xint y){
if (
attr_desktopalpha.getdata() != "1"){
attr_desktopalpha.setdata("1");
togglebutton..setactivated(1);
}else if (
attr_desktopalpha.getdata() == "1"){
attr_desktopalpha.setdata("0");
togglebutton..setactivated(0);
}

Understood?
carlosp is offline   Reply With Quote
Old 22nd April 2004, 13:54   #6
venomfreeze79
Member
 
Join Date: Sep 2003
Location: N.C.
Posts: 61
Send a message via Yahoo to venomfreeze79
Alright.Thx very much.
Is there a GUID to refresh the skin.After DTA is turned on Winamp is skitchy. Frisbeemonkey's refrence is for Winamp3,don't work on 5.2. Any suggestions?
venomfreeze79 is offline   Reply With Quote
Old 22nd April 2004, 18:07   #7
leechbite
Major Dude
 
leechbite's Avatar
 
Join Date: Sep 2003
Location: Canada
Posts: 635
Send a message via Yahoo to leechbite
i think hammerhead's suggestion should work without refreshing WA.
code:

// turns on desk-top alpha
if (dtabutton.getActivated()==0)
dtabutton.leftClick();


leechbite is offline   Reply With Quote
Old 22nd April 2004, 20:20   #8
carlosp
Major Dude
 
carlosp's Avatar
 
Join Date: Nov 2002
Location: Hamburg, Germany
Posts: 1,312
or you make a timer and start it on script loaded. i made this once for one of my skins. then the use won´t be able to shut dekstopalpha off. it must look somehow like this:
PHP Code:
desktopalphaTimer.ontimer(){
ConfigItem item;
        
item Config.getItem("Skins and UI Tweaks");
            if (
item != NULLattr_desktopalpha item.getAttribute("Enable desktop alpha");
            if(
StringToInteger(attr_desktopalpha.getData()) != 1){attr_desktopalpha.setData("1") }

then you will always have DA on if you start the timer with loading the skin.
carlosp is offline   Reply With Quote
Old 9th March 2005, 02:43   #9
axialix
Senior Member
 
axialix's Avatar
 
Join Date: Jun 2002
Posts: 209
Sorry to bring back an old thread, but I can't seem to get the code above to work. Here's what I have:

#include "../../../lib/std.mi"
#include "../../../lib/config.mi"

Global ConfigAttribute attr_desktopalpha;
Global Timer desktopalphaTimer;

system.onscriptloaded() {

desktopalphaTimer = new Timer;
desktopalphaTimer.setDelay(30);

desktopalphaTimer.ontimer(){
ConfigItem item;
item = Config.getItem("Skins and UI Tweaks");
if (item != NULL) attr_desktopalpha = item.getAttribute("Enable desktop alpha");
if(StringToInteger(attr_desktopalpha.getData()) != 1){attr_desktopalpha.setData("1") }
}

System.onScriptUnloading() {
desktopalphaTimer.stop();
delete desktopalphaTimer;
}

Am I doing something wrong? When I try to compile it, I get syntax error at: desktopalphaTimer.ontimer(){

I just want desktopalpha turned on automatically when my skin loads. Thanks...
axialix is offline   Reply With Quote
Old 10th March 2005, 07:24   #10
carlosp
Major Dude
 
carlosp's Avatar
 
Join Date: Nov 2002
Location: Hamburg, Germany
Posts: 1,312
ok, replace the code with and try this:
PHP Code:
#include "../../../lib/std.mi"
#include "../../../lib/config.mi"

Global ConfigAttribute attr_desktopalpha;


system.onscriptloaded() {

ConfigItem item;
item Config.getItem("Skins and UI Tweaks");
if (
item != NULLattr_desktopalpha item.getAttribute("Enable desktop alpha");
if(
StringToInteger(attr_desktopalpha.getData()) != 1){attr_desktopalpha.setData("1") }

carlosp is offline   Reply With Quote
Old 10th March 2005, 16:25   #11
axialix
Senior Member
 
axialix's Avatar
 
Join Date: Jun 2002
Posts: 209
Thanks carlos, but with the above code, I'm still getting a syntax error at:

if(StringToInteger(attr_desktopalpha.getData()) != 1){attr_desktopalpha.setData(
"1") }

My config and std files are in the correct place, so I'm really confused that this doesn't work.
axialix is offline   Reply With Quote
Old 11th March 2005, 21:23   #12
carlosp
Major Dude
 
carlosp's Avatar
 
Join Date: Nov 2002
Location: Hamburg, Germany
Posts: 1,312
just took this from my skin and it works on my skin. it should work for you aswell
PHP Code:
ConfigItem item;
item Config.getItem("Skins and UI Tweaks");
if (
item != NULLattr_desktopalpha item.getAttribute("Enable desktop alpha");
if(
StringToInteger(attr_desktopalpha.getData()) != 1){attr_desktopalpha.setData("1");} 
carlosp is offline   Reply With Quote
Old 11th March 2005, 21:29   #13
axialix
Senior Member
 
axialix's Avatar
 
Join Date: Jun 2002
Posts: 209
Ok cool, I'll give it another try. Thanks.
axialix is offline   Reply With Quote
Old 12th March 2005, 00:34   #14
axialix
Senior Member
 
axialix's Avatar
 
Join Date: Jun 2002
Posts: 209
Oh yeah! Kool-Aid time. Success at last. It finally compiled after an hour of tweaking {'s and }'s . I had to read the output at least three times before I believed it. Not to complain about you carlosp, because you've been a huge help, but there was an extra } at the end that needed to be there. Or maybe you did that on purpose??
axialix is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Skinning and Design > Modern Skins

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump