Sign in to follow this  
Followers 0
{NL}--Xantios---

Variabel Update

7 posts in this topic

i dont know if this is posible

but i finaly have my litle appie so far that it can read what is playing and i want to put that into an traytip that come's up when the songs change's so techanlice

if $song change's then gimme that goddammed traytip :think:

does anyone know if this is posible and how to do this ? thnx 4 reading:-)

/eof

Share this post


Link to post
Share on other sites



Post your code, get your help.

Share this post


Link to post
Share on other sites

Post your code, get your help.

Yes sir !

; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.0
; Author:        A.N.Other <myemail@nowhere.com>
;
; Script Function:
;   Template AutoIt script.
;
; ----------------------------------------------------------------------------

; Script Start - Add your code below here
$var = 0
if ProcessExists("winamp.exe") then $var = 1
if $var = 0 then msgbox(64,"Winamp is niet gestart","Winamp is niet gestart, Start winamp en probeer opnieuw")
;if ProcessExists(@AutoItExe) then msgbox(0,"App draait al","Programma is al actief kijk onder in bij de klok")
Traytip("Winamp Remote Control V2","Programma blijft actief op de achtergrond,in Leesmij.txt staan de toetsen die u kunt gebruiken",25)
HotKeySet("!p","Pause")
HotKeySet("!z","PRV")
HotKeySet("!a","nxt")
HotKeySet("!{down}","volz")
HotKeySet("!{up}","volu")
Func Pause()
    ProcessSetPriority("winamp.exe",@SW_RESTORE)
    winActivate("Player Window","")
    sleep(10)
    send("c")
EndFunc

Func PRV()
    ProcessSetPriority("winamp.exe",@SW_RESTORE)
    winActivate("Player Window","")
    sleep(10)
    send("z")
EndFunc

Func nxt()
    ProcessSetPriority("winamp.exe",@SW_RESTORE)
    winActivate("Player Window","")
    sleep(10)
    send("b")
EndFunc

Func volz()
    ProcessSetPriority("winamp.exe",@SW_RESTORE)
    winActivate("Player Window","")
    sleep(10)
    send("{down}")
EndFunc

Func volu()
    ProcessSetPriority("winamp.exe",@SW_RESTORE)
    winActivate("Player Window","")
    sleep(10)
    send("{up}")
EndFunc
$loop = 0
while 1 
    sleep(0)
    $loop = $loop + 1
;MsgBox(16,"",$loop)
    FileWrite("blaat.txt","-" &" " &$loop )
WEnd
If ProcessExists("winamp.exe") Then
    $var = WinList()

    For $i = 1 to $var[0][0]
        If $var[$i][0] <> "" AND StringRight($var[$i][0], 6) = "WinAmp" Then
            $song = StringReplace($var[$i][0], " - WinAmp", "")
            $letters = Stringsplit($song, "")
            $count = getsong($letters)
            $letters = StringLeft($song, $count)
            $song = StringReplace($song, $letters, "")
            msgbox(0, "Playing:", $song)
        EndIf
    Next
Else
    MsgBox(0, "WinAmp", "WinAmp is not running!")
EndIf

Func getsong($letters)
    For $x = 0 To $letters[0]
        If $letters[$x] = "." Then
            Return $x
        EndIf
    Next
EndFunc

i know that there is an litle error in it :( but i first want to know if i can update thet variabel on an nice way :-)

so the idea is..

that when winamp (variabel $song ) change's there wil come an traytip with a text like:

Now playing: $song :think: got it ? iig thnx 4 reading.. and if you can help me... that would be grate ! :)

Share this post


Link to post
Share on other sites

Changed some stuff, added some stuff, now works minimized.

Opt ("WinTitleMatchMode", 2)
Global $winTitle, $winamps, $winHandle
$var = 0
if ProcessExists("winamp.exe") then $var = 1
if $var = 0 then msgbox(64,"Winamp is niet gestart","Winamp is niet gestart, Start winamp en probeer opnieuw")
;~ Traytip("Winamp Remote Control V2","Programma blijft actief op de achtergrond,in Leesmij.txt staan de toetsen die u kunt gebruiken",25)
HotKeySet("!p","Pause")
HotKeySet("!z","PRV")
HotKeySet("!a","nxt")
HotKeySet("!{down}","volz")
HotKeySet("!{up}","volu")
Func Pause()
    ControlSend ("Player Window", "", $winHandle, "c")
EndFunc

Func PRV()
    ControlSend ("Player Window", "", $winHandle, "z")
EndFunc

Func nxt()
    ControlSend ("Player Window", "", $winHandle, "b")
EndFunc

Func volz()
    ControlSend ("Player Window", "", $winHandle, "{DOWN}")
EndFunc

Func volu()
    ControlSend ("Player Window", "", $winHandle, "{UP}")
EndFunc

$winamps = WinList ("Winamp")
For $i = 1 To $winamps[0][0]
    If $winamps[$i][0] <> "Winamp Equalizer" And $winamps[$i][0] <> "Winamp Video" Then
        $winTitle = $winamps[$i][0]
        $winHandle = $winamps[$i][1]
        ExitLoop
    EndIf
Next
$winTitle = StringTrimLeft ($winTitle, StringInStr ($winTitle, ". ", 0, 1))
$winTitle = StringLeft ($winTitle, StringInStr ($winTitle, " - Winamp"))
TrayTip ("Current Song", $winTitle, 1)
While 1
    Sleep (20)
    If ProcessExists ("winamp.exe") Then
        If Not StringInStr (WinGetTitle ($winHandle), $winTitle) Then
            $winTitle = WinGetTitle ($winHandle)
            $winTitle = StringTrimLeft ($winTitle, StringInStr ($winTitle, ". ", 0, 1))
            $winTitle = StringLeft ($winTitle, StringInStr ($winTitle, " - Winamp"))
            TrayTip ("Current Song", $winTitle, 1)
        EndIf
    Else
        MsgBox (0, "No Winamp!", "Winamp is not running!")
        Do
            Sleep (10)
        Until ProcessExists ("winamp.exe")
    EndIf
WEnd

Share this post


Link to post
Share on other sites

i love you !!!!! THNX !!!!!!! :think: this one is the release canidate 0,1 :-) just a litle thingy's to add like an menu under the autoit thingy with a litle gui or something :-) but that will do it :( uhm btw THNX! and before i forget to say it.. THNX!

Share this post


Link to post
Share on other sites

credits???


[font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font]

Share this post


Link to post
Share on other sites

credits???

sorry :think: Totaly forget :( thnx 4 the winamp function

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0