Fóruns: マクロ掲示板 (Thread #47215)

マクロ:Messagebox関数について(PPAマクロ) (2022-10-26 22:14 by べいく #92144)

現在、Sakura Editor v2.4.1.2849 32bit (tag v2.4.1)を使用しており、マクロを書いているのですが、壁に当たっておりますので、
ご回答いただけると幸いです。

MessageBoxでネット検索しますと、たいがい、種別:0しか見当たりません。
その他の種別を用いて、デバッグチェックポイントのように使い、中止を指定したら処理を止めたいのですが、
現状どれを押してもOKと同様の動きとなります。
この関数文の下にif文をつければ戻り値に応じた振る舞いに変えられると思ってるのですが、
ヘルプにあるような戻り値は実装されてますでしょうか。参照する方法があればご教授お願いします。

Responder a #92144×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

Re: マクロ:Messagebox関数について(PPAマクロ) (2022-10-27 02:35 by AC #92146)

次の1行の PPA マクロで戻り値が表示できます。OK なら1が、キャンセルなら2が返っているようです。

S_TraceOut(IntToStr(MessageBox('メッセージ','キャプション',33)),0);

ですので、if 文もしくは case 文で MessageBox の戻り値に応じて処理を分けることもできると思います。

PPA についてはサクラエディタの F1 (キーで出てくる)ヘルプに統合されて表示される ppa.chm で調べました。
PPA.DLL に付属している PPA.HLP と同じ内容です。

Windows の MessageBox 関数については次のページで調べました。
[[メッセージボックス - Windows API 入門|http://kaitei.net/winapi/message-boxes/]]
Responder a #92144

Responder a #92146×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

Re: マクロ:Messagebox関数について(PPAマクロ) (2022-10-27 14:48 by べいく #92150)

ACさん

早速のご回答ありがとうございます。
参照先も教えていただき。
さっそく見てみますね。


Responder a #92146

Responder a #92150×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login