home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 October
/
VPR9710A.ISO
/
Ffilly
/
TFYW111
/
RTW_PIC.MAC
< prev
next >
Wrap
Text File
|
1997-06-05
|
13KB
|
486 lines
//ピクチャー関連関数
main:
menu
"&LoadPic\t画像ファイルの読み込み",
"&MovePic\t画像データの転送",
"Move&SPic\t画像データを拡大縮小して転送",
"&DelPic\t画像データの破棄",
"&CreatePic\tピクチャーの生成",
"Pic&Width\tピクチャーの幅の取得",
"Pic&Height\tピクチャーの高さの取得",
"&ReversePic\t左右反転イメージの転写";
if(result == 0) goto macro_cancel;
else if(result == 1) call InsFunc "LoadPic",2;
else if(result == 2) call MovePic;
else if(result == 3) call MoveSPic;
else if(result == 4) call InsFunc "DelPic",1;
else if(result == 5) call CreatePic;
else if(result == 6) call InsFunc "PicWidth",1;
else if(result == 7) call InsFunc "PicHeight",1;
else if(result == 8) call ReversePic;
macro_end:
endmacro;
macro_cancel:
writeininum "tfywrite.ini", "Control", "MenuCancel", 1;
endmacro;
MovePic:
escape;
call MacSrvInit;
ddepoke "newdialog", "35,MovePic";
ddepoke "newcontrol", "text,,移動元ピクチャー";
ddepoke "newcontrol", "text,, ";
ddepoke "part", "2";
ddepoke "newcontrol", "text,,ピクチャー番号(&P)";
ddepoke "part", "13";
ddepoke "newcontrol", "edit,Picture,";
ddepoke "newcontrol", "text,, ";
ddepoke "part", "2";
ddepoke "newcontrol", "text,,始点";
ddepoke "part", "5";
ddepoke "newcontrol", "text,,X座標(&X)";
ddepoke "part", "8";
ddepoke "newcontrol", "edit,X,";
ddepoke "part", "6";
ddepoke "newcontrol", "text,,Y座標(&Y)";
ddepoke "part", "8";
ddepoke "newcontrol", "edit,Y,";
ddepoke "newcontrol", "text,, ";
ddepoke "part", "2";
ddepoke "newcontrol", "text,,サイズ";
ddepoke "part", "5";
ddepoke "newcontrol", "text,,幅(&W)";
ddepoke "part", "8";
ddepoke "newcontrol", "edit,W,";
ddepoke "part", "6";
ddepoke "newcontrol", "text,,高さ(&H)";
ddepoke "part", "8";
ddepoke "newcontrol", "edit,H,";
ddepoke "newcontrol", "text,, ";
ddepoke "newcontrol", "text,,移動先ピクチャー";
ddepoke "newcontrol", "text,, ";
ddepoke "part", "2";
ddepoke "newcontrol", "text,,ピクチャー番号(&I)";
ddepoke "part", "13";
ddepoke "newcontrol", "edit,NPicture,";
ddepoke "newcontrol", "text,, ";
ddepoke "part", "2";
ddepoke "newcontrol", "text,,始点";
ddepoke "part", "5";
ddepoke "newcontrol", "text,,X座標(&R)";
ddepoke "part", "8";
ddepoke "newcontrol", "edit,NX,";
ddepoke "part", "6";
ddepoke "newcontrol", "text,,Y座標(&D)";
ddepoke "part", "8";
ddepoke "newcontrol", "edit,NY,";
ddepoke "newcontrol", "text,, ";
ddepoke "newcontrol", "radio,Mode,転送モード(&M)";
ddepoke "item", "通常";
ddepoke "item", "透明色転送モード";
ddepoke "item", "シーンチェンジモード";
ddepoke "newcolumn", "30";
ddepoke "newcontrol", "text,, ";
ddepoke "newcontrol", "text,,透明色(16進)(&C)";
ddepoke "part", "15";
ddepoke "newcontrol", "edit,TransCol,";
ddepoke "newcontrol", "radio,SChange,シーンチェンジモード(&S)";
ddepoke "item", "Dissolve";
ddepoke "item", "Wipe Top/Down";
ddepoke "item", "Wipe Right/Left";
ddepoke "item", "Roll Down";
ddepoke "item", "Roll Up";
ddepoke "item", "Roll Right";
ddepoke "item", "Roll left";
ddepoke "item", "Scroll Down";
ddepoke "item", "Scroll Up";
ddepoke "item", "Scroll Right";
ddepoke "item", "Scroll left";
ddepoke "item", "Tile Dissolve";
ddepoke "newcontrol", "text,,転送時間(&T)";
ddepoke "part", "11";
ddepoke "newcontrol", "edit,Time,";
ddepoke "newpage", "56";
ddepoke "newcontrol", "text,, ";
ddepoke "part", "36";
ddepoke "newcontrol", "okcancel,Ok";
call MakeDialog;
$Ok = dderequest("getstring Ok");
if($Ok == "0") goto macro_end;
$Picture = dderequest("getstring Picture");
$X = dderequest("getstring X");
$Y = dderequest("getstring Y");
$W = dderequest("getstring W");
$H = dderequest("getstring H");
$NPicture= dderequest("getstring NPicture");
$NX = dderequest("getstring NX");
$NY = dderequest("getstring NY");
$Mode = dderequest("getstate Mode");
$TransCol= dderequest("getstring TransCol");
$SChange = dderequest("getstate SChange");
$Time = dderequest("getstring Time");
//透明色転送モードのとき
if($Mode == "2"){
$Cmd = "MovePic(" +$Picture+ "," +$X+ "," +$Y+ "," +$W+ "," +$H+ "," +$NPicture+ "," +$NX+ "," +$NY+ ",0," +$TransCol+ ");";
}
//シーンチェンジモードのとき
else if($Mode == "3"){
$Cmd = "MovePic(" +$Picture+ "," +$X+ "," +$Y+ "," +$W+ "," +$H+ "," +$NPicture+ "," +$NX+ "," +$NY+ "," +$Time+ "," +$SChange+ ");";
}
//通常モードのとき
else if($Mode == "1"){
$Cmd = "MovePic(" +$Picture+ "," +$X+ "," +$Y+ "," +$W+ "," +$H+ "," +$NPicture+ "," +$NX+ "," +$NY+ ");";
}
insert $Cmd;
goto macro_end;
ddeexecute "exit";
MoveSPic:
escape;
call MacSrvInit;
ddepoke "newdialog", "35,MoveSPic";
ddepoke "newcontrol", "text,,移動元ピクチャー";
ddepoke "newcontrol", "text,, ";
ddepoke "part", "2";
ddepoke "newcontrol", "text,,ピクチャー番号(&P)";
ddepoke "part", "13";
ddepoke "newcontrol", "edit,Picture,";
ddepoke "newcontrol", "text,, ";
ddepoke "part", "2";
ddepoke "newcontrol", "text,,始点";
ddepoke "part", "5";
ddepoke "newcontrol", "text,,X座標(&X)";
ddepoke "part", "8";
ddepoke "newcontrol", "edit,X,";
ddepoke "part", "6";
ddepoke "newcontrol", "text,,Y座標(&Y)";
ddepoke "part", "8";
ddepoke "newcontrol", "edit,Y,";
ddepoke "newcontrol", "text,, ";
ddepoke "part", "2";
ddepoke "newcontrol", "text,,サイズ";
ddepoke "part", "5";
ddepoke "newcontrol", "text,,幅(&W)";
ddepoke "part", "8";
ddepoke "newcontrol", "edit,W,";
ddepoke "part", "6";
ddepoke "newcontrol", "text,,高さ(&H)";
ddepoke "part", "8";
ddepoke "newcontrol", "edit,H,";
ddepoke "newcontrol", "text,, ";
ddepoke "newcontrol", "text,,移動先ピクチャー";
ddepoke "newcontrol", "text,, ";
ddepoke "part", "2";
ddepoke "newcontrol", "text,,ピクチャー番号(&I)";
ddepoke "part", "13";
ddepoke "newcontrol", "edit,NPicture,";
ddepoke "newcontrol", "text,, ";
ddepoke "part", "2";
ddepoke "newcontrol", "text,,始点";
ddepoke "part", "5";
ddepoke "newcontrol", "text,,X座標(&R)";
ddepoke "part", "8";
ddepoke "newcontrol", "edit,NX,";
ddepoke "part", "6";
ddepoke "newcontrol", "text,,Y座標(&D)";
ddepoke "part", "8";
ddepoke "newcontrol", "edit,NY,";
ddepoke "newcontrol", "text,, ";
ddepoke "part", "2";
ddepoke "newcontrol", "text,,サイズ";
ddepoke "part", "5";
ddepoke "newcontrol", "text,,幅(&B)";
ddepoke "part", "8";
ddepoke "newcontrol", "edit,NW,";
ddepoke "part", "6";
ddepoke "newcontrol", "text,,高さ(&K)";
ddepoke "part", "8";
ddepoke "newcontrol", "edit,NH,";
ddepoke "newcontrol", "text,, ";
ddepoke "newcontrol", "text,,透明色(16進)(&C)";
ddepoke "part", "15";
ddepoke "newcontrol", "edit,TransCol,";
ddepoke "newcontrol", "text,,";
ddepoke "part", "15";
ddepoke "newcontrol", "check,Mode,透明色転送をする(&T)";
ddepoke "newcontrol", "text,, ";
ddepoke "part", "15";
ddepoke "newcontrol", "okcancel,Ok";
call MakeDialog;
$Ok = dderequest("getstring Ok");
if($Ok == "0") goto macro_end;
$Picture = dderequest("getstring Picture");
$X = dderequest("getstring X");
$Y = dderequest("getstring Y");
$W = dderequest("getstring W");
$H = dderequest("getstring H");
$NPicture= dderequest("getstring NPicture");
$NX = dderequest("getstring NX");
$NY = dderequest("getstring NY");
$NW = dderequest("getstring NW");
$NH = dderequest("getstring NH");
$Mode = dderequest("getstate Mode");
$TransCol= dderequest("getstring TransCol");
//透明色転送モードのとき
if($Mode == "1"){
$Cmd = "MoveSPic(" +$Picture+ "," +$X+ "," +$Y+ "," +$W+ "," +$H+ "," +$NPicture+ "," +$NX+ "," +$NY+ "," +$NW+ "," +$NH+ ",0," +$TransCol+ ");";
}
//通常モードのとき
else if($Mode == "0"){
$Cmd = "MoveSPic(" +$Picture+ "," +$X+ "," +$Y+ "," +$W+ "," +$H+ "," +$NPicture+ "," +$NX+ "," +$NY+ "," +$NW+ "," +$NH+ ");";
}
insert $Cmd;
goto macro_end;
ddeexecute "exit";
CreatePic:
escape;
call MacSrvInit;
ddepoke "newdialog", "36,CreatePic";
ddepoke "newcontrol", "text,,基準ピクチャー番号(&P)";
ddepoke "part", "17";
ddepoke "newcontrol", "edit,Picture,";
ddepoke "newcontrol", "text,,サイズ";
ddepoke "part", "10";
ddepoke "newcontrol", "text,,幅(&W)";
ddepoke "part", "7";
ddepoke "newcontrol", "edit,W,";
ddepoke "part", "6";
ddepoke "newcontrol", "text,,高さ(&H)";
ddepoke "part", "7";
ddepoke "newcontrol", "edit,H,";
ddepoke "newcontrol", "text,, ";
ddepoke "part", "16";
ddepoke "newcontrol", "okcancel,Ok";
call MakeDialog;
$Ok = dderequest("getstring Ok");
if($Ok == "0") goto macro_end;
$Picture = dderequest("getstring Picture");
$W = dderequest("getstring W");
$H = dderequest("getstring H");
$Cmd = "CreatePic(" +$Picture+ "," +$W+ "," +$H+ ");";
insert $Cmd;
goto macro_end;
ddeexecute "exit";
ReversePic:
escape;
call MacSrvInit;
ddepoke "newdialog", "35,ReversePic";
ddepoke "newcontrol", "text,,移動元ピクチャー";
ddepoke "newcontrol", "text,, ";
ddepoke "part", "2";
ddepoke "newcontrol", "text,,ピクチャー番号(&P)";
ddepoke "part", "13";
ddepoke "newcontrol", "edit,Picture,";
ddepoke "newcontrol", "text,, ";
ddepoke "part", "2";
ddepoke "newcontrol", "text,,始点";
ddepoke "part", "5";
ddepoke "newcontrol", "text,,X座標(&X)";
ddepoke "part", "8";
ddepoke "newcontrol", "edit,X,";
ddepoke "part", "6";
ddepoke "newcontrol", "text,,Y座標(&Y)";
ddepoke "part", "8";
ddepoke "newcontrol", "edit,Y,";
ddepoke "newcontrol", "text,, ";
ddepoke "part", "2";
ddepoke "newcontrol", "text,,サイズ";
ddepoke "part", "5";
ddepoke "newcontrol", "text,,幅(&W)";
ddepoke "part", "8";
ddepoke "newcontrol", "edit,W,";
ddepoke "part", "6";
ddepoke "newcontrol", "text,,高さ(&H)";
ddepoke "part", "8";
ddepoke "newcontrol", "edit,H,";
// ddepoke "newcontrol", "text,, ";
ddepoke "newcontrol", "text,,移動先ピクチャー";
ddepoke "newcontrol", "text,, ";
ddepoke "part", "2";
ddepoke "newcontrol", "text,,ピクチャー番号(&I)";
ddepoke "part", "13";
ddepoke "newcontrol", "edit,NPicture,";
ddepoke "newcontrol", "text,, ";
ddepoke "part", "2";
ddepoke "newcontrol", "text,,始点";
ddepoke "part", "5";
ddepoke "newcontrol", "text,,X座標(&R)";
ddepoke "part", "8";
ddepoke "newcontrol", "edit,NX,";
ddepoke "part", "6";
ddepoke "newcontrol", "text,,Y座標(&D)";
ddepoke "part", "8";
ddepoke "newcontrol", "edit,NY,";
ddepoke "newcontrol", "text,, ";
ddepoke "part", "15";
ddepoke "newcontrol", "okcancel,Ok";
call MakeDialog;
$Ok = dderequest("getstring Ok");
if($Ok == "0") goto macro_end;
$Picture = dderequest("getstring Picture");
$X = dderequest("getstring X");
$Y = dderequest("getstring Y");
$W = dderequest("getstring W");
$H = dderequest("getstring H");
$NPicture= dderequest("getstring NPicture");
$NX = dderequest("getstring NX");
$NY = dderequest("getstring NY");
$Cmd = "ReversePic(" +$Picture+ "," +$X+ "," +$Y+ "," +$W+ "," +$H+ "," +$NPicture+ "," +$NX+ "," +$NY+ ");";
insert $Cmd;
goto macro_end;
ddeexecute "exit";
//関数の挿入
InsFunc:
//第1引数 str 関数名
//第2引数 str 関数の引数のタイプ
// (0=なし、1=数値型、2=文字列型、3=配列変数)
if(##2 == 0){
escape;
insert $$1 + "();";
return;
}
#Select = selecting;
$SText = "";
if(#Select == 1){
#STopX = seltopx;
#STopY = seltopy;
#SEndX = selendx;
#SEndY = selendy;
$SText = gettext(#STopX,#STopY,#SEndX,#SEndY);
#SLength = strlen($SText);
moveto #STopX,#STopY;
beginsel;
right #SLength;
delete;
}
if(##2 == 1){
insertfix $$1 + "(" + $SText + ");";
if($SText == ""){
gowordend;
right;
}
}
else if(##2 == 2){
insertfix $$1 + "(\"" + $SText + "\");";
if($SText == ""){
gowordend;
right 2;
}
}
else if(##2 == 3){
if(rightstr($SText,2) != "[]") $SText = $SText + "[]";
insertfix $$1 + "(\"" + $SText + "\");";
if($SText == ""){
gowordend;
right;
}
}
return;
//ダイアログボックス関連サブルーチン
MacSrvInit:
run "macserv.exe /h";
ddeinitiate "HideMacroServer", "DlgService";
if( !result ) {
message "ddeinitiate failed";
endmacro;
}
ddeexecute "setcurdir " + directory;
return;
MakeDialog:
#hwnd = hidemaruhandle(0);
ddeexecute "dialog " + str(#hwnd);
$$a = "";
ddestartadvice "dlgresult", $$a;
while( strlen($$a) == 0 ) {
ddewaitadvice $$a, 100;
}
ddestopadvice "dlgresult";
ddeexecute "enddialog";
return $$a;