#module
#deffunc gettext int, val, int
mref id, 0 : mref rstr, 25 : mref size, 2
objsend id, 0x000D, size, rstr // 表示テキスト取得
return
#deffunc getlist int, val
mref id, 0 : mref rstr, 25
objsend id, 0x0188, 0, nonuse // 選択アイテム番号取得
objsend id, 0x0189, stat, rstr // 選択テキスト取得
return
#global
sdim string, 8
objsize 80, 25
pos 10, 10 : button "取得", *get
pos 10, 40 : listbox index.0, 100, "朝日\nいろは\n上野\n英語\n大阪"
pos 100, 10 : button "取得", *get
pos 100, 40 : combox index.1, 100, "桜\n新聞\nスズメ\n世界\nそろばん"
stop
*get
if stat = 0 {
getlist 1, string // オブジェクトID1の選択リストテキストを取得する
dialog "選択項目:" + string
} else {
gettext 3, string, 10 // オブジェクトID3の選択コンボテキストを取得する
dialog "表示:" + string
}
stop
|