Guest User

Untitled

a guest
Oct 21st, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 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. /track
  9. if (!%play) {
  10. .echo -a iTunes may not be open.
  11. }
  12. }
  13. if ($1 == Next) {
  14. .set %next $com(itunes,NextTrack,3)
  15. /track
  16. if (!%next) {
  17. .echo -a iTunes may not be open.
  18. }
  19. }
  20. if ($1 == Previous) {
  21. .set %Previous $com(itunes,PreviousTrack,3)
  22. /track
  23. if (!%Previous) {
  24. .echo -a iTunes may not be open.
  25. }
  26. }
  27. if ($1 == Stop) {
  28. .set %stop $com(itunes,Stop,3)
  29. if (!%stop) {
  30. .echo -a iTunes may not be open.
  31. }
  32. }
  33. }
  34. alias np {
  35. if (!$com(itunes)) { .comopen itunes iTunes.Application
  36. }
  37. if ($com(CurrentTrack)) { .comclose CurrentTrack
  38. }
  39. .echo -q $com(itunes,CurrentTrack,3,dispatch* CurrentTrack)
  40. .echo -q $com(CurrentTrack,Artist,3)
  41. .set %artist $com(CurrentTrack).result
  42. .echo -q $com(CurrentTrack,Album,3)
  43. .set %album $com(CurrentTrack).result
  44. .echo -q $com(CurrentTrack,Name,3)
  45. .set %name $com(CurrentTrack).result
  46. /me 00,01is 14,01listening 00,01to 11,01♪♫♪: 14,01 %name 00,01by: 14,01 %artist 00,01from: 14,01 %album
  47. }
Add Comment
Please, Sign In to add comment