home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sams Cobol 24 Hours
/
Sams_Cobol_24_Hours.iso
/
Cobol32
/
PowerGEM
/
Powergem.z
/
vbbld32.scp
< prev
Wrap
Text File
|
1996-09-23
|
5KB
|
194 lines
//******************************************************************
//
// Script for Visual Basic
//
// ALL Rights Reserved, CopyRight (C) FUJITSU LIMITED 1995
//******************************************************************
public :
var tool ;
var ToolClass = "BUILD";
var Str_Filespec = 0;
var Com_Filespec = 0;
var Com_Term = 0 ;
var MsgTitle = "VBBUILD.SCP";
var msg1 = "Specifed file in uses";
exec() {
var Filespec ;
MessageOpen(ToolClass) ;
Filespec = MakeFilespec("*", 0) ;
Str_Filespec = Filespec ;
MakeEvent("R", ToolClass, "BUILD-TARGET", Filespec, "start") ;
}
start() {
var Get_MessageID ;
var Make_MessageID;
var Filespec ;
var PathName ;
var FileName ;
var CommandLine ;
var SenderToolClass ;
var MessageType ;
var ToolClassName ;
var CommandName ;
var Data ;
var Originator ;
Get_MessageID = GetMessageID();
Make_MessageID = MakeMessageID();
Filespec = GetFilespec();
if(Com_Filespec == Filespec){
MessageBox(msg1,MsgTitle,0);
MessageSend(Get_MessageID, "F", ToolClass, "START", Filespec) ;
return(1);
}
Com_Filespec = Filespec ;
SenderToolClass = GetSenderToolClass() ;
MessageType = GetMessageType() ;
ToolClassName = GetToolClass() ;
CommandName = GetCommand() ;
Data = GetData(2) ;
Originator = GetOriginator();
DeleteEvent("R", ToolClass, "BUILD-TARGET", Str_Filespec) ;
MakeEvent("R", ToolClass, "BUILD-TARGET", Filespec, "start") ;
MakeEvent("R", ToolClass, "STOP" , Filespec, "stop" ) ;
MakeEvent("R", ToolClass, "MAXIMIZE" , Filespec, "maximize" ) ;
MakeEvent("R", ToolClass, "MINIMIZE" , Filespec, "minimize" ) ;
MakeEvent("R", ToolClass, "NORMALIZE", Filespec, "normalize" ) ;
PathName = FilespecToPathName(Filespec) ;
CommandLine = cat("/make ","\"",PathName,"\\",Data,"\"");
tool = ToolExecEX("VB32.EXE",CommandLine,TRUE);
if( IsNULL(tool) ) {
MessageSend(Get_MessageID, "F", ToolClass, "BUILD-TARGET" ,
Filespec);
MessageSend(Make_MessageID, "N", ToolClass, "STATUS",
Filespec, "NOTRUNNING") ;
del_event();
Com_Term = 1 ;
MessageClose();
Close();
return(0);
}
MessageSend(Make_MessageID, "N", ToolClass, "STATUS",
Filespec, "STARTING") ;
MessageSend(Make_MessageID, "N", ToolClass, "STATUS",
Filespec, "READY") ;
MessageSend(Get_MessageID, "N", ToolClass, "BUILD-TARGET",
Filespec,GetData(1),GetData(2),GetData(3)) ;
MessageSend(Get_MessageID, "N", ToolClass, "BUILD-REQUEST-COMPLETE",
Filespec,GetData(1),"SUCCESS") ;
}
stop() {
var Filespec ;
var Get_MessageID;
var Make_MessageID;
var ToolID ;
MFtree();
SCRIPT.ErrorDisplay = False ;
ToolID = closewindow(tool);
SCRIPT.ErrorDisplay = True ;
Get_MessageID = GetMessageID();
Make_MessageID = MakeMessageID();
Filespec = GetFilespec();
MessageSend(Make_MessageID, "N", ToolClass, "STATUS",
Filespec, "NOTRUNNING") ;
MessageSend(Get_MessageID, "N", ToolClass, "STOP",
Filespec) ;
Com_Term = 1 ;
del_event() ;
MessageClose();
Close();
}
maximize() {
var MessageID ;
var Filespec ;
MaximizeWindow(tool) ;
MessageID = GetMessageID();
Filespec = GetFilespec();
MessageSend(MessageID, "N", ToolClass, "MAXIMIZE",
Filespec);
}
minimize() {
var MessageID ;
var Filespec ;
MinimizeWindow(tool) ;
MessageID = GetMessageID();
Filespec = GetFilespec();
MessageSend(MessageID, "N", ToolClass, "MINIMIZE",
Filespec);
}
normalize() {
var MessageID ;
var Filespec ;
RestoreWindow(tool) ;
MessageID = GetMessageID();
Filespec = GetFilespec();
MessageSend(MessageID, "N", ToolClass, "NORMALIZE",
Filespec);
}
Terminate() {
var ToolID ;
var Make_MessageID ;
if(Com_Term != 0) {
Return(0);
}
MFtree();
SCRIPT.ErrorDisplay = False ;
ToolID = closewindow(tool);
SCRIPT.ErrorDisplay = True ;
Make_MessageID = MakeMessageID();
MessageSend(Make_MessageID, "N", ToolClass, "STATUS",
Com_Filespec, "NOTRUNNING") ;
MessageSend(Make_MessageID, "N", ToolClass, "STOP",
Com_Filespec) ;
Com_Term = 1 ;
del_event() ;
MessageClose();
Close() ;
}
MFtree() {
var Make_MessageID ;
if(Com_Filespec == 0)
return;
Make_MessageID = MakeMessageID();
MessageSend(Make_MessageID, "N", "*", "MODIFIED-FILETREE",
Com_Filespec, "M") ;
}
del_event() {
DeleteEvent("R", ToolClass, "BUILD-TARGET", Com_Filespec) ;
DeleteEvent("R", ToolClass, "STOP" , Com_Filespec) ;
DeleteEvent("R", ToolClass, "MAXIMIZE" , Com_Filespec) ;
DeleteEvent("R", ToolClass, "MINIMIZE" , Com_Filespec) ;
DeleteEvent("R", ToolClass, "NORMALIZE", Com_Filespec) ;
}