For now it's deleting old object and creating new, with new url.. but I would like to change the "flashvars", instead of creating new object.
Just source (it is not working without other files - download full at the bottom):
;------------------------------------------------------------;
; Rainwave Player by VixinG
; ver 1.2
;------------------------------------------------------------;
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Array.au3>
#include <IE.au3>
#include 'Icons.au3'
#include <Inet.au3>
#include 'WinSnap.au3'
#include <StaticConstants.au3>
#include "Marquee.au3"
#include <Timers.au3>
;------------------------------------------------------------;
; Hotkeys
;------------------------------------------------------------;
$hotkey1 = IniRead('keys.ini', 'Hotkeys', 'Omniwave', '{F1}')
$hotkey2 = IniRead('keys.ini', 'Hotkeys', 'Rainwave', '{F2}')
$hotkey3 = IniRead('keys.ini', 'Hotkeys', 'Chiptune', '{F3}')
$hotkey4 = IniRead('keys.ini', 'Hotkeys', 'Covers', '{F4}')
$hotkey5 = IniRead('keys.ini', 'Hotkeys', 'OCRradio', '{F5}')
$topmost = IniRead('keys.ini', 'Hotkeys', 'SetOnTop', '{F6}')
HotKeySet($hotkey1, "omniwave")
HotKeySet($hotkey2, "rainwave")
HotKeySet($hotkey3, "bitwave")
HotKeySet($hotkey4, "mixwave")
HotKeySet($hotkey5, "ocr_radio")
HotKeySet($topmost, "TopMost")
HotKeySet("{ESC}", "Quit")
;------------------------------------------------------------;
; Declaring, registering, etc.
;------------------------------------------------------------;
Global $SetOnTop = True
Global $title = 'Click desired station... and enjoy the music!'
Dim $nr[5] = [5, 1, 4, 3, 2]
$GUI = GUICreate('Rainwave Player', 580, 37, 0, 0, $WS_POPUP)
$oRP = ObjCreate("ShockwaveFlash.ShockwaveFlash.1")
$GUIActiveX = GUICtrlCreateObj($oRP, 300, 300, 100, 30)
GUISetState(@SW_SHOW)
Dim $png1[5] = ['.artaa.png', '.artbb.png', '.artcc.png', '.artdd.png', '.artee.png']
Dim $png3[5] = ['.artaa.png', '.artbb.png', '.artcc.png', '.artdd.png', '.artee.png']
Dim $png2[5] = ['.artaa2.png', '.artbb2.png', '.artcc2.png', '.artdd2.png', '.artee2.png']
Global $dragLabel = GUICtrlCreateLabel('', 1, 1, 110, 33, -1, $GUI_WS_EX_PARENTDRAG)
GUICtrlSetBkColor($dragLabel, 0x000000)
_GUICtrlMarquee
_SetScroll
('', 'alternate', 'right', 1, 75)
_GUICtrlMarquee
_SetDisplay
(0, 0xf0ac20, 'black', 8, 'MS Reference Sans Serif')
Dim $pics[5] = [GUICtrlCreatePic('', 110, 1, 0, 0), GUICtrlCreatePic('', 154, 1, 0, 0), GUICtrlCreatePic('', 214, 1, 0, 0), GUICtrlCreatePic('', 310, 1, 0, 0), GUICtrlCreatePic('', 390, 1, 0, 0)]
Dim $urls[5] = ['http://omnistream.rainwave.cc:8000/omniwave.mp3', 'http://rwstream.rainwave.cc:8000/rainwave.mp3', 'http://bitstream.rainwave.cc:8000/bitwave.mp3', 'http://mwstream.rainwave.cc:8000/mixwave.mp3', 'http://ocrstream.rainwave.cc:8000/ocremix.mp3']
Local $disable
Global $00png = '.art00.png'
Global $00obj = GUICtrlCreatePic('', 1, 1, 0, 0)
_SetImage
($00obj, $00png)
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetBkColor(0x000000, $GUI)
_WinSnap
_Set
($GUI)
WinSetOnTop($GUI, "", 1)
;------------------------------------------------------------;
; Script
;------------------------------------------------------------;
Local $lastCursor
Refresh
()
Dim $labels[5] = [GUICtrlCreateLabel('', 110, 1, 44, 23), GUICtrlCreateLabel('', 154, 1, 60, 23), GUICtrlCreateLabel('', 214, 1, 96, 23), GUICtrlCreateLabel('', 309, 1, 81, 23), GUICtrlCreateLabel('', 390, 1, 89, 23)]
For $i = 0 To 4 Step 1
GUICtrlSetBkColor($labels[$i], $GUI_BKCOLOR_TRANSPARENT)
Next
Local $highlighted = False
GUISetState(@SW_SHOW)
$marquee = _GUICtrlMarquee
_Create
($title, 110, 24, 369, 12, "")
While 1
$msg = GUIGetMsg()
$cursor = GUIGetCursorInfo($GUI)
If $cursor[4] >= 11 And $cursor[4] <= 15 Then
$x = $cursor[4] - 11
If $cursor[4] = $labels[$x] And $highlighted = False Then
_SetImage
($pics[$x], $png2[$x])
$highlighted = True
$oldx = $x
$old = $cursor[4]
EndIf
If $highlighted = True And $cursor[4] <> $old Then
_SetImage
($pics[$oldx], $png1[$oldx])
$highlighted = False
EndIf
If $msg >= 11 And $msg <= 15 Then
AdlibUnRegister("GetName")
AdlibRegister("GetName", 10000)
$png1 = $png3
$a = $msg - 11
$var = $urls[$a]
ObjectX
()
_SetImage
($pics[$x], $png2[$x])
$png1[$x] = $png2[$x]
$x2 = $x
$msg2 = $msg
Refresh
()
GetName
()
EndIf
If $msg >= 11 And $msg <= 15 And $msg <> $msg2 Then
$png1 = $png3
$var = $urls[$a]
ObjectX
()
$png1[$x] = $png3[$x]
_SetImage
($pics[$x2], $png1[$x2])
_SetImage
($pics[$x], $png2[$x])
$png1[$x] = $png2[$x]
$x2 = $x
$msg2 = $msg
Refresh
()
GetName
()
EndIf
EndIf
If $cursor[4] = 0 And $highlighted = True Then
Refresh
()
EndIf
WEnd
Exit
;------------------------------------------------------------;
; Functions
;------------------------------------------------------------;
Func Refresh
()
For $i = 0 To 4 Step 1
_SetImage
($pics[$i], $png1[$i])
GUICtrlSetState($pics[$i], $GUI_DISABLE)
$highlighted = False
Next
EndFunc ;==>Refresh
Func TopMost
()
If $SetOnTop = True Then
WinSetOnTop($GUI, "", 0)
$SetOnTop = False
Else
WinSetOnTop($GUI, "", 1)
$SetOnTop = True
EndIf
EndFunc ;==>TopMost
Func omniwave
()
$x = 0
$png1 = $png3
$var = $urls[0]
ObjectX
()
_SetImage
($pics[0], $png2[0])
$png1[0] = $png2[0]
Refresh
()
GetName
()
EndFunc ;==>omniwave
Func rainwave
()
$x = 1
$png1 = $png3
$var = $urls[1]
ObjectX
()
_SetImage
($pics[1], $png2[1])
$png1[1] = $png2[1]
Refresh
()
GetName
()
EndFunc ;==>rainwave
Func bitwave
()
$x = 2
$png1 = $png3
$var = $urls[2]
ObjectX
()
_SetImage
($pics[2], $png2[2])
$png1[2] = $png2[2]
Refresh
()
GetName
()
EndFunc ;==>bitwave
Func mixwave
()
$x = 3
$png1 = $png3
$var = $urls[3]
ObjectX
()
_SetImage
($pics[3], $png2[3])
$png1[3] = $png2[3]
Refresh
()
GetName
()
EndFunc ;==>mixwave
Func ocr
_radio
()
$x = 4
$png1 = $png3
$var = $urls[4]
ObjectX
()
_SetImage
($pics[4], $png2[4])
$png1[4] = $png2[4]
Refresh
()
GetName
()
EndFunc ;==>ocr_radio
Func Quit
()
Exit
EndFunc ;==>Quit
Func GetName
()
$fullsource = _INetGetSource('http://rainwave.cc/async/' & $nr[$x2] & '/get', True)
$start = StringInStr($fullsource, 'sched_current') + 300
$source = StringMid($fullsource, $start, 300)
$start = StringInStr($source, 'song_title": "') + 14
$stop = StringInStr($source, '", "artists')
$length = $stop - $start
$title = StringMid($source, $start, $length)
$start = StringInStr($fullsource, 'sched_current') + 300
$source = StringMid($fullsource, $start, 750)
$start = StringInStr($source, 'album_name": "')
$source = StringMid($source, $start)
$start = StringInStr($source, 'album_name": "') + 14
$stop = StringInStr($source, '", "')
$length = $stop - $start
$album = StringMid($source, $start, $length)
$title = $title & ' - ' & $album
$sample = _GUICtrlMarquee
_Create
($title, 110, 24, 369, 12, "")
GUICtrlDelete($marquee)
$marquee = _GUICtrlMarquee
_Create
($title, 110, 24, 369, 12, "")
GUICtrlDelete($sample)
EndFunc ;==>GetName
Func ObjectX
()
GUICtrlDelete($GUIActiveX)
GUICtrlDelete($oRP)
$oRP = ObjCreate("ShockwaveFlash.ShockwaveFlash.1")
$GUIActiveX = GUICtrlCreateObj($oRP, 489, 8, 80, 20)
$LinkoRP = ObjEvent($oRP, "IEEvent_", "Preview")
GUISetState()
With $oRP
.Movie = 'http://www.rainwave.tk/player/ffmp3-config.swf'
.flashvars = 'url=' & $var & '&codec=mp3&volume=75&introurl=&autoplay=true&tracking=false&jsevents=true&buffering=5&skin=ffmp3-rainwave.xml'
.bgcolor = "#000000"
.wmode = "Opaque"
.allowscriptaccess = 'always'
.scale = 'noscale'
EndWith
EndFunc ;==>ObjectX