also meine script holt sich den titel und artist/interpret aus iTunes der gespielt wird, und speichert sich das in einer listview ab!
hier mein script:
Spoiler anzeigen
$Song = GetCurrentItunesSong()
;~ MsgBox(0,"Itunes play title",""&$Song)
$Songold = $Song
func GetCurrentItunesSong()
$oItunes = ObjCreate("iTunes.Application")
if @error then
Msgbox (0,"Itunes","Error Getting an active Itunes Object. Error code: " & hex(@error,8))
exit
endif
$state=$oItunes.PlayerState
if $State=1 Then
$curtrack=$oItunes.CurrentTrack
$Trackname=$curtrack.name
$Artistname=$curtrack.Artist
endif
If $Artistname <> 0 Then $Title=$ArtistName&" | "&$TrackName
If $Artistname = 0 Then $Title=$TrackName&" | "
return $TrackName
endfunc
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("iTunes Play: "&$Song, 630, 280)
GUISetBkColor(0x000000)
$ListView1 = GUICtrlCreateListView("Title |Artist ", 8, 8, 617, 265)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 306)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 306)
$ListView1_0 = GUICtrlCreateListViewItem($Song, $ListView1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
$Song = GetCurrentItunesSong()
If $Song <> $Songold Then
WinSetTitle("iTunes Play: ","","iTunes Play: "&$Song)
$ListView1_1 = GUICtrlCreateListViewItem($Song, $ListView1)
$Songold = $Song
EndIf
WEnd
ich weiß er ist nochnicht so das beste aber ich habe es hinbekommen! ![]()