HSPポータル
サイトマップ お問い合わせ


HSPTV!掲示板


未解決 解決 停止 削除要請

2017
0422
pluginhspdef.asに追加機能を...3解決


plugin

リンク

2017/4/22(Sat) 19:53:35|NO.79211

hspdef.asに追加機能を作ってみました。

・追加機能

 oncmd のウィンドウIDの指定を楽々に

今のところ一個です。

以下のソースをhspdef.asに上書きするとできます。


; ; HSP3.0 Default define and macros ; Hot Soup Processor Plugin by Kaito ; #ifdef __hsp30__ #ifndef __hspdef__ #define __hspdef__ #addition "userdef.as" #addition "hspogg.as" #define global WM_NULL 0x0000 #define global WM_CREATE 0x0001 #define global WM_DESTROY 0x0002 #define global WM_MOVE 0x0003 #define global WM_SIZE 0x0005 #define global WM_ACTIVATE 0x0006 #define global WM_SETFOCUS 0x0007 #define global WM_KILLFOCUS 0x0008 #define global WM_ENABLE 0x000A #define global WM_SETREDRAW 0x000B #define global WM_SETTEXT 0x000C #define global WM_GETTEXT 0x000D #define global WM_GETTEXTLENGTH 0x000E #define global WM_PAINT 0x000F #define global WM_CLOSE 0x0010 #define global WM_QUERYENDSESSION 0x0011 #define global WM_QUERYOPEN 0x0013 #define global WM_ENDSESSION 0x0016 #define global WM_QUIT 0x0012 #define global WM_ERASEBKGND 0x0014 #define global WM_SYSCOLORCHANGE 0x0015 #define global WM_SHOWWINDOW 0x0018 #define global WM_WININICHANGE 0x001A #define global WM_DEVMODECHANGE 0x001B #define global WM_ACTIVATEAPP 0x001C #define global WM_FONTCHANGE 0x001D #define global WM_TIMECHANGE 0x001E #define global WM_CANCELMODE 0x001F #define global WM_SETCURSOR 0x0020 #define global WM_MOUSEACTIVATE 0x0021 #define global WM_CHILDACTIVATE 0x0022 #define global WM_QUEUESYNC 0x0023 #define global WM_GETMINMAXINFO 0x0024 #define global WM_PAINTICON 0x0026 #define global WM_ICONERASEBKGND 0x0027 #define global WM_NEXTDLGCTL 0x0028 #define global WM_SPOOLERSTATUS 0x002A #define global WM_DRAWITEM 0x002B #define global WM_MEASUREITEM 0x002C #define global WM_DELETEITEM 0x002D #define global WM_VKEYTOITEM 0x002E #define global WM_CHARTOITEM 0x002F #define global WM_SETFONT 0x0030 #define global WM_GETFONT 0x0031 #define global WM_SETHOTKEY 0x0032 #define global WM_GETHOTKEY 0x0033 #define global WM_QUERYDRAGICON 0x0037 #define global WM_COMPAREITEM 0x0039 #define global WM_GETOBJECT 0x003D #define global WM_COMPACTING 0x0041 #define global WM_COMMNOTIFY 0x0044 #define global WM_WINDOWPOSCHANGING 0x0046 #define global WM_WINDOWPOSCHANGED 0x0047 #define global WM_POWER 0x0048 #define global WM_COPYDATA 0x004A #define global WM_CANCELJOURNAL 0x004B #define global WM_NOTIFY 0x004E #define global WM_INPUTLANGCHANGEREQUEST 0x0050 #define global WM_INPUTLANGCHANGE 0x0051 #define global WM_TCARD 0x0052 #define global WM_HELP 0x0053 #define global WM_USERCHANGED 0x0054 #define global WM_NOTIFYFORMAT 0x0055 #define global WM_CONTEXTMENU 0x007B #define global WM_STYLECHANGING 0x007C #define global WM_STYLECHANGED 0x007D #define global WM_DISPLAYCHANGE 0x007E #define global WM_GETICON 0x007F #define global WM_SETICON 0x0080 #define global WM_NCCREATE 0x0081 #define global WM_NCDESTROY 0x0082 #define global WM_NCCALCSIZE 0x0083 #define global WM_NCHITTEST 0x0084 #define global WM_NCPAINT 0x0085 #define global WM_NCACTIVATE 0x0086 #define global WM_GETDLGCODE 0x0087 #define global WM_SYNCPAINT 0x0088 #define global WM_NCMOUSEMOVE 0x00A0 #define global WM_NCLBUTTONDOWN 0x00A1 #define global WM_NCLBUTTONUP 0x00A2 #define global WM_NCLBUTTONDBLCLK 0x00A3 #define global WM_NCRBUTTONDOWN 0x00A4 #define global WM_NCRBUTTONUP 0x00A5 #define global WM_NCRBUTTONDBLCLK 0x00A6 #define global WM_NCMBUTTONDOWN 0x00A7 #define global WM_NCMBUTTONUP 0x00A8 #define global WM_NCMBUTTONDBLCLK 0x00A9 #define global WM_NCXBUTTONDOWN 0x00AB #define global WM_NCXBUTTONUP 0x00AC #define global WM_NCXBUTTONDBLCLK 0x00AD #define global WM_INPUT 0x00FF #define global WM_KEYFIRST 0x0100 #define global WM_KEYDOWN 0x0100 #define global WM_KEYUP 0x0101 #define global WM_CHAR 0x0102 #define global WM_DEADCHAR 0x0103 #define global WM_SYSKEYDOWN 0x0104 #define global WM_SYSKEYUP 0x0105 #define global WM_SYSCHAR 0x0106 #define global WM_SYSDEADCHAR 0x0107 #define global WM_UNICHAR 0x0109 #define global WM_KEYLAST 0x0109 #define global WM_IME_STARTCOMPOSITION 0x010D #define global WM_IME_ENDCOMPOSITION 0x010E #define global WM_IME_COMPOSITION 0x010F #define global WM_IME_KEYLAST 0x010F #define global WM_INITDIALOG 0x0110 #define global WM_COMMAND 0x0111 #define global WM_SYSCOMMAND 0x0112 #define global WM_TIMER 0x0113 #define global WM_HSCROLL 0x0114 #define global WM_VSCROLL 0x0115 #define global WM_INITMENU 0x0116 #define global WM_INITMENUPOPUP 0x0117 #define global WM_MENUSELECT 0x011F #define global WM_MENUCHAR 0x0120 #define global WM_ENTERIDLE 0x0121 #define global WM_MENURBUTTONUP 0x0122 #define global WM_MENUDRAG 0x0123 #define global WM_MENUGETOBJECT 0x0124 #define global WM_UNINITMENUPOPUP 0x0125 #define global WM_MENUCOMMAND 0x0126 #define global WM_CHANGEUISTATE 0x0127 #define global WM_UPDATEUISTATE 0x0128 #define global WM_QUERYUISTATE 0x0129 #define global WM_CTLCOLORMSGBOX 0x0132 #define global WM_CTLCOLOREDIT 0x0133 #define global WM_CTLCOLORLISTBOX 0x0134 #define global WM_CTLCOLORBTN 0x0135 #define global WM_CTLCOLORDLG 0x0136 #define global WM_CTLCOLORSCROLLBAR 0x0137 #define global WM_CTLCOLORSTATIC 0x0138 #define global WM_MOUSEFIRST 0x0200 #define global WM_MOUSEMOVE 0x0200 #define global WM_LBUTTONDOWN 0x0201 #define global WM_LBUTTONUP 0x0202 #define global WM_LBUTTONDBLCLK 0x0203 #define global WM_RBUTTONDOWN 0x0204 #define global WM_RBUTTONUP 0x0205 #define global WM_RBUTTONDBLCLK 0x0206 #define global WM_MBUTTONDOWN 0x0207 #define global WM_MBUTTONUP 0x0208 #define global WM_MBUTTONDBLCLK 0x0209 #define global WM_MOUSEWHEEL 0x020A #define global WM_XBUTTONDOWN 0x020B #define global WM_XBUTTONUP 0x020C #define global WM_XBUTTONDBLCLK 0x020D #define global WM_MOUSELAST 0x020D #define global WM_PARENTNOTIFY 0x0210 #define global WM_ENTERMENULOOP 0x0211 #define global WM_EXITMENULOOP 0x0212 #define global WM_NEXTMENU 0x0213 #define global WM_SIZING 0x0214 #define global WM_CAPTURECHANGED 0x0215 #define global WM_MOVING 0x0216 #define global WM_POWERBROADCAST 0x0218 #define global WM_DEVICECHANGE 0x0219 #define global WM_MDICREATE 0x0220 #define global WM_MDIDESTROY 0x0221 #define global WM_MDIACTIVATE 0x0222 #define global WM_MDIRESTORE 0x0223 #define global WM_MDINEXT 0x0224 #define global WM_MDIMAXIMIZE 0x0225 #define global WM_MDITILE 0x0226 #define global WM_MDICASCADE 0x0227 #define global WM_MDIICONARRANGE 0x0228 #define global WM_MDIGETACTIVE 0x0229 #define global WM_MDISETMENU 0x0230 #define global WM_ENTERSIZEMOVE 0x0231 #define global WM_EXITSIZEMOVE 0x0232 #define global WM_DROPFILES 0x0233 #define global WM_MDIREFRESHMENU 0x0234 #define global WM_IME_SETCONTEXT 0x0281 #define global WM_IME_NOTIFY 0x0282 #define global WM_IME_CONTROL 0x0283 #define global WM_IME_COMPOSITIONFULL 0x0284 #define global WM_IME_SELECT 0x0285 #define global WM_IME_CHAR 0x0286 #define global WM_IME_REQUEST 0x0288 #define global WM_IME_KEYDOWN 0x0290 #define global WM_IME_KEYUP 0x0291 #define global WM_MOUSEHOVER 0x02A1 #define global WM_MOUSELEAVE 0x02A3 #define global WM_NCMOUSEHOVER 0x02A0 #define global WM_NCMOUSELEAVE 0x02A2 #define global WM_WTSSESSION_CHANGE 0x02B1 #define global WM_TABLET_FIRST 0x02c0 #define global WM_TABLET_LAST 0x02df #define global WM_CUT 0x0300 #define global WM_COPY 0x0301 #define global WM_PASTE 0x0302 #define global WM_CLEAR 0x0303 #define global WM_UNDO 0x0304 #define global WM_RENDERFORMAT 0x0305 #define global WM_RENDERALLFORMATS 0x0306 #define global WM_DESTROYCLIPBOARD 0x0307 #define global WM_DRAWCLIPBOARD 0x0308 #define global WM_PAINTCLIPBOARD 0x0309 #define global WM_VSCROLLCLIPBOARD 0x030A #define global WM_SIZECLIPBOARD 0x030B #define global WM_ASKCBFORMATNAME 0x030C #define global WM_CHANGECBCHAIN 0x030D #define global WM_HSCROLLCLIPBOARD 0x030E #define global WM_QUERYNEWPALETTE 0x030F #define global WM_PALETTEISCHANGING 0x0310 #define global WM_PALETTECHANGED 0x0311 #define global WM_HOTKEY 0x0312 #define global WM_PRINT 0x0317 #define global WM_PRINTCLIENT 0x0318 #define global WM_APPCOMMAND 0x0319 #define global WM_THEMECHANGED 0x031A #define global WM_HANDHELDFIRST 0x0358 #define global WM_HANDHELDLAST 0x035F #define global WM_AFXFIRST 0x0360 #define global WM_AFXLAST 0x037F #define global WM_PENWINFIRST 0x0380 #define global WM_PENWINLAST 0x038F #define global WM_APP 0x8000 #define global WM_USER 0x0400 #define global and & #define global or | #define global xor ^ #define global not ! #define global screen_normal (0) #define global screen_palette (1) #define global screen_hide (2) #define global screen_fixedsize (4) #define global screen_tool (8) #define global screen_frame (16) #define global gmode_gdi (0) #define global gmode_mem (1) #define global gmode_rgb0 (2) #define global gmode_alpha (3) #define global gmode_rgb0alpha (4) #define global gmode_add (5) #define global gmode_sub (6) #define global gmode_pixela (7) #define global ginfo_mx ginfo(0) #define global ginfo_my ginfo(1) #define global ginfo_act ginfo(2) #define global ginfo_sel ginfo(3) #define global ginfo_wx1 ginfo(4) #define global ginfo_wy1 ginfo(5) #define global ginfo_wx2 ginfo(6) #define global ginfo_wy2 ginfo(7) #define global ginfo_vx ginfo(8) #define global ginfo_vy ginfo(9) #define global ginfo_sizex ginfo(10) #define global ginfo_sizey ginfo(11) #define global ginfo_winx ginfo(12) #define global ginfo_winy ginfo(13) #define global ginfo_mesx ginfo(14) #define global ginfo_mesy ginfo(15) #define global ginfo_r ginfo(16) #define global ginfo_g ginfo(17) #define global ginfo_b ginfo(18) #define global ginfo_paluse ginfo(19) #define global ginfo_dispx ginfo(20) #define global ginfo_dispy ginfo(21) #define global ginfo_cx ginfo(22) #define global ginfo_cy ginfo(23) #define global ginfo_intid ginfo(24) #define global ginfo_newid ginfo(25) #define global ginfo_sx ginfo(26) #define global ginfo_sy ginfo(27) #define global ctype objinfo_mode(%1) objinfo(%1,0) #define global ctype objinfo_bmscr(%1) objinfo(%1,1) #define global ctype objinfo_hwnd(%1) objinfo(%1,2) #define global notemax noteinfo(0) #define global notesize noteinfo(1) #define global dir_cur dirinfo(0) #define global dir_exe dirinfo(1) #define global dir_win dirinfo(2) #define global dir_sys dirinfo(3) #define global dir_cmdline dirinfo(4) #define global dir_desktop dirinfo($10000) #define global dir_mydoc dirinfo($10005) #define global dir_tv dirinfo(5) #define global font_normal (0) #define global font_bold (1) #define global font_italic (2) #define global font_underline (4) #define global font_strikeout (8) #define global font_antialias (16) #define global objmode_normal (0) #define global objmode_guifont (1) #define global objmode_usefont (2) #define global gsquare_grad (-257) #define global msgothic "MS ゴシック" #define global msmincho "MS 明朝" #define global do %tbreak %i0 %tcontinue %i0 %tdo *%i #define global until(%1=1) %tcontinue *%o : %tdo if (%1)=0 { goto *%o } %tbreak *%o #define global while(%1=1) %tcontinue %i0 %twhile *%i :%tbreak if (%1)=0 { goto *%i } #define global wend %tcontinue *%o : %twhile goto *%o: %tbreak *%o #define global for(%1,%2=0,%3=0,%4=1) %tcontinue %i0 %tfor %1=%2:*%i %s4 %s1 :%tbreak exgoto %1,%4,%3,*%i #define global next %tcontinue *%o :%tfor %o +=%o :goto *%o :%tbreak *%o #define global _break %tbreak goto *%p #define global _continue %tcontinue goto *%p #define global switch(%1) %tswitch %i0 %s1 _switch_val=%p : if 0 { #define global case(%1) %tswitch _switch_sw++} if _switch_val == (%1) | _switch_sw { _switch_sw = 0 #define global default %tswitch } if 1 { #define global swbreak %tswitch goto *%p1 #define global swend %tswitch %o0 } *%o #define global ddim(%1,%2,%3=0,%4=0,%5=0) dimtype %1,3,%2,%3,%4,%5 #define global ldim(%1,%2,%3=0,%4=0,%5=0) dimtype %1,1,%2,%3,%4,%5 #define global alloc sdim #define global M_PI 3.14159265358979323846 #define global ctype rad2deg(%1) (57.295779513082320877*(%1)) #define global ctype deg2rad(%1) (0.017453292519943295769*(%1)) #define global ease_linear (0) #define global ease_quad_in (1) #define global ease_quad_out (2) #define global ease_quad_inout (3) #define global ease_cubic_in (4) #define global ease_cubic_out (5) #define global ease_cubic_inout (6) #define global ease_quartic_in (7) #define global ease_quartic_out (8) #define global ease_quartic_inout (9) #define global ease_bounce_in (10) #define global ease_bounce_out (11) #define global ease_bounce_inout (12) #define global ease_shake_in (13) #define global ease_shake_out (14) #define global ease_shake_inout (15) #define global ease_loop (4096) #ifndef _DEBUG #undef assert #define global assert(%1) : #undef logmes #define global logmes(%1) : #endif #endif #else #addition "hsp261cmp.as" #endif

サンプル(上のソースをhspdef.asに上書きした後の)ソースです。

mes "WM_IME_REQUEST = "+WM_IME_REQUEST

頑張って作りましたので皆様のご意見を聞かせてください。
ご協力お願い致します。



この記事に返信する


名無し

リンク

2017/4/22(Sat) 20:44:38|NO.79212

userdefを使うべきでは



plugin

リンク

2017/4/22(Sat) 23:25:18|NO.79218

>名無しさん
ご指摘ありがとうございます。
しかし userdef とは何でしょうか?
hsp ファイルの中を探しても出ませんでした。
宜しければ教えてくれると嬉しいです^^



plugin

リンク

2017/4/22(Sat) 23:36:27|NO.79219

userdef hsp と検索したら分かりました。
userdef.as は初めて使いますがとてもいいです!!
名無しさん ありがとうございます!!



ONION software Copyright 1997-2021(c) All rights reserved.