Created
August 25, 2014 13:44
-
-
Save tumugin/6df1a5e476b40b1c0f8e to your computer and use it in GitHub Desktop.
なうぷれTunes Lua拡張
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Luaの初期化の時に一度だけ呼び出されます | |
-- Luaのスクリプトの編集の反映にはアプリケーションの再起動が必要になります | |
function main() | |
console("Lua scripting module initialized!!"); | |
end | |
function OnTweet(Song, opt, isCustomTweet) | |
-- Song:中には曲情報が入っています。iTunesClass.csを参考に弄ってください | |
-- opt:ツイートです。中身を変える時はopt.Statusの中身を変更でお願いします | |
-- 何もしない時はとりあえずtrueを返すようになっています(falseにすると投稿自体を取り消します) | |
-- カスタムツイートの時は何もしない | |
if isCustomTweet == true then | |
return true; | |
end | |
-- opt.Status = "Luaから直接変更してみるテスト"; | |
-- サンプル1(めうめうぺったんたん) | |
--[[ | |
if Song.SongTitle == "めうめうぺったんたん!!" then | |
opt.Status = "めめめめめめめ めうめうーっ!めめめめうめうーっ!ぺーったんぺったんぺったんぺったん大好きーっ"; | |
end | |
--]] | |
return true; | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment