;
;	HSP help managerp HELP\[Xt@C
;	(æªªu;vÌsÍRgÆµÄ³êÜ·)
;

%type
g£½ß
%ver
3.3
%note
llmod3.hspðCN[h·éBKvÉ¶Äabout.hsp,msgdlg.hsp,multiopen.hsp,console.hsp,unicode.hsp,dragdrop.hsp,input.hspðCN[h·é

%date
2009/08/01
%author
tom
%dll
llmod3
%url
http://www5b.biglobe.ne.jp/~diamond/hsp/hsp2file.htm


%index
about
vOÌo[Wð\¦·é_CAOðì¬
%group
g£üoÍ§ä½ß
%prm
"s1","s2"
s1 : AvP[V¼ªüÁ½¶ñÏÜ½Í¶ñ
s2 : »ìÒ¼ªüÁ½¶ñÏÜ½Í¶ñ

%inst
vOÌo[Wð\¦·éÈÇÉgíêé_CAOð\¦µÜ·B
AvP[V¼s1ð"my.exeÌÊÞ°¼Þ®Ýîñ#my.exe ver 1.00"
Ìæ¤É#ÅæØéÆ'Microsoft my.exe ver 1.00'Æ¢¤\¦ªÁíèÜ·B


%index
msgdlg
g£dialog(type 0`3 )
%group
IuWFNg§ä½ß
%prm
"s1","s2",n3,n4
s1 : bZ[WªüÁ½¶ñÏÜ½Í¶ñ
s2 : ^CgªüÁ½¶ñÏÜ½Í¶ñ
n3 : ^Cv
n4 : ACR^Cv

%inst
HSPÌdialog½ßÌg£ÅÅ·B
^p
^Cv
 0 Ok
 1 Ok ·¬Ý¾Ù
 2 ~@Äs@³
 3 Í¢@¢¢¦@·¬Ý¾Ù
 4 Í¢@¢¢¦
 5 ÄJs ·¬Ý¾Ù
^
ACR^Cv
 0 ACR³µ
 1 G[(x)
 2 NGX`}[N(?)
 3 x(!)
 4 îñ(i)
 5 EXEªÁÄ¢éACR
^
±Ì½ßðÄÑoµ½ãÌstatÌl
l Ið³ê½{^
 1 Ok
 2 ·¬Ý¾Ù
 3 ~
 4 Äs
 5 ³
 6 Í¢
 7 ¢¢¦
-1 G[­¶
^p
^CvÉÈºÌlðÁ¦éÆftHg{^ªÏ¦çêÜ·B
    0       {^1
    $100    {^2
    $200    {^3
ACR^CvÉÈºÌlðÁ¦éÆr[v¹ªÏ¦çêÜ·B
    0       ¢¹(m[})
    $100    x¹

%sample
msgdlg "¡úÍ±±ÅI¹µÜ·©H","vOÌI¹",3,5
if stat=6 : dialog "Í¢@ªIð³êÜµ½"
if stat=7 : dialog "¢¢¦@ªIð³êÜµ½"
if stat=2 : dialog "·¬Ý¾Ù@ªIð³êÜµ½"


%index
multiopen
¡Ìt@C¼ðæ¾
%group
IuWFNg§ä½ß
%prm
v1,v2,n3,n4
v1 : Ið³ê½t@C¼ðó¯æé½ßÌÏ
v2 : îñ
n3 : tB^ÌCfbNX(1©ç)
n4 : Read Only{bNXðt¯é

%inst
HSPÌdialog(type 16,17)Å¡Ìt@CðIðÅ«éæ¤Éµ½àÌÅ·B
multiopenÄÑoµÉAv1.0,v1.1É»ê¼êv1,v2ÌTCYðãüµÄ¨«Ü·B
v2ÉÍáÌæ¤È`®ÅtB^ðãüµÜ·B
n3ðÈªAÜ½Í}CiXÌlðgÁ½Æ«Ì®ìÍõlQÆB
n4ð1É·éÆReadOnly{bNXðt¯Ü·B2É·éÆReadOnly{bNXð`FbNµ½óÔÉµÜ·B
^
±Ì½ßðÄÑoµ½ãÌstatÌl
^p
0 LZ³ê½
1 t@CªIð³êÄOK{^ª³ê½
2 t@CªIð³êÄOK{^ª³ê½(ReadOnlyª`FbN³êÄ¢éB½¾µ¡Ið³êÄ¢È¢êÌÝ)
^p
p3ð0(Èª)ÉµÄp1,p2É¶ñðüêéÆp1ª^CgÉÈèAp2ÍútH_ÉÈèÜ·B
p3ð}CiXlÉ·éÆÛ¶·ét@C¼ð¾éÆ«Ég¤±ÆªÅ«Ü·B(½¾µ¡IðÍÅ«Ü¹ñ)
^
¡Ìt@CªIð³ê½©Ínotesel,notemaxðgÁÄ²×Ü·B
t@CªêÂµ©Ið³êÈ©Á½êAp1ÉÍt@C¼ÌtpXªãü³êAp2ÉÍt@CÌg£qªãü³êÜ·B
t@Cª¡IÎê½êÍAp1ÉnotegetÅæ¾Å«é`®Åt@C¼ª¡üÁÄ¢ÄAp2ÉÍIð³ê½t@Cª étH_ªãü³êÜ·B(p1Ìt@C¼Í'\r'($0d)ÅæØçêÄ¢Ü·B)

%sample
	buf_size=512 : info_size=128
	alloc buf,buf_size
	alloc info,info_size
^
	buf="Ì§²ÙðJ­test title" : info="a:\\windows"
	multiopen buf,info

	buf=buf_size
	buf.1=info_size
	info="HSP2 ½¸ØÌßÄÌ§²Ù(*.hsp)|*.hsp|Ã·½ÄÌ§²Ù(*.txt)|*.txt|SÄÌÌ§²Ù|*.*|"
	multiopen buf,info,1
	if stat=0 : mes "LZ³êÜµ½" : else {
		notesel buf
		notemax mx
		mes "Ið³ê½t@C "+mx
		repeat mx
			noteget a,cnt
			mes a
		loop
		if mx=1 : mes "g£qÍ"+info : else mes "tH_ "+info
	}


%index
console_end
R\[EBhEðÂ¶é
%group
½ßTv
%inst
R\[EBhEðÂ¶Ü·B
%href
console



%index
console
R\[EBhEðì¬
%group
½ßTv
%inst
R\[EBhEðì¬µÜ·B

%href
console_end
gets
puts
console_color
console_pos




%index
puts
R\[É¶ñð«Þ
%group
½ßTv
%prm
v1
v1 : R\[É\¦·é¶ñªüÁ½¶ñÏ

%inst
R\[É¶ñð\¦µÜ·B
(putzðg¤Æv1É¼Ú¶ñðgp·é±ÆªÅ«Ü·B)

%href
gets
console




%index
gets
R\[©ç¶ñðÇÝÞ
%group
½ßTv
%prm
v1,n2
v1 : R\[©çÌ¶ñðæ¾·éÏ
n2 : æ¾·é¶Ì

%inst
R\[©ç¶ñðæ¾µÜ·B
n2ðÈªµ½Æ«ÌlÍ63Å·B

%href
puts
console




%index
console_color
R\[ÌeLXgÌFÝè
%group
½ßTv
%prm
n1
n1 : R\[Ì¶ñÌF

%inst
R\[É\¦·é¶ñÌFðÝèµÜ·B
n1ÍÈºÌlðgÝí¹Äg¢Ü·B1+4¾ÆÉÈèÜ·B
1+4+8Å¾é¢ÉÈèÜ·B
^
^p
n1Ìl  F
1       Â
2       Î
4       Ô
8       ­²
$10     Â(wi)
$20     Î(wi)
$40     Ô(wi)
$80     ­²(wi)
^p

%href
puts
console



%index
console_pos
R\[Ì¶\¦ÊuÝè
%group
½ßTv
%prm
n1,n2
n1 : xÀW
n2 : yÀW

%inst
¶ñð\¦·éÀWðÝèµÜ·B

%href
puts
console


%index
to_uni
UnicodeÖÏ·
%group
¶ñì½ß
%prm
v1,v2,n3
v1 : Unicodeði[·éÏ
v2 : UnicodeÉÏ··é¶ñÏ
n3 : UnicodeÉÏ··é¶ñÌ·³

%inst
ANSI¶ñ(SJIS)ðUNICODEÉÏ·µÜ·B
^
±Ì½ßðÄÑoµ½ãAstatÉobt@É«Üê½Unicode¶Ìªãü³êÜ·B
0ÈçG[Å·B
^
unicodeÄÑoµãÉstatÉüélÌ'obt@É«Üê½Unicode¶Ì'ÍA1oCg(¼p)¶Í1¶¤2oCg(Sp)¶à1¶Æ¦Ü·B
á¦Î
	s="abc ¢¤"
ð·×ÄUnicodeÉÏ·µ½ ÆÌstatlÍ6+1(* +1ÍÅãÌ¶ñI¶Ôñ)BÆÈèÜ·B
^
n3ð-1É·éÆwèµ½¶ñSÄðÏ·µÜ·B
n3ð0É·éÆUnicodeði[·éÌÉKvÈÏÌTCYðÔµÜ·B(oCgPÊ)

%href
from_uni

%sample
	s="UnicodeÉÏ··é¶ñ"
	strlen sl,s
	;alloc buf,(sl+1)*2	;±Ìê(sl+1)*2ª64É½È¢ÌÅallocÍKvÈ¢
	to_uni buf,s,sl+1
	usize=stat
	if usize=-1 : dialog "G[ª­¶µÜµ½"
	if usize=0 : dialog "Ï·ª¸sµÜµ½"
	if usize>0 : bsave "unicode.dat",buf,usize*2




%index
from_uni
Unicode©çANSIÉÏ·
%group
¶ñì½ß
%prm
v1,v2,n3
v1 : Multibyteði[·éÏ
v2 : MultibyteÉÏ··éUnicode¶ñªüÁÄ¢éÏ
n3 : MultibyteÉÏ··éUnicode¶ñÌ·³

%inst
UNICODEðANSI¶ñÉÏ·µÜ·B
^
±Ì½ßðÄÑoµ½ãAstatÉobt@É«Üê½Multibyte¶Ìªãü³êÜ·B
0ÈçG[Å·B
^
±Ì½ßðÄÑoµ½ãÌstatÌlA'obt@É«Üê½Multibyte¶Ì'Í1oCg(¼p)¶Í1¶¤2oCg(Sp)¶Í2¶Æ¦Ü·B
^
'MultibyteÉÏ··éUnicode¶ñÌ·³'ð-1É·éÆSÄÏ·µÜ·B
'MultibyteÉÏ··éUnicode¶ñÌ·³'ð0É·éÆMultibyteði[·éÌÉKvÈÏÌTCYðÔµÜ·B(oCgPÊ)

%href
to_uni

%sample
	exist "unicode.dat"
	bload "unicode.dat",uni,strsize
	buf=""
	from_uni buf,uni,-1
	mbsize=stat
	if mbsize=-1 : dialog "G[ª­¶µÜµ½"
	if mbsize=0 : dialog "Ï·ª¸sµÜµ½"
	if mbsize>0 : dialog buf


%index
dd_accept
hbO&hbvðÅ«éæ¤É·é
%group
½ßTv
%prm
v1,v2,n3
v1 : hbO&hbv³ê½t@C¼ðüêéÏ
v2 : hbO&hbv³ê½t@CðüêéÏ
n3 : EBhEID
%inst
n3Åwèµ½EBhEÉhbO&hbv(ÈºD&D)ðÅ«éæ¤ÉµÜ·B
½¾µAEBhEID 1ÍÝèÅ«Ü¹ñB
dd_acceptðÀsµ½ãAEBhEÉt@CªD&D³êéÆv1Åwèµ½ÏÉD&D³ê½t@C¼ªüèÜ·B
v2ÉÍD&D³ê½t@CÌAD&D³ê½ÀWAEBhEIDªãü³êÜ·B
^
D&D³ê½t@C¼Í"\n"ÅæØçêÄ¢Ü·(D&D³ê½t@Cª1ÂÌêÅà)B
1ÂÌt@C¼ðæèoµ½¢Æ«Ím[gpbh½ßðg¤ÆÖÅ·B
^
dd_acceptÀsãÍAv1,v2ÉÝèµ½ÏÍalloc,dim,sdimÈÇÉgpµÈ¢Åº³¢B

%href
dd_reject
%sample
	#include "llmod3.hsp"
	#include "dragdrop.hsp"
^
	alloc buf,1024*64	;hbO&hbv³ê½t@C¼ðüêéÏ
	dd_accept buf,a
^
*@
	wait 1
	if a {
		cls
		pos 0,0
		mes "hbO&hbv³ê½t@C:"+a
		mes "hbO&hbv³ê½t@CÊu x:"+a.1+" y:"+a.2
		mes "hbO&hbv³ê½EBhEID :"+a.3
		mes buf
		a=0		; aðZbgµÄ­¾³¢
	}
	goto @b




%index
dd_reject
hbO&hbvðÅ«È¢æ¤É·é
%group
g£üoÍ§ä½ß
%prm
n1,n2
n1 : EBhEID
n2 : tO
%inst
hbO&hbvðÅ«È¢æ¤ÉµÜ·B
dd_acceptðÀsµÄ¢È¢êÉÍøÊª èÜ¹ñB
n2ð1É·éÆà¤êxhbO&hbvðÅ«éæ¤ÉµÜ·B
%href
dd_accept



%index
keybd_event
L[{[hì
%group
g£üoÍ§ä½ß
%prm
n1,n2,n3
n1 : L[R[h
n2 : L[ðú·tO
n3 : IvV

%inst
L[{[hìðs¢Ü·B
n1Éµ½¢L[ÌL[R[hðwèµÜ·B
n2ð0ÉµÄ±Ì½ßðÀs·éÆn1ðOñÀsµ½Æ«Æ¯¶L[R[hA
n2ð1ÉµÄà¤êx±Ì½ßðÀsµÈ¢ÆL[ðúµ½±ÆÉÈèÜ¹ñB
n2ð-1É·éÆµÄúµ½±ÆÉÈèÜ·B
n3ÌIvVÍXN[VbgL[ð·Æ«ÉgpµÜ·Bn3ð0É·éÆtXN[A1É·éÆANeBuÈEBhEªNbv{[hÉRs[³êÜ·B
^
keybd_eventÍ¼ÌvOÌEBhEªANeBuÈêÅàÀs³êÜ·B
^
<>L[R[h
L[R[hÍgetkeyÅgp·éàÌÆ¯¶Å·B
Ù©ÉàÈºÌæ¤ÈàÌª èÜ·B
^p
n1Ìl
44       XN[Vbg
45       INS
46       DEL
106      eL[Ì'*'
107      eL[Ì'+'
108      eL[Ì','
109      eL[Ì'-'
110      eL[Ì'.'
111      eL[Ì'/'
^p
%sample
	#include "llmod3.hsp"
	#include "input.hsp"
^
	exec "notepad"
	s="ABCDEFG" : strlen L,s
^
	repeat L
		peek c,s,cnt
		keybd_event c,-1
	loop
^
	keybd_event 18,-1	;ALT
	keybd_event 'F',-1	;Ì§²Ù(F)
	keybd_event 'O',-1	;J­(O)
^
	keybd_event 'N',-1	;Z[umF_CAOÌ¢¢¦(N)
^
	s="INPUTnAS" : strlen L,s	;'n'ÍL[R[hÅ'.'(110)ð\·
^
	;±±ÌRgðO·ÆSHIFTðµ½±ÆÉÈèå¶ÉÈèÜ·
	;keybd_event 16
^
	repeat L
		peek c,s,cnt
		keybd_event c,-1
	loop
^
	;ãÌRgðOµ½Æ«Í±±ÌRgàOµÄ­¾³¢
	;keybd_event 16,1
^
	keybd_event 13,-1	;ENTER
^
	stop



%index
mouse_event
}EXì
%group
g£üoÍ§ä½ß
%prm
n1,n2,n3
n1 : ì^Cv
n2 : ½ûüÌÚ®Ê
n3 : ¼ûüÌÚ®Ê

%inst
}EXìðs¢Ü·B
n1Éwè·é^CvÅ}EXìðs¤±ÆªÅ«Ü·B
½ûüÌÚ®ÊÍAæÊ¶©çEÖÚ®³¹éÆ«ª³A»Ìtª
¼ûüÌÚ®ÊÍAæÊã©çºÖÚ®³¹éÆ«ª³A»Ìtª
Å é±ÆÉÓµÄ­¾³¢B
^
mouse_eventÍHSPÌvOªANeBuÅÈ¢Æ«Åà}EXìÉe¿µÜ·B
^
<>ì^Cv
n1ÌlÍÈºÌàÌðgÝí¹Ägp·é±ÆªÅ«Ü·B
^p
n1Ìl
$1       }EXÚ®
$2       ¶Ì{^ð·
$4       ¶Ì{^ðú·
$8       EÌ{^ð·
$10      EÌ{^ðú·
$20      Ì{^ð·
$40      Ì{^ðú·
^p
%sample
	#include "llmod3.hsp"
	#include "input.hsp"
^
*lp
	movx=0 : movy=0
	getkey k,37 : if k : movx-	;©L[
	getkey k,38 : if k : movy-	;ªL[
	getkey k,39 : if k : movx+	;¨L[
	getkey k,40 : if k : movy+	;«L[
^
	;SHIFTª³ê½ç¶{^ð·
	getkey kSHIFT,16 : if kSHIFT : Lbtn=$2 : else Lbtn=0
	mouse_event $1+Lbtn, movx, movy
^
	;SHIFTð·Æ}EXÌ¶{^ðµ½±ÆÉÈèkª1ÉÈé
	getkey k,1 : if k : pset mousex,mousey
^
	;SHIFTª³êÄ½ç¶{^ðú·
	if kSHIFT : mouse_event $4
^
	await 1
	goto lp

