AutoHotkey Community

It is currently May 26th, 2012, 8:37 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: July 18th, 2009, 2:11 am 
Offline

Joined: April 18th, 2007, 9:03 am
Posts: 127
I saw that some tried to arrange so that the sound mutes when advertising was running. however, some works not when minimized to tray. or for other it may not work in vista but this will work! (at least for me, wich use vista)

this script set mute on and off in spotify in which windowed mode any time
it effect's on titel of spotify

it also show the song's name in tooltip
could as well add that opertunity while I still keep checking the title for advertising

Code:

OnMessage(0x200,"MoveWindow")
#Persistent

DetectHiddenWindows, On
SetTitleMatchMode 2
WinGetTitle, Playing, ahk_class SpotifyMainWindow
WinGetTitle, LastSong, ahk_class SpotifyMainWindow

Mute = Off

SetTimer, CheckSong, 500

CheckSong:
WinGetTitle, Playing, ahk_class SpotifyMainWindow
if Playing != %LastSong%
{   StringTrimLeft, Playing, Playing, 10
   ToolTip, %Playing%
   SetTimer, RemoveToolTip, 1500
   if Mute = On
{
      ControlSend, ahk_parent, ^+{Down}, ahk_class SpotifyMainWindow
      Mute = Off
}
   if Playing = Spotify - Spotify – Spotify Premium
{
      ControlSend, ahk_parent, ^+{Down}, ahk_class SpotifyMainWindow
      Mute = On
}


}
WinGetTitle, LastSong, ahk_class SpotifyMainWindow
return

RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return

_________________
you'll have to excuse me...I'm from Sweden, so my English is not that good...(but now it's better cuz JSLover/Guest is helping me)...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 18th, 2009, 7:59 am 
Offline

Joined: January 25th, 2008, 8:37 pm
Posts: 50
Location: Sweden
Didn't work for me. WinXP....


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 24th, 2009, 3:35 pm 
Try this one, it works perfectly: http://www.autohotkey.com/forum/topic45804.html

[Moderator's note: Changed link to AHK topic with source code. The blog link is found there]


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: bekihito, Blackholyman, Exabot [Bot] and 11 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