現在、このようなスクリプトでマウスのイベントを取得しています。
oncmd gosub *move, $200 oncmd gosub *ldown, 0x0201 oncmd gosub *rdown, 0x0204 oncmd gosub *lup, 0x0202 oncmd gosub *ldown, 0x0205 time=0 record=0 position=0 /***** ボタン作成部分 *****/ bgscr 1,100,20,,0,0//ボタン用のウィンドウ作る gsel 1,2//そのボタン用ウィンドウのIDは1なので、それにフォーカスを当てるkkk objsize 100,20//ボタンのサイズは100×50 button gosub "END",*ending /***** ボタン作成部分 *****/ repeat time++ await 1 loop stop *ending notesel buf repeat length(record) noteadd str(record(cnt)) loop notesave "record.txt" end *move record(position)="<Event>"+"<Msg>"+"MOVE"+"<X>"+str(ginfo(0))+"</X>"+"<Y>"+str(ginfo(1))+"</Y>"+"<Time>"+str(time)+"</Time>"+"</Event>" position++ time=0 return *ldown record(position)="<Event>"+"<Msg>"+"L_DOWN"+"<X>"+str(ginfo(0))+"</X>"+"<Y>"+str(ginfo(1))+"</Y>"+"<Time>"+str(time)+"</Time>"+"</Event>" position++ time=0 return *rdown record(position)="<Event>"+"<Msg>"+"R_DOWN"+"<X>"+str(ginfo(0))+"</X>"+"<Y>"+str(ginfo(1))+"</Y>"+"<Time>"+str(time)+"</Time>"+"</Event>" position++ time=0 return *lup record(position)="<Event>"+"<Msg>"+"L_UP"+"<X>"+str(ginfo(0))+"</X>"+"<Y>"+str(ginfo(1))+"</Y>"+"<Time>"+str(time)+"</Time>"+"</Event>" position++ time=0 return *rup record(position)="<Event>"+"<Msg>"+"R_UP"+"<X>"+str(ginfo(0))+"</X>"+"<Y>"+str(ginfo(1))+"</Y>"+"<Time>"+str(time)+"</Time>"+"</Event>" position++ time=0 return
今回、自分はHSPのウィンドウにフォーカスが当たっていない状態でも取得したいと考えています。
oncmdだと無理そうなので・・・。
どのようにすればいいでしょうか?