Guest User

Untitled

a guest
Feb 20th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. alias itunes {
  2. if ($1 == open) {
  3. .comopen itunes itunes.application
  4. .echo -a $comerr
  5. }
  6. if ($1 == Play) {
  7. .set %play $com(itunes,PlayPause,3)
  8. if (!%play) {
  9. .echo -a No track to play, Itunes may not be open.
  10. }
  11. }
  12. if ($1 == Next) {
  13. .set %next $com(itunes,NextTrack,3)
  14. if (!%next) {
  15. .echo -a No track to play, Itunes may not be open.
  16. }
  17. }
  18. if ($1 == Previous) {
  19. .set %Previous $com(itunes,PreviousTrack,3)
  20. if (!%Previous) {
  21. .echo -a No track to play, Itunes may not be open.
  22. }
  23. }
  24. if ($1 == Stop) {
  25. .set %stop $com(itunes,Stop,3)
  26. if (!%stop) {
  27. .echo -a No track to play, Itunes may not be open.
  28. }
  29. }
  30. }
  31. alias track {
  32. if (!$com(itunes)) { .comopen itunes iTunes.Application
  33. }
  34. if ($com(CurrentTrack)) { .comclose CurrentTrack
  35. }
  36. .echo -q $com(itunes,CurrentTrack,3,dispatch* CurrentTrack)
  37. .echo -q $com(CurrentTrack,Artist,3)
  38. .set %artist $com(CurrentTrack).result
  39. .echo -q $com(CurrentTrack,Album,3)
  40. .set %album $com(CurrentTrack).result
  41. .echo -q $com(CurrentTrack,Time,3)
  42. .set %time $com(CurrentTrack).result
  43. .echo -q $com(CurrentTrack,Rating,3)
  44. .set %rating $com(CurrentTrack).result
  45. .echo -q $com(CurrentTrack,Name,3)
  46. .set %name $com(CurrentTrack).result
  47. /msg # 9Artist:13 %artist 9Track:13 %name 9Album:13 %album 9Time:13 %time $+ .
  48. }
Add Comment
Please, Sign In to add comment