From 15e24961ce08c9b334d4b8c1a139d01bec4459f5 Mon Sep 17 00:00:00 2001 From: thetourist Date: Tue, 24 Jul 2007 07:38:59 +0000 Subject: [PATCH] PseuWoWConsole 1.0.0 by TheTourist. This app is a wrapper for PseuWow. What it does is open a port on 8095 on the machine, and anything written to this port will treated as if you inputted it in the console. Sorry it took me so long to add this. --- .../PseuWoWConsole/PseuWoWConsole ReadMe.txt | 27 + .../PseuWoWConsole/src/PseuWoWConsole.cfg | 40 ++ .../PseuWoWConsole/src/PseuWoWConsole.dof | 583 ++++++++++++++++++ .../PseuWoWConsole/src/PseuWoWConsole.dpr | 16 + .../PseuWoWConsole/src/PseuWoWConsole.res | Bin 0 -> 4032 bytes .../PseuWoWConsole/src/PseuWoWConsole.~dpr | 15 + .../PseuWoWConsole/src/RedirectConsole.dcu | Bin 0 -> 3565 bytes .../PseuWoWConsole/src/RedirectConsole.pas | 144 +++++ src/tools/PseuWoWConsole/src/Unit1.dcu | Bin 0 -> 7358 bytes src/tools/PseuWoWConsole/src/Unit1.ddp | Bin 0 -> 51 bytes src/tools/PseuWoWConsole/src/Unit1.~dfm | 92 +++ src/tools/PseuWoWConsole/src/Unit1.~pas | 66 ++ src/tools/PseuWoWConsole/src/fMain.dcu | Bin 0 -> 11358 bytes src/tools/PseuWoWConsole/src/fMain.ddp | Bin 0 -> 51 bytes src/tools/PseuWoWConsole/src/fMain.dfm | 144 +++++ src/tools/PseuWoWConsole/src/fMain.pas | 272 ++++++++ src/tools/PseuWoWConsole/src/fMain.~ddp | Bin 0 -> 51 bytes src/tools/PseuWoWConsole/src/fMain.~dfm | 144 +++++ src/tools/PseuWoWConsole/src/fMain.~pas | 272 ++++++++ src/tools/PseuWoWConsole/src/logfile.txt | 48 ++ 20 files changed, 1863 insertions(+) create mode 100644 src/tools/PseuWoWConsole/PseuWoWConsole ReadMe.txt create mode 100644 src/tools/PseuWoWConsole/src/PseuWoWConsole.cfg create mode 100644 src/tools/PseuWoWConsole/src/PseuWoWConsole.dof create mode 100644 src/tools/PseuWoWConsole/src/PseuWoWConsole.dpr create mode 100644 src/tools/PseuWoWConsole/src/PseuWoWConsole.res create mode 100644 src/tools/PseuWoWConsole/src/PseuWoWConsole.~dpr create mode 100644 src/tools/PseuWoWConsole/src/RedirectConsole.dcu create mode 100644 src/tools/PseuWoWConsole/src/RedirectConsole.pas create mode 100644 src/tools/PseuWoWConsole/src/Unit1.dcu create mode 100644 src/tools/PseuWoWConsole/src/Unit1.ddp create mode 100644 src/tools/PseuWoWConsole/src/Unit1.~dfm create mode 100644 src/tools/PseuWoWConsole/src/Unit1.~pas create mode 100644 src/tools/PseuWoWConsole/src/fMain.dcu create mode 100644 src/tools/PseuWoWConsole/src/fMain.ddp create mode 100644 src/tools/PseuWoWConsole/src/fMain.dfm create mode 100644 src/tools/PseuWoWConsole/src/fMain.pas create mode 100644 src/tools/PseuWoWConsole/src/fMain.~ddp create mode 100644 src/tools/PseuWoWConsole/src/fMain.~dfm create mode 100644 src/tools/PseuWoWConsole/src/fMain.~pas create mode 100644 src/tools/PseuWoWConsole/src/logfile.txt diff --git a/src/tools/PseuWoWConsole/PseuWoWConsole ReadMe.txt b/src/tools/PseuWoWConsole/PseuWoWConsole ReadMe.txt new file mode 100644 index 0000000..d3bf6e6 --- /dev/null +++ b/src/tools/PseuWoWConsole/PseuWoWConsole ReadMe.txt @@ -0,0 +1,27 @@ +======================================================= +PseuWoWConsole - Version 1.0.0 +======================================================= +"What ain't no country I ever heard of! They speak English in What? " + +======================================================= +Greetings from TheTourist +======================================================= + +This app is a wrapper for PseuWow. +What it does is open a port on 8095 on the machine, and anything written to this port will treated as if you inputted it in the console. + +Try this from HyperTerm: +SAY Hello Bitches +to port 8095, your Bot will say +Hello Bitches! + +Thus from code, script or external app you can make calls to your bot. + +======================================================= +Code +======================================================= + +I can't profess to be a trained developer, I am entirely self taught. So any advice or corrections are welcome. Code was written in Delphi 6 with the JEDI VCL suite installed. Feel Free to modify and share as needed. + +This is all released under the GNU General Public License, which you review at: http://www.gnu.org/copyleft/gpl.html +As I feel it's better to share, we all get along better that way. \ No newline at end of file diff --git a/src/tools/PseuWoWConsole/src/PseuWoWConsole.cfg b/src/tools/PseuWoWConsole/src/PseuWoWConsole.cfg new file mode 100644 index 0000000..d1ab8d2 --- /dev/null +++ b/src/tools/PseuWoWConsole/src/PseuWoWConsole.cfg @@ -0,0 +1,40 @@ +-$A8 +-$B- +-$C+ +-$D+ +-$E- +-$F- +-$G+ +-$H+ +-$I+ +-$J+ +-$K- +-$L+ +-$M- +-$N+ +-$O+ +-$P+ +-$Q- +-$R- +-$S- +-$T- +-$U- +-$V+ +-$W- +-$X+ +-$YD +-$Z1 +-cg +-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +-H+ +-W+ +-M +-$M16384,1048576 +-K$00400000 +-E"F:\ttWoWEmu\pseuwow\" +-LE"c:\program files\borland\delphi6\Projects\Bpl" +-LN"c:\program files\borland\delphi6\Projects\Bpl" +-U"E:\Coding\Delphi\rutinas\fastlib" +-O"E:\Coding\Delphi\rutinas\fastlib" +-I"E:\Coding\Delphi\rutinas\fastlib" +-R"E:\Coding\Delphi\rutinas\fastlib" diff --git a/src/tools/PseuWoWConsole/src/PseuWoWConsole.dof b/src/tools/PseuWoWConsole/src/PseuWoWConsole.dof new file mode 100644 index 0000000..2ceb635 --- /dev/null +++ b/src/tools/PseuWoWConsole/src/PseuWoWConsole.dof @@ -0,0 +1,583 @@ +[FileVersion] +Version=6.0 +[Compiler] +A=8 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=1 +K=0 +L=1 +M=0 +N=1 +O=1 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=1 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription= +[Directories] +OutputDir=F:\ttWoWEmu\pseuwow\ +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath=E:\Coding\Delphi\rutinas\fastlib +Packages=Vcl50;Vclx50;VclSmp50;Vcldb50;vclado50;ibevnt50;Vclbde50;vcldbx50;Qrpt50;TeeUI50;TeeDB50;Tee50;Dss50;TeeQR50;VCLIB50;Vclmid50;vclie50;Inetdb50;Inet50;NMFast50;webmid50;dclocx50;dclaxserver50 +Conditionals= +DebugSourceDirs= +UsePackages=0 +[Parameters] +RunParams= +HostApplication= +Launcher= +UseLauncher=0 +DebugCWD= +[Language] +ActiveLang= +ProjectLang=$00000C0A +RootDir= +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=3082 +CodePage=1252 +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= +[Excluded Packages] +c:\program files\borland\delphi6\Bin\dclsoap60.bpl=Borland SOAP Components +c:\program files\borland\delphi6\Projects\Bpl\ThirdParty2000.bpl=3rd Party Components +c:\program files\borland\delphi6\Projects\Bpl\SweetControls6.bpl=CA SweetControls +[HistoryLists\hlUnitAliases] +Count=1 +Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +[HistoryLists\hlSearchPath] +Count=1 +Item0=E:\Coding\Delphi\rutinas\fastlib +[HistoryLists\hlOutputDirectorry] +Count=1 +Item0=F:\ttWoWEmu\pseuwow\ +[Exception Log] +EurekaLog Version=6003 +Activate=0 +Activate Handle=1 +Save Log File=1 +Foreground Tab=0 +Freeze Activate=0 +Freeze Timeout=0 +SMTP From=eurekalog@email.com +SMTP Host= +SMTP Port=25 +SMTP UserID= +SMTP Password= +Append to Log=0 +TerminateBtn Operation=2 +Errors Number=32 +Errors Terminate=3 +Email Address= +Email Object= +Email Send Options=0 +Output Path= +Encrypt Password= +AutoCloseDialogSecs=0 +WebSendMode=0 +SupportULR= +HTMLLayout Count=15 +HTMLLine0="%3Chtml%3E" +HTMLLine1=" %3Chead%3E" +HTMLLine2=" %3C/head%3E" +HTMLLine3=" %3Cbody TopMargin=10 LeftMargin=10%3E" +HTMLLine4=" %3Ctable width="100%%" border="0"%3E" +HTMLLine5=" %3Ctr%3E" +HTMLLine6=" %3Ctd nowrap%3E" +HTMLLine7=" %3Cfont face="Lucida Console, Courier" size="2"%3E" +HTMLLine8=" %3C%%HTML_TAG%%%3E" +HTMLLine9=" %3C/font%3E" +HTMLLine10=" %3C/td%3E" +HTMLLine11=" %3C/tr%3E" +HTMLLine12=" %3C/table%3E" +HTMLLine13=" %3C/body%3E" +HTMLLine14="%3C/html%3E" +AutoCrashOperation=2 +AutoCrashNumber=10 +AutoCrashMinutes=1 +WebURL= +WebUserID= +WebPassword= +WebPort=0 +AttachedFiles= +ProxyURL= +ProxyUser= +ProxyPassword= +ProxyPort=8080 +TrakerUser= +TrakerPassword= +TrakerAssignTo= +TrakerProject= +TrakerCategory= +TrakerTrialID= +ZipPassword= +PreBuildEvent= +PostSuccessfulBuildEvent= +PostFailureBuildEvent= +ExceptionDialogType=2 +Count=0 +EMail Message Line Count=0 +loNoDuplicateErrors=0 +loAppendReproduceText=0 +loDeleteLogAtVersionChange=0 +loAddComputerNameInLogFileName=0 +loSaveModulesAndProcessesSections=1 +loSaveAssemblerAndCPUSections=1 +soAppStartDate=1 +soAppName=1 +soAppVersionNumber=1 +soAppParameters=1 +soAppCompilationDate=1 +soAppUpTime=1 +soExcDate=1 +soExcAddress=1 +soExcModuleName=1 +soExcModuleVersion=1 +soExcType=1 +soExcMessage=1 +soExcID=1 +soExcCount=1 +soExcStatus=1 +soExcNote=1 +soUserID=1 +soUserName=1 +soUserEmail=1 +soUserPrivileges=1 +soUserCompany=1 +soActCtlsFormClass=1 +soActCtlsFormText=1 +soActCtlsControlClass=1 +soActCtlsControlText=1 +soCmpName=1 +soCmpTotalMemory=1 +soCmpFreeMemory=1 +soCmpTotalDisk=1 +soCmpFreeDisk=1 +soCmpSysUpTime=1 +soCmpProcessor=1 +soCmpDisplayMode=1 +soCmpDisplayDPI=1 +soCmpVideoCard=1 +soCmpPrinter=1 +soOSType=1 +soOSBuildN=1 +soOSUpdate=1 +soOSLanguage=1 +soOSCharset=1 +soNetIP=1 +soNetSubmask=1 +soNetGateway=1 +soNetDNS1=1 +soNetDNS2=1 +soNetDHCP=1 +soCustomData=1 +sndShowSendDialog=1 +sndShowSuccessFailureMsg=0 +sndSendEntireLog=0 +sndSendXMLLogCopy=0 +sndSendScreenshot=1 +sndUseOnlyActiveWindow=0 +sndSendLastHTMLPage=1 +sndSendInSeparatedThread=0 +sndAddDateInFileName=0 +sndAddComputerNameInFileName=0 +edoSendErrorReportChecked=1 +edoAttachScreenshotChecked=1 +edoShowCopyToClipOption=1 +edoShowDetailsButton=1 +edoShowInDetailedMode=0 +edoShowInTopMostMode=0 +edoUseEurekaLogLookAndFeel=0 +edoShowSendErrorReportOption=1 +edoShowAttachScreenshotOption=1 +edoShowCustomButton=0 +csoShowDLLs=1 +csoShowBPLs=1 +csoShowBorlandThreads=1 +csoShowWindowsThreads=1 +csoDoNotStoreProcNames=0 +boPauseBorlandThreads=0 +boDoNotPauseMainThread=0 +boPauseWindowsThreads=0 +boUseMainModuleOptions=1 +boCopyLogInCaseOfError=1 +boSaveCompressedCopyInCaseOfError=0 +boHandleSafeCallExceptions=0 +boCallRTLExceptionEvent=0 +boCatchHandledExceptions=0 +loCatchLeaks=0 +loGroupsSonLeaks=1 +loHideBorlandLeaks=1 +loFreeAllLeaks=1 +loCatchLeaksExceptions=1 +cfoReduceFileSize=1 +cfoCheckFileCorruption=0 +Count mtInformationMsgCaption=1 +mtInformationMsgCaption0="Information." +Count mtQuestionMsgCaption=1 +mtQuestionMsgCaption0="Question." +Count mtErrorMsgCaption=1 +mtErrorMsgCaption0="Error." +Count mtDialog_Caption=1 +mtDialog_Caption0="Error occurred" +Count mtDialog_ErrorMsgCaption=2 +mtDialog_ErrorMsgCaption0="An error has occurred during program execution." +mtDialog_ErrorMsgCaption1="Please read the following information for further details." +Count mtDialog_GeneralCaption=1 +mtDialog_GeneralCaption0="General" +Count mtDialog_GeneralHeader=1 +mtDialog_GeneralHeader0="General Information" +Count mtDialog_CallStackCaption=1 +mtDialog_CallStackCaption0="Call Stack" +Count mtDialog_CallStackHeader=1 +mtDialog_CallStackHeader0="Call Stack Information" +Count mtDialog_ModulesCaption=1 +mtDialog_ModulesCaption0="Modules" +Count mtDialog_ModulesHeader=1 +mtDialog_ModulesHeader0="Modules Information" +Count mtDialog_ProcessesCaption=1 +mtDialog_ProcessesCaption0="Processes" +Count mtDialog_ProcessesHeader=1 +mtDialog_ProcessesHeader0="Processes Information" +Count mtDialog_AsmCaption=1 +mtDialog_AsmCaption0="Assembler" +Count mtDialog_AsmHeader=1 +mtDialog_AsmHeader0="Assembler Information" +Count mtDialog_CPUCaption=1 +mtDialog_CPUCaption0="CPU" +Count mtDialog_CPUHeader=1 +mtDialog_CPUHeader0="CPU Information" +Count mtDialog_OKButtonCaption=1 +mtDialog_OKButtonCaption0="%26OK" +Count mtDialog_TerminateButtonCaption=1 +mtDialog_TerminateButtonCaption0="%26Terminate" +Count mtDialog_RestartButtonCaption=1 +mtDialog_RestartButtonCaption0="%26Restart" +Count mtDialog_DetailsButtonCaption=1 +mtDialog_DetailsButtonCaption0="%26Details" +Count mtDialog_CustomButtonCaption=1 +mtDialog_CustomButtonCaption0="%26Help" +Count mtDialog_SendMessage=1 +mtDialog_SendMessage0="%26Send this error via Internet" +Count mtDialog_ScreenshotMessage=1 +mtDialog_ScreenshotMessage0="%26Attach a Screenshot image" +Count mtDialog_CopyMessage=1 +mtDialog_CopyMessage0="%26Copy to Clipboard" +Count mtDialog_SupportMessage=1 +mtDialog_SupportMessage0="Go to the Support Page" +Count mtMSDialog_ErrorMsgCaption=1 +mtMSDialog_ErrorMsgCaption0="The application has encountered a problem. We are sorry for the inconvenience." +Count mtMSDialog_RestartCaption=1 +mtMSDialog_RestartCaption0="Restart application." +Count mtMSDialog_TerminateCaption=1 +mtMSDialog_TerminateCaption0="Terminate application." +Count mtMSDialog_PleaseCaption=1 +mtMSDialog_PleaseCaption0="Please tell us about this problem." +Count mtMSDialog_DescriptionCaption=1 +mtMSDialog_DescriptionCaption0="We have created an error report that you can send to us. We will treat this report as confidential and anonymous." +Count mtMSDialog_SeeDetailsCaption=1 +mtMSDialog_SeeDetailsCaption0="To see what data the error report contains," +Count mtMSDialog_SeeClickCaption=1 +mtMSDialog_SeeClickCaption0="click here." +Count mtMSDialog_HowToReproduceCaption=1 +mtMSDialog_HowToReproduceCaption0="What were you doing when the problem happended (optional)?" +Count mtMSDialog_EmailCaption=1 +mtMSDialog_EmailCaption0="Email address (optional):" +Count mtMSDialog_SendButtonCaption=1 +mtMSDialog_SendButtonCaption0="%26Send Error Report" +Count mtMSDialog_NoSendButtonCaption=1 +mtMSDialog_NoSendButtonCaption0="%26Don't Send" +Count mtLog_AppHeader=1 +mtLog_AppHeader0="Application" +Count mtLog_AppStartDate=1 +mtLog_AppStartDate0="Start Date" +Count mtLog_AppName=1 +mtLog_AppName0="Name/Description" +Count mtLog_AppVersionNumber=1 +mtLog_AppVersionNumber0="Version Number" +Count mtLog_AppParameters=1 +mtLog_AppParameters0="Parameters" +Count mtLog_AppCompilationDate=1 +mtLog_AppCompilationDate0="Compilation Date" +Count mtLog_AppUpTime=1 +mtLog_AppUpTime0="Up Time" +Count mtLog_ExcHeader=1 +mtLog_ExcHeader0="Exception" +Count mtLog_ExcDate=1 +mtLog_ExcDate0="Date" +Count mtLog_ExcAddress=1 +mtLog_ExcAddress0="Address" +Count mtLog_ExcModuleName=1 +mtLog_ExcModuleName0="Module Name" +Count mtLog_ExcModuleVersion=1 +mtLog_ExcModuleVersion0="Module Version" +Count mtLog_ExcType=1 +mtLog_ExcType0="Type" +Count mtLog_ExcMessage=1 +mtLog_ExcMessage0="Message" +Count mtLog_ExcID=1 +mtLog_ExcID0="ID" +Count mtLog_ExcCount=1 +mtLog_ExcCount0="Count" +Count mtLog_ExcStatus=1 +mtLog_ExcStatus0="Status" +Count mtLog_ExcNote=1 +mtLog_ExcNote0="Note" +Count mtLog_UserHeader=1 +mtLog_UserHeader0="User" +Count mtLog_UserID=1 +mtLog_UserID0="ID" +Count mtLog_UserName=1 +mtLog_UserName0="Name" +Count mtLog_UserEmail=1 +mtLog_UserEmail0="Email" +Count mtLog_UserCompany=1 +mtLog_UserCompany0="Company" +Count mtLog_UserPrivileges=1 +mtLog_UserPrivileges0="Privileges" +Count mtLog_ActCtrlsHeader=1 +mtLog_ActCtrlsHeader0="Active Controls" +Count mtLog_ActCtrlsFormClass=1 +mtLog_ActCtrlsFormClass0="Form Class" +Count mtLog_ActCtrlsFormText=1 +mtLog_ActCtrlsFormText0="Form Text" +Count mtLog_ActCtrlsControlClass=1 +mtLog_ActCtrlsControlClass0="Control Class" +Count mtLog_ActCtrlsControlText=1 +mtLog_ActCtrlsControlText0="Control Text" +Count mtLog_CmpHeader=1 +mtLog_CmpHeader0="Computer" +Count mtLog_CmpName=1 +mtLog_CmpName0="Name" +Count mtLog_CmpTotalMemory=1 +mtLog_CmpTotalMemory0="Total Memory" +Count mtLog_CmpFreeMemory=1 +mtLog_CmpFreeMemory0="Free Memory" +Count mtLog_CmpTotalDisk=1 +mtLog_CmpTotalDisk0="Total Disk" +Count mtLog_CmpFreeDisk=1 +mtLog_CmpFreeDisk0="Free Disk" +Count mtLog_CmpSystemUpTime=1 +mtLog_CmpSystemUpTime0="System Up Time" +Count mtLog_CmpProcessor=1 +mtLog_CmpProcessor0="Processor" +Count mtLog_CmpDisplayMode=1 +mtLog_CmpDisplayMode0="Display Mode" +Count mtLog_CmpDisplayDPI=1 +mtLog_CmpDisplayDPI0="Display DPI" +Count mtLog_CmpVideoCard=1 +mtLog_CmpVideoCard0="Video Card" +Count mtLog_CmpPrinter=1 +mtLog_CmpPrinter0="Printer" +Count mtLog_OSHeader=1 +mtLog_OSHeader0="Operating System" +Count mtLog_OSType=1 +mtLog_OSType0="Type" +Count mtLog_OSBuildN=1 +mtLog_OSBuildN0="Build #" +Count mtLog_OSUpdate=1 +mtLog_OSUpdate0="Update" +Count mtLog_OSLanguage=1 +mtLog_OSLanguage0="Language" +Count mtLog_OSCharset=1 +mtLog_OSCharset0="Charset" +Count mtLog_NetHeader=1 +mtLog_NetHeader0="Network" +Count mtLog_NetIP=1 +mtLog_NetIP0="IP Address" +Count mtLog_NetSubmask=1 +mtLog_NetSubmask0="Submask" +Count mtLog_NetGateway=1 +mtLog_NetGateway0="Gateway" +Count mtLog_NetDNS1=1 +mtLog_NetDNS10="DNS 1" +Count mtLog_NetDNS2=1 +mtLog_NetDNS20="DNS 2" +Count mtLog_NetDHCP=1 +mtLog_NetDHCP0="DHCP" +Count mtLog_CustInfoHeader=1 +mtLog_CustInfoHeader0="Custom Information" +Count mtCallStack_Address=1 +mtCallStack_Address0="Address" +Count mtCallStack_Name=1 +mtCallStack_Name0="Module" +Count mtCallStack_Unit=1 +mtCallStack_Unit0="Unit" +Count mtCallStack_Class=1 +mtCallStack_Class0="Class" +Count mtCallStack_Procedure=1 +mtCallStack_Procedure0="Procedure/Method" +Count mtCallStack_Line=1 +mtCallStack_Line0="Line" +Count mtCallStack_MainThread=1 +mtCallStack_MainThread0="Main" +Count mtCallStack_ExceptionThread=1 +mtCallStack_ExceptionThread0="Exception Thread" +Count mtCallStack_RunningThread=1 +mtCallStack_RunningThread0="Running Thread" +Count mtCallStack_CallingThread=1 +mtCallStack_CallingThread0="Calling Thread" +Count mtCallStack_ThreadID=1 +mtCallStack_ThreadID0="ID" +Count mtCallStack_ThreadPriority=1 +mtCallStack_ThreadPriority0="Priority" +Count mtCallStack_ThreadClass=1 +mtCallStack_ThreadClass0="Class" +Count mtCallStack_LeakCaption=1 +mtCallStack_LeakCaption0="Memory Leak" +Count mtCallStack_LeakData=1 +mtCallStack_LeakData0="Data" +Count mtCallStack_LeakType=1 +mtCallStack_LeakType0="Type" +Count mtCallStack_LeakSize=1 +mtCallStack_LeakSize0="Total size" +Count mtCallStack_LeakCount=1 +mtCallStack_LeakCount0="Count" +Count mtSendDialog_Caption=1 +mtSendDialog_Caption0="Send." +Count mtSendDialog_Message=1 +mtSendDialog_Message0="Message" +Count mtSendDialog_Resolving=1 +mtSendDialog_Resolving0="Resolving DNS..." +Count mtSendDialog_Login=1 +mtSendDialog_Login0="Login..." +Count mtSendDialog_Connecting=1 +mtSendDialog_Connecting0="Connecting with server..." +Count mtSendDialog_Connected=1 +mtSendDialog_Connected0="Connected with server." +Count mtSendDialog_Sending=1 +mtSendDialog_Sending0="Sending message..." +Count mtSendDialog_Sent=1 +mtSendDialog_Sent0="Message sent." +Count mtSendDialog_SelectProject=1 +mtSendDialog_SelectProject0="Select project..." +Count mtSendDialog_Searching=1 +mtSendDialog_Searching0="Searching..." +Count mtSendDialog_Modifying=1 +mtSendDialog_Modifying0="Modifying..." +Count mtSendDialog_Disconnecting=1 +mtSendDialog_Disconnecting0="Disconnecting..." +Count mtSendDialog_Disconnected=1 +mtSendDialog_Disconnected0="Disconnected." +Count mtReproduceDialog_Caption=1 +mtReproduceDialog_Caption0="Request" +Count mtReproduceDialog_Request=1 +mtReproduceDialog_Request0="Please describe the steps to reproduce the error:" +Count mtReproduceDialog_OKButtonCaption=1 +mtReproduceDialog_OKButtonCaption0="%26OK" +Count mtModules_Handle=1 +mtModules_Handle0="Handle" +Count mtModules_Name=1 +mtModules_Name0="Name" +Count mtModules_Description=1 +mtModules_Description0="Description" +Count mtModules_Version=1 +mtModules_Version0="Version" +Count mtModules_Size=1 +mtModules_Size0="Size" +Count mtModules_LastModified=1 +mtModules_LastModified0="Modified" +Count mtModules_Path=1 +mtModules_Path0="Path" +Count mtProcesses_ID=1 +mtProcesses_ID0="ID" +Count mtProcesses_Name=1 +mtProcesses_Name0="Name" +Count mtProcesses_Description=1 +mtProcesses_Description0="Description" +Count mtProcesses_Version=1 +mtProcesses_Version0="Version" +Count mtProcesses_Memory=1 +mtProcesses_Memory0="Memory" +Count mtProcesses_Priority=1 +mtProcesses_Priority0="Priority" +Count mtProcesses_Threads=1 +mtProcesses_Threads0="Threads" +Count mtProcesses_Path=1 +mtProcesses_Path0="Path" +Count mtCPU_Registers=1 +mtCPU_Registers0="Registers" +Count mtCPU_Stack=1 +mtCPU_Stack0="Stack" +Count mtCPU_MemoryDump=1 +mtCPU_MemoryDump0="Memory Dump" +Count mtSend_SuccessMsg=1 +mtSend_SuccessMsg0="The message was sent successfully." +Count mtSend_FailureMsg=1 +mtSend_FailureMsg0="Sorry, sending the message didn't work." +Count mtSend_BugClosedMsg=2 +mtSend_BugClosedMsg0="These BUG is just closed." +mtSend_BugClosedMsg1="Contact the program support to obtain an update." +Count mtSend_UnknownErrorMsg=1 +mtSend_UnknownErrorMsg0="Unknown error." +Count mtSend_InvalidLoginMsg=1 +mtSend_InvalidLoginMsg0="Invalid login request." +Count mtSend_InvalidSearchMsg=1 +mtSend_InvalidSearchMsg0="Invalid search request." +Count mtSend_InvalidSelectionMsg=1 +mtSend_InvalidSelectionMsg0="Invalid selection request." +Count mtSend_InvalidInsertMsg=1 +mtSend_InvalidInsertMsg0="Invalid insert request." +Count mtSend_InvalidModifyMsg=1 +mtSend_InvalidModifyMsg0="Invalid modify request." +Count mtFileCrackedMsg=2 +mtFileCrackedMsg0="This file is cracked." +mtFileCrackedMsg1="The application will be closed." +Count mtException_LeakMultiFree=1 +mtException_LeakMultiFree0="Multi Free memory leak." +Count mtException_LeakMemoryOverrun=1 +mtException_LeakMemoryOverrun0="Memory Overrun leak." +Count mtException_AntiFreeze=1 +mtException_AntiFreeze0="The application seems to be frozen." +Count mtInvalidEmailMsg=1 +mtInvalidEmailMsg0="Invalid email." +TextsCollection=English + + diff --git a/src/tools/PseuWoWConsole/src/PseuWoWConsole.dpr b/src/tools/PseuWoWConsole/src/PseuWoWConsole.dpr new file mode 100644 index 0000000..84bcf6d --- /dev/null +++ b/src/tools/PseuWoWConsole/src/PseuWoWConsole.dpr @@ -0,0 +1,16 @@ +program PseuWoWConsole; + +uses + Forms, + fMain in 'fMain.pas' {frmMain}, + RedirectConsole in 'RedirectConsole.pas', + modRichEdit in '..\..\..\Projects\Common\modRichEdit.pas'; + +{$R *.RES} + +begin + Application.Initialize; + Application.Title := 'PseWoW Console'; + Application.CreateForm(TfrmMain, frmMain); + Application.Run; +end. diff --git a/src/tools/PseuWoWConsole/src/PseuWoWConsole.res b/src/tools/PseuWoWConsole/src/PseuWoWConsole.res new file mode 100644 index 0000000000000000000000000000000000000000..291c4d178f82c2623edf905d0e412a7514a79559 GIT binary patch literal 4032 zcmb`Kzi(Vc5Xa{d7Z6$Iq);Ga$){6-5CuA<^neIaECE3TIYo-dg4jg-a+r#bL5t$yLw8L5z>Gd_VD9Z@3bEAj*%HMCS$O=>f+Yozi4-LP%{udikt!`c;m)dNze_!4DkPhuWO@OL?tN$ z9E5_;CfE2t;7Q&`mdoT!8CyzVTUV4U3b+?X_$g+8B7P@1Z_mo z&;Z`=bEN~^<4-+PirBx4T9U0c3%rQDwj{^)FHSGmsCkWF7Zk0xlGMW1|9% zUD-e+G?sy%z%lU%qxssKSadYf_>7CAA=MTFMH6_uvmuBmA&O!Qj-;5S z0$-hKgBf<%q^0LB*k8`h5Huq+DZWm9NTXS=BPGP1aMsR)bChDwo?|mIgAT(2O3*JQSa>VR9ni*vWpBdSYK6o$1$Fi9M z-d+cP)LJ^kW55wqH&J*N2|pJzyW|wKQiP>Mt^=Q+3qffn9WJD94suXLc6iBBn3}m) z2*h7IV&CD_UOBjza=-tBIZ4 z6+H|t$H)F612G0~0JemS+{4W8e6vMTP4$ahJvXWsN%lOf5e8)(BKsKS@e0Db$lox| z8UHd)7$Zh$1B7kH3FDA4Y7N(&Fx=m3&6utBuAW!FE}U1@ch#%t9D^S>``F&MMf-&D zf!*U-TK&7mzh*kt>*=e;zk)h8ykhxVsS8f|7P=N+JHsotfLgNq_K5jI`wVF@F+56q zcaXjPH1ii>y1y{W(`(>uhEaBsg6X%UxNk$-u_v}^t9FOyx;+MY(^hN?n;(+RfUE{& zIIvs9;1Tsf>!97T4QjZI{nuo@%<6H0x3`i_!Mx4RQ~M%uZNvEl-_5Wc*h^R!+a+vw zupZmIV{gM=M&b83hskym?)6p#ZzTSY*k4V%9_==9dbX?f6`pE}b8PoH7R&Y}ej7Y@ zY%Txm@7A)tmodC*&RgR4)wlwx(WlsMfwoKT!&ZbwEj{n1O*{K`?ysl3RC{Oh8kB$T hZ>N-&Qrsn~@oDl;Qo0Gsa1*a}EbC`+ZT8QZ{{Y!~1rY!M literal 0 HcmV?d00001 diff --git a/src/tools/PseuWoWConsole/src/PseuWoWConsole.~dpr b/src/tools/PseuWoWConsole/src/PseuWoWConsole.~dpr new file mode 100644 index 0000000..5428113 --- /dev/null +++ b/src/tools/PseuWoWConsole/src/PseuWoWConsole.~dpr @@ -0,0 +1,15 @@ +program PseuWoWConsole; + +uses + Forms, + fMain in 'fMain.pas' {frmMain}, + RedirectConsole in 'RedirectConsole.pas'; + +{$R *.RES} + +begin + Application.Initialize; + Application.Title := 'PseWoW Console'; + Application.CreateForm(TfrmMain, frmMain); + Application.Run; +end. diff --git a/src/tools/PseuWoWConsole/src/RedirectConsole.dcu b/src/tools/PseuWoWConsole/src/RedirectConsole.dcu new file mode 100644 index 0000000000000000000000000000000000000000..140f89b202b7727d67508471942eba25b5f80afc GIT binary patch literal 3565 zcma)84NP0t6~6CcgE5Zr9Ku`+p%;%bCZ#k$#xj(l7~2GA#CB|hLz31t_InRAW4nIO zx2z@Hf)+6$nMBC!)-CQV~;DVAR78PR=t~wqNzb2So zK%oN9A<-TUOE)YZJ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RtRdHTzXu9hW%&dw zA1_;)uJkQiLRV#Z8p6>;?$>~CCUtf>v$@o7fM#GX__@?gAjzIQ8BP5ONJ`wM#KLIm z77&?K9MF{uK&#SqXX$f!E0;5A$)rf<(z_O?PD4s`{WKNHb*#$n$x@oRI#%)>gv`=& zb?;BXd5}Z=T1onk(la#RIZDf#E=tQOQsv;ch$Ig}NCmPR1AVjIakY1maK7|X-;Ok* z;^FIHyLPF;*X|IzUe917c@_`-2u!-sv)-8$nUnNKSC?~4Q;A&hn&jm`;V4Rp6f_CQi`=Y zX2ihs0jin4609>aBRZ_t;F4a`+1IYAOW2qX~J8*9WZY;&)Ww?Ip3ca-iA2eZ; z7FU)q{gt@WK-XH1Y-A=`TqT!zPkBMhTre=hTBc8p^+x6bl%P{yQZU1s{7d8GEeJPY zNoB$stc9;mrB$@zCanLwL2bfOL#5&v*5fi+!l?W(Kvf?=bw9x70f5>`q`>vPBY<0*hd|J96rgzw!1X-<_b~$F0I!@NFagl{ z20-sAfP<$2`py9Kp9L6r6JY2qfZ?|RM$QxX34xyycn9F<&k0-rFyjfs2&+P$-b&b@!AV4NOYG7qQHLue_xId literal 0 HcmV?d00001 diff --git a/src/tools/PseuWoWConsole/src/RedirectConsole.pas b/src/tools/PseuWoWConsole/src/RedirectConsole.pas new file mode 100644 index 0000000..cc0270b --- /dev/null +++ b/src/tools/PseuWoWConsole/src/RedirectConsole.pas @@ -0,0 +1,144 @@ +///////////////////////////////////////////////////// +// // +// UNiT REDiRECT CONSOLE by SONiC // +// // +// Console input/output redirection with pipes // +// Last revision: 02/SEPT/02 // +// // +// Bugs/comments to: Sonic1980@msn.com // +// Home page: http://sonic.rulestheweb.com // +// // +// Freeware // +// // +///////////////////////////////////////////////////// + +unit RedirectConsole; + +interface + +const + CRLF=#13#10; + +var + RC_SendBuf: string; + RC_End: Boolean; + RC_ExitCode: Cardinal; + +procedure RC_Run(Command: string); +procedure RC_LineIn(s: string); +var RC_LineOut: procedure(s: string); + +implementation + +uses Windows, Forms; + +procedure RC_LineIn(s: string); +begin + RC_SendBuf:=RC_SendBuf+s+CRLF; +end; // RC_LineIn; + +function IsWinNT: Boolean; +var osv: tOSVERSIONINFO; +begin + osv.dwOSVersionInfoSize:=sizeof(osv); + GetVersionEx(osv); + result:=osv.dwPlatformID=VER_PLATFORM_WIN32_NT; +end; // IsWinNT + +procedure SplitLines(s: string); +var t: string; +begin + while pos(CRLF, s)<>0 do begin + t:=copy(s, 1, pos(CRLF, s)-1); + RC_LineOut(t); + delete(s, 1, pos(CRLF, s)+1); + end; + if length(s)>0 then RC_LineOut(s); +end; // SplitLines + +procedure RC_Run(Command: string); +const bufsize=1024; // 1KByte buffer +var + buf: array [0..bufsize-1] of char; + si: tSTARTUPINFO; + sa: tSECURITYATTRIBUTES; + sd: tSECURITYDESCRIPTOR; + pi: tPROCESSINFORMATION; + newstdin, newstdout, read_stdout, write_stdin: tHandle; + bread, avail: dword; +begin + // Configuraciones de seguridad para WinNT + if IsWinNT then begin + InitializeSecurityDescriptor(@sd, SECURITY_DESCRIPTOR_REVISION); + SetSecurityDescriptorDacl(@sd, true, nil, false); + sa.lpSecurityDescriptor:=@sd; + end else sa.lpSecurityDescriptor:=nil; + // Creamos Pipe A + if not CreatePipe(newstdin, write_stdin, @sa, 0) then begin + RC_LineOut('Error creating Pipe A'); + exit; + end; + // Creamos Pipe B + if not CreatePipe(read_stdout, newstdout, @sa, 0) then begin + RC_LineOut('Error creating Pipe B'); + CloseHandle(newstdin); + CloseHandle(write_stdin); + exit; + end; + // Configuramos si + GetStartupInfo(si); + si.dwFlags:=STARTF_USESTDHANDLES or STARTF_USESHOWWINDOW; + si.wShowWindow:=SW_HIDE; + si.hStdOutput:=newstdout; + si.hStdError:=newstdout; + si.hStdInput:=newstdin; + // Creamos proceso + if not CreateProcess(pchar(command), nil, nil, nil, true, + CREATE_NEW_CONSOLE, nil, nil, si, pi) then begin + RC_LineOut('Error creating process: '+command); + CloseHandle(newstdin); + CloseHandle(newstdout); + CloseHandle(read_stdout); + CloseHandle(write_stdin); + exit; + end; + // Loop principal + fillchar(buf, sizeof(buf), 0); + RC_End:=false; + RC_SendBuf:=''; + repeat + // application.processmessages; + Application.HandleMessage; + GetExitCodeProcess(pi.hProcess, RC_ExitCode); + if (RC_ExitCode<>STILL_ACTIVE) then RC_End:=True; + PeekNamedPipe(read_stdout, @buf, bufsize, @bread, @avail, nil); + // Comprobamos texto de salida + if (bread<>0) then begin + fillchar(buf, bufsize, 0); + if (avail>bufsize) then + while (bread>=bufsize) do begin + ReadFile(read_stdout, buf, bufsize, bread, nil); + SplitLines(buf); + fillchar(buf, bufsize, 0); + end + else begin + ReadFile(read_stdout, buf, bufsize, bread, nil); + SplitLines(buf); + end; + end; + // Comprobamos texto de entrada + while (Length(RC_SendBuf)>0) do begin + WriteFile(write_stdin, RC_SendBuf[1], 1, bread, nil); + Delete(RC_SendBuf, 1, 1); + end; + until RC_End; + // Cerramos las cosas + CloseHandle(pi.hThread); + CloseHandle(pi.hProcess); + CloseHandle(newstdin); + CloseHandle(newstdout); + CloseHandle(read_stdout); + CloseHandle(write_stdin); +end; // RC_Run + +end. diff --git a/src/tools/PseuWoWConsole/src/Unit1.dcu b/src/tools/PseuWoWConsole/src/Unit1.dcu new file mode 100644 index 0000000000000000000000000000000000000000..00b369ace4c381de6376658fb5c02798b6d3a056 GIT binary patch literal 7358 zcmeHLeQ;YLksVoB#tF7#d%UTw#!gCOCS?322SaQeOG?Nme$l&rl_5sgp~R$ z3F4&D9vB>c1KLdHzTh#nKORl|sQ;aR4ORMmA~`9NzIgDMQ1AJN$f1zK-=9vY@#tP9 zrb`E3{KsE~?Vb|kxwrak(8R0f~pSm_=MUURFz55xc99!;rf-1JYym#Kxw&vd4>54ZbC)Lq>PD_@*rgIH&9cOJ$;IV6QOugXdZM(2qCWGLG(xBDWT241nNo> z034Ol5mje*QbB#mI3cxz@nAZYUe$3R0=jDfBX+A{{Wm9Y5JvDFNUN%D87!$niWcoZQ>iKT3@2lr~w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8Zb%|&?uL7ksjW2u z7k)-shp@G&?W7wbBy9m~wQoA@h8W4F4s3baWjBnGv>(UTX3u3ejDdL0U~B8lE?^QR_ZhVEE!us;8R{lPg{Uc?6fb~zF!}9HOSa#dKjn%s^WBJSTSXQyKatmwVgmiVV z9^9QEW_Y@my4iRGNmSp-ws9}}mc3^*tZgaHdN^@(&9ENJ40~wlI2%XpW6VNk0r41XTABsa84Xqa r9Ba2c$G);O$Huoo2;@DB=c^Y`)e=VxFz;K0Pl$;KI)SCUzhlbT}4#=r!G E07AM8lK=n! literal 0 HcmV?d00001 diff --git a/src/tools/PseuWoWConsole/src/Unit1.~dfm b/src/tools/PseuWoWConsole/src/Unit1.~dfm new file mode 100644 index 0000000..6e5794f --- /dev/null +++ b/src/tools/PseuWoWConsole/src/Unit1.~dfm @@ -0,0 +1,92 @@ +object Form1: TForm1 + Left = 268 + Top = 121 + Width = 537 + Height = 364 + Caption = 'Form1' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Fixedsys' + Font.Style = [] + OldCreateOrder = False + OnCreate = FormCreate + PixelsPerInch = 96 + TextHeight = 15 + object Memo1: TMemo + Left = 0 + Top = 73 + Width = 529 + Height = 264 + Align = alClient + Color = clBlack + Font.Charset = DEFAULT_CHARSET + Font.Color = 16744576 + Font.Height = -11 + Font.Name = 'Fixedsys' + Font.Style = [] + ParentFont = False + ScrollBars = ssVertical + TabOrder = 0 + WordWrap = False + end + object Edit2: TEdit + Left = 8 + Top = 304 + Width = 425 + Height = 23 + Color = clBlack + Font.Charset = DEFAULT_CHARSET + Font.Color = 16744576 + Font.Height = -11 + Font.Name = 'Fixedsys' + Font.Style = [] + ParentFont = False + TabOrder = 1 + Text = 'dir *.* /s' + OnKeyPress = Edit2KeyPress + end + object Panel1: TPanel + Left = 0 + Top = 0 + Width = 529 + Height = 73 + Align = alTop + BevelOuter = bvNone + TabOrder = 2 + object Edit1: TEdit + Left = 8 + Top = 10 + Width = 513 + Height = 23 + Color = clBlack + Font.Charset = DEFAULT_CHARSET + Font.Color = 16744576 + Font.Height = -11 + Font.Name = 'Fixedsys' + Font.Style = [] + ParentFont = False + TabOrder = 0 + Text = 'd:\windows\system32\cmd.exe' + end + object Button2: TButton + Left = 8 + Top = 40 + Width = 75 + Height = 25 + Caption = 'RUN' + TabOrder = 1 + OnClick = Button2Click + end + object Button3: TButton + Left = 88 + Top = 40 + Width = 75 + Height = 25 + Caption = 'Exit' + TabOrder = 2 + OnClick = Button3Click + end + end +end diff --git a/src/tools/PseuWoWConsole/src/Unit1.~pas b/src/tools/PseuWoWConsole/src/Unit1.~pas new file mode 100644 index 0000000..26c9b48 --- /dev/null +++ b/src/tools/PseuWoWConsole/src/Unit1.~pas @@ -0,0 +1,66 @@ +unit Unit1; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, RedirectConsole, ExtCtrls; + +type + TForm1 = class(TForm) + Memo1: TMemo; + Edit2: TEdit; + Panel1: TPanel; + Edit1: TEdit; + Button2: TButton; + Button3: TButton; + procedure Button2Click(Sender: TObject); + procedure Button3Click(Sender: TObject); + procedure Edit2KeyPress(Sender: TObject; var Key: Char); + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + Form1: TForm1; + +implementation +{$R *.DFM} + + +procedure MyLineOut(s: string); // Output procedure +begin + form1.memo1.lines.add(s); +end; + +procedure TForm1.FormCreate(Sender: TObject); +begin + RC_LineOut:=MyLineOut; // set Output + edit2.align:=albottom; +end; + +procedure TForm1.Button2Click(Sender: TObject); +begin + RC_Run(Edit1.text); // run console program +end; + +procedure TForm1.Button3Click(Sender: TObject); +begin + RC_LineIn('exit'); + Close; +end; + +procedure TForm1.Edit2KeyPress(Sender: TObject; var Key: Char); +const EnterKey=#13; NoKey=#00; +begin + if key=EnterKey then begin // send command line on Enter Key + RC_LineIn(edit2.text); + edit2.text:=''; + key:=NoKey; + end; +end; + +end. diff --git a/src/tools/PseuWoWConsole/src/fMain.dcu b/src/tools/PseuWoWConsole/src/fMain.dcu new file mode 100644 index 0000000000000000000000000000000000000000..15aaf29a09f9db82a2681a885a8bb1bb4ec15205 GIT binary patch literal 11358 zcmeG>Yjjh`nKN^x>#-~w;Rx3_KxImN3~Q?nP--}oV`Ix;VhmWa&C6gRUC9DjGI|)3 zO&TRmazcgkXp?M0N)lz4Zb?Jiq@~4flR_XQl2f-!R5dnD8z@%h8=G`#m8-YNBgu&+(&^E+LNLm7xvJ^ti1m%E@h=x+15dTefA1oZ-& z+uacK2csdy-Qo)<`TzMxPZrVd(gE*iQM(RzY9Z3j*?G$Srs-K#r>6W-~L`fcGz$m!D7u-cVK zy({ADSIRq2CM+@%_>*`pl!eh;%?=W=?njiQH!`Umg*gtaX&8D_Zv^1V|g?Z z2?jQ;?XW@?tq299eanLbzcv5sGXO%Iw*>)|uCMvBSGEeVqEGvdd%0DUJG{8M4AU(o zSercjAi^ohu8S47yWDw=KBqtE74CMq^-aN0uj+ce1D~fpJ^emZkIy^q8`};MRucvh z)_T9s8vsv4LP39+ztNramS&UHfUI?foW0=!q|Ta5g~W3Qcdc{=+Q$i7+5}tw_U(8;hQGrwp?#^DpgiPifrl7h;@uamIgPMZd zkd(9U6-q=+eMsL(36j5%trN&i{-87B3wTSBSe#942|C@1yA1I;&T0)td>)?*q=JFl zC#hTu9WA2nWF`{JvQ@5&DxuxYfrt|FKok2S(sR7nra0a92-JoJNi(xWA-^F$*hYMf zzSWSFUz#MHX1N1NIeuvGbAwhaaHxg~B8=}J+cbPW(Ins9$_q%G zb`w!#oAM%(X6BGYYCz#BZk6RFWGT&I5l4<1-vdbfQVvxdt)fXb2g1;%)O30o8Nc{B zjBA5oAC}Yikf|h_Db>yb?jIoS_H0_ZA*~7dyuQFMkRfL;$e<GxZwxuT&Am>q5?+NgXfzp`ma}&up*)+AYSWEy zNwWJQN`v1S4zETws8dZIY)qxk=1CM>729T4?wTN@t+@pWaLdXl!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git a/src/tools/PseuWoWConsole/src/fMain.dfm b/src/tools/PseuWoWConsole/src/fMain.dfm new file mode 100644 index 0000000..d3b58dd --- /dev/null +++ b/src/tools/PseuWoWConsole/src/fMain.dfm @@ -0,0 +1,144 @@ +object frmMain: TfrmMain + Left = 393 + Top = 142 + Width = 535 + Height = 390 + Caption = 'PseuWoW Console' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Fixedsys' + Font.Style = [] + OldCreateOrder = False + OnCloseQuery = FormCloseQuery + OnCreate = FormCreate + OnDestroy = FormDestroy + PixelsPerInch = 96 + TextHeight = 15 + object Panel1: TPanel + Left = 0 + Top = 0 + Width = 527 + Height = 73 + Align = alTop + BevelOuter = bvNone + TabOrder = 0 + object txtExe: TEdit + Left = 8 + Top = 10 + Width = 513 + Height = 23 + Color = clBlack + Font.Charset = DEFAULT_CHARSET + Font.Color = 16744576 + Font.Height = -11 + Font.Name = 'Fixedsys' + Font.Style = [] + ParentFont = False + TabOrder = 0 + Text = '[enter path to pseuwow bin]' + end + object btnRun: TButton + Left = 8 + Top = 40 + Width = 75 + Height = 25 + Caption = 'RUN' + TabOrder = 1 + OnClick = btnRunClick + end + object btnExit: TButton + Left = 88 + Top = 40 + Width = 75 + Height = 25 + Caption = 'Exit' + TabOrder = 2 + OnClick = btnExitClick + end + end + object Console: TRichEdit + Left = 0 + Top = 73 + Width = 527 + Height = 239 + Align = alClient + Color = clBlack + Font.Charset = DEFAULT_CHARSET + Font.Color = clWhite + Font.Height = -11 + Font.Name = 'Fixedsys' + Font.Style = [] + Lines.Strings = ( + '') + ParentFont = False + ReadOnly = True + ScrollBars = ssVertical + TabOrder = 1 + OnResizeRequest = ConsoleResizeRequest + end + object grpCmd: TGroupBox + Left = 0 + Top = 312 + Width = 527 + Height = 51 + Align = alBottom + Caption = 'Command' + TabOrder = 2 + object comCommand: TComboBox + Left = 8 + Top = 19 + Width = 513 + Height = 23 + AutoDropDown = True + Color = clBlack + Font.Charset = DEFAULT_CHARSET + Font.Color = 16744576 + Font.Height = -11 + Font.Name = 'Fixedsys' + Font.Style = [] + ItemHeight = 15 + ParentFont = False + TabOrder = 0 + OnKeyDown = comCommandKeyDown + Items.Strings = ( + '!' + '!SAY' + 'QUIT' + 'SAY') + end + end + object servRemote: TServerSocket + Active = False + Port = 8089 + ServerType = stNonBlocking + OnClientRead = servRemoteClientRead + Left = 432 + Top = 32 + end + object timerStart: TTimer + Interval = 3000 + OnTimer = timerStartTimer + Left = 472 + Top = 32 + end + object clientSock: TClientSocket + Active = False + ClientType = ctNonBlocking + Host = '127.0.0.1' + Port = 8085 + OnConnecting = clientSockConnecting + OnConnect = clientSockConnect + OnError = clientSockError + Left = 400 + Top = 32 + end + object TrayIcon: TJvTrayIcon + Active = True + IconIndex = 0 + Visibility = [tvVisibleTaskBar, tvVisibleTaskList, tvAutoHide, tvAutoHideIcon, tvRestoreClick, tvMinimizeClick] + Left = 360 + Top = 32 + end +end diff --git a/src/tools/PseuWoWConsole/src/fMain.pas b/src/tools/PseuWoWConsole/src/fMain.pas new file mode 100644 index 0000000..25c4057 --- /dev/null +++ b/src/tools/PseuWoWConsole/src/fMain.pas @@ -0,0 +1,272 @@ +unit fMain; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, RedirectConsole, ExtCtrls, IniFiles, ScktComp, JvComponentBase, + JvTrayIcon, ComCtrls, modRichEdit, StrUtils; + +type + TfrmMain = class(TForm) + Panel1: TPanel; + txtExe: TEdit; + btnRun: TButton; + btnExit: TButton; + servRemote: TServerSocket; + timerStart: TTimer; + clientSock: TClientSocket; + TrayIcon: TJvTrayIcon; + Console: TRichEdit; + grpCmd: TGroupBox; + comCommand: TComboBox; + procedure btnRunClick(Sender: TObject); + procedure btnExitClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + procedure timerStartTimer(Sender: TObject); + procedure servRemoteClientRead(Sender: TObject; + Socket: TCustomWinSocket); + procedure FormDestroy(Sender: TObject); + procedure clientSockConnect(Sender: TObject; Socket: TCustomWinSocket); + procedure clientSockError(Sender: TObject; Socket: TCustomWinSocket; + ErrorEvent: TErrorEvent; var ErrorCode: Integer); + procedure ConsoleResizeRequest(Sender: TObject; Rect: TRect); + procedure comCommandKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure clientSockConnecting(Sender: TObject; + Socket: TCustomWinSocket); + private + { Private declarations } + App : String; + Running : Boolean; + Ready : Boolean; + + function ConsoleCommand(AString : String):Boolean; + + procedure ShutDown; + procedure Execute(AFile: String); + procedure Launch; + procedure Log(AText: String; Color : TColor = clAqua); + procedure WriteFromPseWow(AString : String); + procedure AddHistoryItem(Item : String); + + public + { Public declarations } + end; + +var + frmMain: TfrmMain; + +implementation +{$R *.DFM} + + +procedure MyLineOut(s: string); // Output procedure +begin +// frmMain.memo1.lines.add(s); + frmMain.WriteFromPseWow(s); +end; + +procedure TfrmMain.FormCreate(Sender: TObject); +begin + RC_LineOut:=MyLineOut; // set Output + Ready := False; +end; + +procedure TfrmMain.btnRunClick(Sender: TObject); +var + IniFile : TInifile; +begin + IniFile := TIniFile.Create(ExtractFilePath(Application.ExeName)+'Settings.INI'); + IniFile.WriteString('Execute','Application',txtExe.Text); + IniFile.UpdateFile; + IniFile.Free; + RC_Run(txtExe.text); // run console program +end; + +procedure TfrmMain.btnExitClick(Sender: TObject); +begin + ShutDown(); +end; + +procedure TfrmMain.ShutDown; +begin + Log('Shut down PseuWow Process',clRed); + RC_LineIn('!'); + RC_LineIn('quit'); + Sleep(3000); +end; + +procedure TfrmMain.Execute(AFile : String); +begin + servRemote.Active := True; + Running := True; + Panel1.Hide; + RC_Run(AFile); + comCommand.SetFocus; +end; + +procedure TfrmMain.FormCloseQuery(Sender: TObject; var CanClose: Boolean); +begin + if RC_ExitCode = STILL_ACTIVE then + begin + ShutDown; + CanClose := True; + end; +end; + +procedure TfrmMain.timerStartTimer(Sender: TObject); +begin + timerStart.Enabled := False; + if Ready then + begin + TrayIcon.HideApplication; + Launch; + Exit; + end + else + begin + if clientSock.Active = false then + clientSock.Active := True; + end; + + timerStart.Enabled := True; +end; + +procedure TfrmMain.servRemoteClientRead(Sender: TObject; + Socket: TCustomWinSocket); +begin + RC_LineIn('!'); + RC_LineIn(Socket.ReceiveText); + Log('Received Remote Commad: ' + Socket.ReceiveText, clGreen ); +end; + +procedure TfrmMain.FormDestroy(Sender: TObject); +begin + servRemote.Active := False; +end; + +procedure TfrmMain.clientSockConnect(Sender: TObject; + Socket: TCustomWinSocket); +begin + Ready := True; + clientSock.Active := False; + Log('**** WS Is Ready For Connections ****'); + Launch; +end; + +procedure TfrmMain.clientSockError(Sender: TObject; + Socket: TCustomWinSocket; ErrorEvent: TErrorEvent; + var ErrorCode: Integer); +begin + Ready := False; + clientSock.Active := False; + Log('Still Waiting For Server',clMaroon); + ErrorCode := 0; +end; + +procedure TfrmMain.Launch; +var + IniFile : TInifile; +begin + if Ready = False then + Exit; + + Running := False; + timerStart.Enabled := False; + + //TT: Read from Inifile for the path the file we want. + IniFile := TIniFile.Create(ExtractFilePath(Application.ExeName)+'Settings.INI'); + App := IniFile.ReadString('Execute','Application',''); + if App = '' then + begin + if FileExists(ExtractFilePath(Application.ExeName)+'pseuwow.exe') then + App := ExtractFilePath(Application.ExeName)+'pseuwow.exe'; + end; + IniFile.WriteString('Execute','Application',App); + IniFile.UpdateFile; + IniFile.Free; + + if App <> '' then + Execute(App); +end; + +procedure TfrmMain.Log(AText: String; Color: TColor); +begin + AddColouredLine(Console,'CONSOLE: '+AText, Color); +end; + +procedure TfrmMain.ConsoleResizeRequest(Sender: TObject; Rect: TRect); +var + ScrollMessage: TWMVScroll; + i : Integer; +begin + ScrollMessage.Msg := WM_VScroll; + for i := 0 to Console.Lines.Count do + begin + ScrollMessage.ScrollCode := sb_LineDown; + ScrollMessage.Pos := 0; + Console.Dispatch(ScrollMessage); + end; +end; + +procedure TfrmMain.comCommandKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + if key = VK_RETURN then + begin + if ConsoleCommand(comCommand.Text) then + begin + key := 0; + Exit; + end; + + // send command line on Enter Key + RC_LineIn(comCommand.Text); + AddHistoryItem(comCommand.Text); + comCommand.Text := ''; + key:=0; + end; +end; + +procedure TfrmMain.clientSockConnecting(Sender: TObject; + Socket: TCustomWinSocket); +begin + Log('Establishing Connection to WS',clGreen); +end; + +procedure TfrmMain.WriteFromPseWow(AString: String); +begin + AString := AnsiReplaceText(AString,'|r',''); + //This doesnt ADD any color at the moment it just seems to clean up the string a bit + AddColourToLine(Console,AString); +end; + +procedure TfrmMain.AddHistoryItem(Item: String); +begin + with comCommand do + begin + if Items.IndexOf(Item) = -1 then + begin + Items.Add(Item); + end; + end; +end; + +function TfrmMain.ConsoleCommand(AString: String): Boolean; +begin + Result := False; + AString := UpperCase(AString); + + if (AString = 'QUIT') or (AString = 'EXIT') then + begin + Result := True; + ShutDown; + Sleep(1000); + Close; + end; + +end; + +end. diff --git a/src/tools/PseuWoWConsole/src/fMain.~ddp b/src/tools/PseuWoWConsole/src/fMain.~ddp new file mode 100644 index 0000000000000000000000000000000000000000..cdc0ee8c2b54a98895d906932c4351134611c8d5 GIT binary patch literal 51 zcmZRVaB=ks@bJ`g@pN<#a`e>;@DB=c^Y`)e=VxFz;K0Pl$;KI)SCUzhlbT}4#=r!G E07AM8lK=n! literal 0 HcmV?d00001 diff --git a/src/tools/PseuWoWConsole/src/fMain.~dfm b/src/tools/PseuWoWConsole/src/fMain.~dfm new file mode 100644 index 0000000..2fb46ce --- /dev/null +++ b/src/tools/PseuWoWConsole/src/fMain.~dfm @@ -0,0 +1,144 @@ +object frmMain: TfrmMain + Left = 393 + Top = 142 + Width = 535 + Height = 390 + Caption = 'PseuWoW Console' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Fixedsys' + Font.Style = [] + OldCreateOrder = False + OnCloseQuery = FormCloseQuery + OnCreate = FormCreate + OnDestroy = FormDestroy + PixelsPerInch = 96 + TextHeight = 15 + object Panel1: TPanel + Left = 0 + Top = 0 + Width = 527 + Height = 73 + Align = alTop + BevelOuter = bvNone + TabOrder = 0 + object Edit1: TEdit + Left = 8 + Top = 10 + Width = 513 + Height = 23 + Color = clBlack + Font.Charset = DEFAULT_CHARSET + Font.Color = 16744576 + Font.Height = -11 + Font.Name = 'Fixedsys' + Font.Style = [] + ParentFont = False + TabOrder = 0 + Text = '[enter path to pseuwow bin]' + end + object Button2: TButton + Left = 8 + Top = 40 + Width = 75 + Height = 25 + Caption = 'RUN' + TabOrder = 1 + OnClick = Button2Click + end + object Button3: TButton + Left = 88 + Top = 40 + Width = 75 + Height = 25 + Caption = 'Exit' + TabOrder = 2 + OnClick = Button3Click + end + end + object Console: TRichEdit + Left = 0 + Top = 73 + Width = 527 + Height = 239 + Align = alClient + Color = clBlack + Font.Charset = DEFAULT_CHARSET + Font.Color = clWhite + Font.Height = -11 + Font.Name = 'Fixedsys' + Font.Style = [] + Lines.Strings = ( + '') + ParentFont = False + ReadOnly = True + ScrollBars = ssVertical + TabOrder = 1 + OnResizeRequest = ConsoleResizeRequest + end + object grpCmd: TGroupBox + Left = 0 + Top = 312 + Width = 527 + Height = 51 + Align = alBottom + Caption = 'Command' + TabOrder = 2 + object comCommand: TComboBox + Left = 8 + Top = 19 + Width = 513 + Height = 23 + AutoDropDown = True + Color = clBlack + Font.Charset = DEFAULT_CHARSET + Font.Color = 16744576 + Font.Height = -11 + Font.Name = 'Fixedsys' + Font.Style = [] + ItemHeight = 15 + ParentFont = False + TabOrder = 0 + OnKeyDown = comCommandKeyDown + Items.Strings = ( + '!' + '!SAY' + 'QUIT' + 'SAY') + end + end + object servRemote: TServerSocket + Active = False + Port = 8089 + ServerType = stNonBlocking + OnClientRead = servRemoteClientRead + Left = 432 + Top = 32 + end + object timerStart: TTimer + Interval = 3000 + OnTimer = timerStartTimer + Left = 472 + Top = 32 + end + object clientSock: TClientSocket + Active = False + ClientType = ctNonBlocking + Host = '127.0.0.1' + Port = 8085 + OnConnecting = clientSockConnecting + OnConnect = clientSockConnect + OnError = clientSockError + Left = 400 + Top = 32 + end + object JvTrayIcon1: TJvTrayIcon + Active = True + IconIndex = 0 + Visibility = [tvVisibleTaskBar, tvVisibleTaskList, tvAutoHide, tvAutoHideIcon, tvRestoreClick, tvMinimizeClick] + Left = 360 + Top = 32 + end +end diff --git a/src/tools/PseuWoWConsole/src/fMain.~pas b/src/tools/PseuWoWConsole/src/fMain.~pas new file mode 100644 index 0000000..6eb847d --- /dev/null +++ b/src/tools/PseuWoWConsole/src/fMain.~pas @@ -0,0 +1,272 @@ +unit fMain; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, RedirectConsole, ExtCtrls, IniFiles, ScktComp, JvComponentBase, + JvTrayIcon, ComCtrls, modRichEdit, StrUtils; + +type + TfrmMain = class(TForm) + Panel1: TPanel; + Edit1: TEdit; + Button2: TButton; + Button3: TButton; + servRemote: TServerSocket; + timerStart: TTimer; + clientSock: TClientSocket; + JvTrayIcon1: TJvTrayIcon; + Console: TRichEdit; + grpCmd: TGroupBox; + comCommand: TComboBox; + procedure Button2Click(Sender: TObject); + procedure Button3Click(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + procedure timerStartTimer(Sender: TObject); + procedure servRemoteClientRead(Sender: TObject; + Socket: TCustomWinSocket); + procedure FormDestroy(Sender: TObject); + procedure clientSockConnect(Sender: TObject; Socket: TCustomWinSocket); + procedure clientSockError(Sender: TObject; Socket: TCustomWinSocket; + ErrorEvent: TErrorEvent; var ErrorCode: Integer); + procedure ConsoleResizeRequest(Sender: TObject; Rect: TRect); + procedure comCommandKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure clientSockConnecting(Sender: TObject; + Socket: TCustomWinSocket); + private + { Private declarations } + App : String; + Running : Boolean; + Ready : Boolean; + + function ConsoleCommand(AString : String):Boolean; + + procedure ShutDown; + procedure Execute(AFile: String); + procedure Launch; + procedure Log(AText: String; Color : TColor = clAqua); + procedure WriteFromPseWow(AString : String); + procedure AddHistoryItem(Item : String); + + public + { Public declarations } + end; + +var + frmMain: TfrmMain; + +implementation +{$R *.DFM} + + +procedure MyLineOut(s: string); // Output procedure +begin +// frmMain.memo1.lines.add(s); + frmMain.WriteFromPseWow(s); +end; + +procedure TfrmMain.FormCreate(Sender: TObject); +begin + RC_LineOut:=MyLineOut; // set Output + Ready := False; +end; + +procedure TfrmMain.Button2Click(Sender: TObject); +var + IniFile : TInifile; +begin + IniFile := TIniFile.Create(ExtractFilePath(Application.ExeName)+'Settings.INI'); + IniFile.WriteString('Execute','Application',Edit1.Text); + IniFile.UpdateFile; + IniFile.Free; + RC_Run(Edit1.text); // run console program +end; + +procedure TfrmMain.Button3Click(Sender: TObject); +begin + ShutDown(); +end; + +procedure TfrmMain.ShutDown; +begin + Log('Shut down PseuWow Process',clRed); + RC_LineIn('!'); + RC_LineIn('quit'); + Sleep(3000); +end; + +procedure TfrmMain.Execute(AFile : String); +begin + servRemote.Active := True; + Running := True; + Panel1.Hide; + RC_Run(AFile); + comCommand.SetFocus; +end; + +procedure TfrmMain.FormCloseQuery(Sender: TObject; var CanClose: Boolean); +begin + if RC_ExitCode = STILL_ACTIVE then + begin + ShutDown; + CanClose := True; + end; +end; + +procedure TfrmMain.timerStartTimer(Sender: TObject); +begin + timerStart.Enabled := False; + if Ready then + begin + JvTrayIcon1.HideApplication; + Launch; + Exit; + end + else + begin + if clientSock.Active = false then + clientSock.Active := True; + end; + + timerStart.Enabled := True; +end; + +procedure TfrmMain.servRemoteClientRead(Sender: TObject; + Socket: TCustomWinSocket); +begin + RC_LineIn('!'); + RC_LineIn(Socket.ReceiveText); + Log('Received Remote Commad: ' + Socket.ReceiveText, clGreen ); +end; + +procedure TfrmMain.FormDestroy(Sender: TObject); +begin + servRemote.Active := False; +end; + +procedure TfrmMain.clientSockConnect(Sender: TObject; + Socket: TCustomWinSocket); +begin + Ready := True; + clientSock.Active := False; + Log('**** WS Is Ready For Connections ****'); + Launch; +end; + +procedure TfrmMain.clientSockError(Sender: TObject; + Socket: TCustomWinSocket; ErrorEvent: TErrorEvent; + var ErrorCode: Integer); +begin + Ready := False; + clientSock.Active := False; + Log('Still Waiting For Server',clMaroon); + ErrorCode := 0; +end; + +procedure TfrmMain.Launch; +var + IniFile : TInifile; +begin + if Ready = False then + Exit; + + Running := False; + timerStart.Enabled := False; + + //TT: Read from Inifile for the path the file we want. + IniFile := TIniFile.Create(ExtractFilePath(Application.ExeName)+'Settings.INI'); + App := IniFile.ReadString('Execute','Application',''); + if App = '' then + begin + if FileExists(ExtractFilePath(Application.ExeName)+'pseuwow.exe') then + App := ExtractFilePath(Application.ExeName)+'pseuwow.exe'; + end; + IniFile.WriteString('Execute','Application',App); + IniFile.UpdateFile; + IniFile.Free; + + if App <> '' then + Execute(App); +end; + +procedure TfrmMain.Log(AText: String; Color: TColor); +begin + AddColouredLine(Console,'CONSOLE: '+AText, Color); +end; + +procedure TfrmMain.ConsoleResizeRequest(Sender: TObject; Rect: TRect); +var + ScrollMessage: TWMVScroll; + i : Integer; +begin + ScrollMessage.Msg := WM_VScroll; + for i := 0 to Console.Lines.Count do + begin + ScrollMessage.ScrollCode := sb_LineDown; + ScrollMessage.Pos := 0; + Console.Dispatch(ScrollMessage); + end; +end; + +procedure TfrmMain.comCommandKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + if key = VK_RETURN then + begin + if ConsoleCommand(comCommand.Text) then + begin + key := 0; + Exit; + end; + + // send command line on Enter Key + RC_LineIn(comCommand.Text); + AddHistoryItem(comCommand.Text); + comCommand.Text := ''; + key:=0; + end; +end; + +procedure TfrmMain.clientSockConnecting(Sender: TObject; + Socket: TCustomWinSocket); +begin + Log('Establishing Connection to WS',clGreen); +end; + +procedure TfrmMain.WriteFromPseWow(AString: String); +begin + AString := AnsiReplaceText(AString,'|r',''); + //This doesnt ADD any color at the moment it just seems to clean up the string a bit + AddColourToLine(Console,AString); +end; + +procedure TfrmMain.AddHistoryItem(Item: String); +begin + with comCommand do + begin + if Items.IndexOf(Item) = -1 then + begin + Items.Add(Item); + end; + end; +end; + +function TfrmMain.ConsoleCommand(AString: String): Boolean; +begin + Result := False; + AString := UpperCase(AString); + + if (AString = 'QUIT') or (AString = 'EXIT') then + begin + Result := True; + ShutDown; + Sleep(1000); + Close; + end; + +end; + +end. diff --git a/src/tools/PseuWoWConsole/src/logfile.txt b/src/tools/PseuWoWConsole/src/logfile.txt new file mode 100644 index 0000000..6f75adb --- /dev/null +++ b/src/tools/PseuWoWConsole/src/logfile.txt @@ -0,0 +1,48 @@ +2007-06-06 11:25:28 + +2007-06-06 11:25:28 --- Initializing Instance --- +2007-06-06 11:25:28 Loading DefScripts from folder './scripts/' +2007-06-06 11:25:28 Error executing '_startup.def' +2007-06-06 11:25:28 Errors while initializing! +2007-06-06 11:26:03 + +2007-06-06 11:26:03 --- Initializing Instance --- +2007-06-06 11:26:03 Loading DefScripts from folder './scripts/' +2007-06-06 11:26:03 Error executing '_startup.def' +2007-06-06 11:26:03 Errors while initializing! +2007-06-06 11:26:31 + +2007-06-06 11:26:31 --- Initializing Instance --- +2007-06-06 11:26:31 Loading DefScripts from folder './scripts/' +2007-06-06 11:26:31 Error executing '_startup.def' +2007-06-06 11:26:31 Errors while initializing! +2007-06-06 11:27:01 + +2007-06-06 11:27:01 --- Initializing Instance --- +2007-06-06 11:27:01 Loading DefScripts from folder './scripts/' +2007-06-06 11:27:01 Error executing '_startup.def' +2007-06-06 11:27:01 Errors while initializing! +2007-06-06 11:28:07 + +2007-06-06 11:28:07 --- Initializing Instance --- +2007-06-06 11:28:07 Loading DefScripts from folder './scripts/' +2007-06-06 11:28:07 Error executing '_startup.def' +2007-06-06 11:28:07 Errors while initializing! +2007-06-06 11:28:39 + +2007-06-06 11:28:39 --- Initializing Instance --- +2007-06-06 11:28:39 Loading DefScripts from folder './scripts/' +2007-06-06 11:28:39 Error executing '_startup.def' +2007-06-06 11:28:39 Errors while initializing! +2007-06-06 11:30:01 + +2007-06-06 11:30:01 --- Initializing Instance --- +2007-06-06 11:30:01 Loading DefScripts from folder './scripts/' +2007-06-06 11:30:01 Error executing '_startup.def' +2007-06-06 11:30:01 Errors while initializing! +2007-06-06 11:30:34 + +2007-06-06 11:30:34 --- Initializing Instance --- +2007-06-06 11:30:34 Loading DefScripts from folder './scripts/' +2007-06-06 11:30:34 Error executing '_startup.def' +2007-06-06 11:30:34 Errors while initializing!