Minikori Posted June 9, 2009 Posted June 9, 2009 (edited) Hello, I'm trying to write a script that will get the full window name of VLC Media Player and take out that part to get the current song's name and artist. But with this script I have, the current window's title becomes blank. The title of VLC is set up as "Artist - Song - VLC media player" Any help? Here's my code: While 1 $Title = WinGetTitle("VLC media player") $Song = StringTrimRight($Title, 19) WinSetTitle("[active]", "", $Song) WEnd Edited June 9, 2009 by Minikori For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com
Valuater Posted June 9, 2009 Posted June 9, 2009 (edited) ok, you want to trim the right side OFF the title $Changed = False $Title = "VLC media player" ; 16 not 19 here? While 1 If $Changed = False And WinActive($Title) Then $Title = WinGetTitle($Title) $Song = StringTrimRight($Title, 19) ; this will leave the "left" side of the text WinSetTitle($Title, "", $Song) $Changed = True EndIf Sleep(50) WEnd 8) Edited June 9, 2009 by Valuater
Minikori Posted June 11, 2009 Author Posted June 11, 2009 That script didn't work, and I'm not sure what that really would've done... And the reason for the 19 is because it's " - VLC media player" 19. For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com
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