AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help to make my script clean :)

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
JohannesTN



Joined: 07 Aug 2008
Posts: 55
Location: Danmark

PostPosted: Tue Feb 10, 2009 6:00 pm    Post subject: Help to make my script clean :) Reply with quote

Hi guys Smile

I just made this script:
Code:
#NoTrayIcon
1:
keywait, SHIFT, d
keywait, ALT, d
keywait, l, d
Send, {CTRLDOWN}{ALTDOWN}p{CTRLUP}{ALTUP}
keywait, SHIFT, d
keywait, ALT, d
keywait, l, d
Send, {Volume_Mute}
keywait, SHIFT, d
keywait, ALT, d
keywait, l, d
Send, {Volume_Mute}
Send, {CTRLDOWN}{ALTDOWN}p{CTRLUP}{ALTUP}
goto, 1


can someone help me make my script clean Smile

this is what the script does:
waits for "SHIFT+ALT+L" to be pressed,
when "SHIFT+ALT+L" is pressed,
1 time: mute winamp
2 time: mute master volume
3 time: unmute master volume and winamp

maybe my script could be made even smarter ? if yes, can you please make it to me ?

i hope you guys can help me Very Happy

/JohannesTN
Back to top
View user's profile Send private message
evan
Guest





PostPosted: Tue Feb 10, 2009 6:43 pm    Post subject: Reply with quote

how about:
Code:
+!L::
a++
if a = 1
mute winamp
if a = 2
mute master volume
if a = 3
{
unmute winamp and master volume
a = 0
}
return
Back to top
JohannesTN



Joined: 07 Aug 2008
Posts: 55
Location: Danmark

PostPosted: Tue Feb 10, 2009 7:00 pm    Post subject: Reply with quote

thanks evan, that seems good too Smile
Back to top
View user's profile Send private message
Sivvy



Joined: 21 Jul 2008
Posts: 726
Location: Calgary, AB, Canada

PostPosted: Wed Feb 11, 2009 3:20 pm    Post subject: Reply with quote

Continued from "Evan":

Code:
+!L::
    a++
    If a = 1
        MuteWinamp()
    Else If a = 2
        MuteMaster()
    Else If a = 3
    {
        MuteMaster()
        MuteWinamp()
        a = 0
    }
return

MuteWinamp()
{
    ControlSend, , ^!p, Winamp
}

MuteMaster()
{
    {Volume_Mute}
}
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group