リファレンス 9 ドキュメント 3 サンプル 15
basic 38 comobj 9 demo 1 game 12 hgimg 12 hgimg3 10 hspcl 9 hspda 7 hspdb 3 hspdx 6 hspext 16 hspinet 5 hspsock 5 new 22 ssaver 1

comobj

Path : sample\comobj
comtest1.hsp
シェルリンクオブジェクトのクラスID #define CLSID_ShellLink "{00021401-0000-0000-C000-000000000046}" IShellLink インターフェースのインターフェースID #define IID_IShellLinkA "{000214EE-0000-0000-C000-000000000046}" IPersistFile インターフェースのインターフェース ID #define IID_IPersistFile
sample\comobj\comtest1.hsp - 2005/08/01
comtest2.hsp
#define navigate "Navigate" mes "InternetExplorerコンポーネントを起動します。
sample\comobj\comtest2.hsp - 2005/08/01
comtest3.hsp
title "ImgCtxによる画像読み込み" newcom pImage,ImgCtx dialog "BMP *.JPG *.PNG *.GIF *.ICO *.TIFF",16 if stat = 0 : end fname = refstr IImgCtx_Load pImage,fname,0 dim size,4 repeat IImgCtx_GetStateInfo pImage,flg,size,1 if ( flg & 0x00200000 )==0 : break wait
sample\comobj\comtest3.hsp - 2005/08/01
comtest4.hsp
XMLパーサー(MSXML)を使用してRSSを読み込む url="http: hotwired.goo.ne.jp/news/index.rdf" newcom oDom,"Microsoft.XMLDOM" oDom("async")="FALSE" 同期読み込みを行う oDom->"load" "test.xml" ファイルを指定する時 oDom->"load" url URLを指定する時 oRoot = oDom("documentElement") if varuse(oRoot)=0
sample\comobj\comtest4.hsp - 2005/08/01
comtest5.hsp
WSHを使う newcom wshSHell, "WScript.Shell" comres res mcall wshSHell, "Popup", "メッセージです", 5, "テスト", 3|48 if stat : dialog "COM呼び出しのエラーです。
sample\comobj\comtest5.hsp - 2005/08/01
comtest6.hsp
Excelを使う (MicrosoftExcelがインストールされている必要があります) newcom xlApp, "Excel.Application" xlApp("Visible") = 1 ウィンドウを表示 xlApp("DisplayAlerts") = 0 警告メッセージを表示させない xlBooks = xlApp("Workbooks") Workbooks コレクション取得 xlBook = xlBooks("Add") ワークブックを追加 xlSheet =
sample\comobj\comtest6.hsp - 2005/08/01
comtest7.hsp
IEコンポーネントを使う #define DIID_DWebBrowserEvents2 "{34A715A0-6587-11D0-924A-0020AFC7AC4D}" #define DISPID_COMMANDSTATECHANGE 105 #define DISPID_BEFORENAVIGATE2 250 #define DISPID_NAVIGATECOMPLETE2 252 #define DISPID_ONQUIT 253 #define DISPID_ONMENUBAR
sample\comobj\comtest7.hsp - 2005/08/01
comtest8.hsp
正規表現(RegExp)を使った検索 teststr="012 3456 78 9" testptn="\\d+" mes "対象文字 \""+teststr+"\"" mes "パターン \""+testptn+"\"" newcom oReg,"VBScript.RegExp" comres result oReg("Pattern")=testptn oReg("Global")=1 oReg->"Execute" teststr oMatches=result repeat
sample\comobj\comtest8.hsp - 2005/08/01
comtest9.hsp
正規表現(RegExp)を使った置換 teststr="This is a pen." testptn="This" repstr="That" mes "対象文字 \""+teststr+"\"" mes "検索文字 \""+testptn+"\"" mes "置換文字 \""+repstr+"\"" newcom oReg,"VBScript.RegExp" comres result oReg("Pattern")=testptn oReg->"Replace"
sample\comobj\comtest9.hsp - 2005/08/01