Vegar Posted June 22, 2009 Share Posted June 22, 2009 Hello.. i'm working in a script witch i am making for spotify... and i wanted to make a tooltip for each new song that comes on, witch shows what song it is.. the song is written in the Window tiltle and in the top colum on the trayiconitem... i dont know if it is possible to read anything from another trayicon's items.. but there is the Window title witch says "Spotify - Artist - Song", and if there was any way to read that and some way remove the "Spotify -" ?? and how can i make the tooltip change when the Window title changes (new song) ? Link to comment Share on other sites More sharing options...
Valuater Posted June 22, 2009 Share Posted June 22, 2009 Look herehttp://www.autoitscript.com/forum/index.ph...st&p=690108and learn to search first8) Link to comment Share on other sites More sharing options...
DCCD Posted June 22, 2009 Share Posted June 22, 2009 Maybe! ControlGetText() . [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group Link to comment Share on other sites More sharing options...
Vegar Posted June 22, 2009 Author Share Posted June 22, 2009 ok, i figured how i get the title WinGetTitle ("Spotify -", "") But how can i just get the part that comes after "Spotify -" ... and how do i make it sett a new tooltip when the title changes? Link to comment Share on other sites More sharing options...
DCCD Posted June 22, 2009 Share Posted June 22, 2009 ok, i figured how i get the title WinGetTitle ("Spotify -", "") But how can i just get the part that comes after "Spotify -" ... and how do i make it sett a new tooltip when the title changes? WinTitleMatchMode [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group Link to comment Share on other sites More sharing options...
Vegar Posted June 22, 2009 Author Share Posted June 22, 2009 help plz (i'm kinda noob) example? Link to comment Share on other sites More sharing options...
oMBRa Posted June 22, 2009 Share Posted June 22, 2009 (edited) ok, i figured how i get the title WinGetTitle ("Spotify -", "") But how can i just get the part that comes after "Spotify -"StringSplit ? and how do i make it sett a new tooltip when the title changes? Tooltip() Edited June 22, 2009 by oMBRa Link to comment Share on other sites More sharing options...
Vegar Posted June 22, 2009 Author Share Posted June 22, 2009 (edited) StringSplit ? Tooltip() cant get the stringsplit to work, (i've tried to search, but i could not figure out hot it works ) this was the closest i got $title = stringsplit (wingettitle ("Spotify -"),"spotify -") MsgBox(0, "Title read was:", $title) and "Tooltip()"?? with a func is ok, but how can i make it show the new tooltip when the song changes (WindowsTiltle Changes) Edited June 23, 2009 by Vegar Link to comment Share on other sites More sharing options...
picea892 Posted June 23, 2009 Share Posted June 23, 2009 How about this....does this help? $title=WinGetTitle("","") $location=StringInStr($title,"-",0,1) $length = StringLen($title)-$location $rightside = Stringright($location,$length) ToolTip($rightside) sleep(10000) ToolTip("") Link to comment Share on other sites More sharing options...
Vegar Posted June 23, 2009 Author Share Posted June 23, 2009 Nice, Got it $title = WinGetTitle ("Spotify -") $location = StringMid ($title, 10) ToolTip ($location) sleep(5000) Link to comment Share on other sites More sharing options...
Vegar Posted June 23, 2009 Author Share Posted June 23, 2009 But now i need to know how i make it show a new tooltip for each time the tiltle changes (new song) ive tried som "if" funcions, but did not quite get that to work.. how can i do this? Link to comment Share on other sites More sharing options...
picea892 Posted June 23, 2009 Share Posted June 23, 2009 (edited) $title = WinGetTitle ("Spotify -") $location = StringMid ($title, 10) ToolTip ($location) while 1 if not $title=WinGetTitle ("Spotify -") then $title = WinGetTitle ("Spotify -") $location = StringMid ($title, 10) ToolTip ($location) endif sleep(100) wend Edited June 23, 2009 by picea892 Link to comment Share on other sites More sharing options...
Vegar Posted June 23, 2009 Author Share Posted June 23, 2009 $title = WinGetTitle ("Spotify -") $location = StringMid ($title, 10) ToolTip ($location) while 1 if not $title=WinGetTitle ("Spotify -") then $title = WinGetTitle ("Spotify -") $location = StringMid ($title, 10) ToolTip ($location) endif sleep(100) wend This did not work :-/ Link to comment Share on other sites More sharing options...
frme Posted February 21, 2010 Share Posted February 21, 2010 Global $ArtistOgTitle = "-", $OldArtistOgTittel = "" While 1 $var = winlist() for $i = 1 to $var[0][0] if stringleft($var[$i][0], 7) = "spotify" then If $var[$i][0] <> "Spotify" Then $OldArtistOgTittel = $ArtistOgTitle $ArtistOgTitle = StringReplace($var[$i][0], "Spotify - ", "") If $OldArtistOgTittel <> $ArtistOgTitle Then Tooltip(" " & $ArtistOgTitle & " ", 20,10) EndIf EndIf Sleep (30) exitloop endif next Sleep (250) Wend Exit Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now