AutoHotkey Community

It is currently May 26th, 2012, 6:15 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: February 10th, 2009, 7:00 pm 
Offline

Joined: August 7th, 2008, 5:14 pm
Posts: 55
Location: Danmark
Hi guys :)

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 :)

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 :D

/JohannesTN


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 10th, 2009, 7:43 pm 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 10th, 2009, 8:00 pm 
Offline

Joined: August 7th, 2008, 5:14 pm
Posts: 55
Location: Danmark
thanks evan, that seems good too :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 11th, 2009, 4:20 pm 
Offline

Joined: July 21st, 2008, 4:16 pm
Posts: 726
Location: Calgary, AB, Canada
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}
}


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: batto, BrandonHotkey, hilalpro, Yahoo [Bot] and 62 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group