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


HSPTV!掲示板


未解決 解決 停止 削除要請

2017
0423
pluginuserdef.as ver1.0 完成!!3解決


plugin

リンク

2017/4/23(Sun) 17:49:05|NO.79243

掲示板に投稿して無事にuserdef.asが出来ました!!
皆様ありがとうございます。

ソースは以下の通りです。


// // // (userdef.as) // // HSP3.0 Userdef Files. // Hot Soup Processor Plugin by Kaito // // #ifdef __HSP30__ #ifndef __Userdef__ //oncmdの定義 #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 //sysinfo の定義 #define global Get_OS sysinfo(0) #define global Get_User sysinfo(1) #define global Get_Maxhine sysinfo(2) #define global Get_Cpucode sysinfo(16) #define global Get_Cpunum sysinfo(17) #define global Get_Usedmemory sysinfo(33) #define global Get_Totalmemory sysinfo(34) #define global Get_Freememory sysinfo(35) #define global Get_Totalpagefile sysinfo(36) #define global Get_Freepagefile sysinfo(37) #define global Get_Totalvirtualmemory sysinfo(38) #define global Get_Freevirtualmemory sysinfo(39) //syscolor のカラーコード #define global Scrollbar_color 0 #define global Desktop_color 1 #define global ActiveWindowTitleBar_color 2 #define global InactiveWindowTitleBarText_color 3 #define global MenuBackground_color 4 #define global WindowBackground_color 5 #define global WindowFrame_color 6 #define global TextMenu_color 7 #define global TextWindow_Color 8 #define global TextActiveWindowTitleBar_color 9 #define global BoundaryActiveWindow_color 10 #define global BoundaryInactiveWindow_color 11 #define global BackgroundMDIApplication_color 12 #define global SelectedItemControl_color 13 #define global TextSelectedItemControl_color 14 #define global Surface3Dobject_color 15 #define global Shadowobject_color 16 #define global InvalidText_color 17 #define global PushButtonText_color 18 #define global Brightest3Dobject_color 20 #define global DarkShadow3Dobject_color 21 #define global Bright3Dobject_color 22 #define global TooltipControlText_color 23 #define global TooltipControlBackground_color 24 #define global HotTrackItem_color 26 #define global GradationRightSideTitleBarActiveWindow_color 27 #define global GradationRightSideTitleBarInactivewindow_color 28 #define global UsedHighlightMenuItemWhenMenuDisplayedFlatMenu_color 29 #define global BackgroundMenuBarWhenMenuDisplayedFlatMenu_color 30 //sysfontの定義 #define global HSPSystem_font 0 #define global OEM_font 10 #define global FixedSet_font 11 #define global VariableSet_font 12 #define global StandardSystem_font 13 #define global DefaultGUI_font 17 //HSPの数値の限界値 #define global Get_Maxint 2147483647 #define global Get_Minint -2147483648 //未定義 #define global TransparentBoxf 0x0000 #undef TransparentBoxf #define global Rndint 0x0000 #undef Rndint //userdef.asが正常に読み込まれるとデフォルトのタイトル名が変更されます title "Hot Soup Processor Plugin" //Userdefのモジュールを開始します #module __UserDef__ //指定した範囲のランダマイズを取得します #defcfunc Rndint int _Rnds, int _Rnde randomize Rnds=_Rnds Rnde=_Rnde if Rnds>Rnde { sw=Rnds Rnds=Rnde Rnde=sw } return rnd(Rnde+1-Rnds)+Rnds //透明な図形を描画します #deffunc TransparentBoxf int bx1, int by1, int bx2, int by2 gmode 3,,,128 grect (bx1)+(bx2)/2,(by1)+(by2)/2,0,(bx2),(by2) gmode 0 return //Userdefのモジュールを終了します #global __UserDef__ #endif #endif

●userdef.asをお持ちの方
上のソースをコピーして自分が持っているuserdef.asに追加して下さい。

●userdef.asをお持ちでない方
上のソースをコピーしてhspファイル内にあるcommonファイル内にuserdef.asと保存して下さい。



この記事に返信する


plugin

リンク

2017/4/23(Sun) 17:53:30|NO.79244

●追加機能
・oncmdのウィンドウIDの定義
・sysinfo syscolor sysfont の定義
■新たな命令

・Rndint p1,p2
指定したp1〜p2の範囲の乱数を出します。
負の数の指定も可能です。

・TransparentBoxf p1,p2,p3,p4
boxfと同じ様に指定しますが、
これはboxfとは違って透明な正方形や長方形を描画することができる命令です。
色はTransparentBoxf前に color 命令で指定できます。



plugin

リンク

2017/4/23(Sun) 17:55:47|NO.79246

皆様のご感想やバグなどがありましたらご報告して下さい。
アドバイスなども宜しくお願い致します。



plugin

リンク

2017/4/23(Sun) 17:59:30|NO.79248

注意としては、
このスレッドに関係ないことを報告するのは
ご遠慮下さい。



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