[iscript]
// 作ってみた。不具合あったらすまん
function updateLinkButton(
lay = kag.current, // 対象レイヤ
num = 0, // リンク番号。数値が範囲外だとエラー
elm = %[] // graphic(必須), graphickey(voidでおk)
){
with( lay.links[ num ] ) {
.object.loadImages( .graphic = elm.graphic, .graphickey = elm.graphickey );
.w = [ .object.width ], .h = [ .object.height ];
}
}
[endscript]
; 以下サンプル
[layopt layer="message" visible]
[button graphic="ボタンA"][p]

[eval exp="updateLinkButton( kag.fore.messages[0], 0, %[ graphic : 'ボタンB' ] );"]
; ↑引数一番目は対象レイヤ。voidならkag.current、二番目はリンク番号、三番目は辞書配列でgraphicを指定すると変更できる