Version 2.2.0

--------------
Redirected Input capture is now Handled in a Thread. Meaning a more responsive output

Checking for |r in sysmessages, if |r is not found then don't clear our buffer
There is a Check Box for Clean Up - which basically toggles all text post formatting. If you're having problems disable it. Else it will highlight in a very pretty manner!

Started Adding Colour Coding for .lookup* MaNGOS commands

Any requests?
This commit is contained in:
thetourist 2007-10-29 12:11:59 +00:00
parent e0696bd244
commit 97bf1c4793
13 changed files with 10231 additions and 9047 deletions

View File

@ -1,7 +1,7 @@
=======================================================
PseuWoWConsole - Version 2.1.0
PseuWoWConsole - Version 2.2.0
=======================================================
"At First you listen to users, then you stop listening"
"If at first you don't succeed, sky diving is not for you"
=======================================================
Greetings from TheTourist
@ -30,9 +30,16 @@ As I feel it's better to share, we all get along better that way.
Changes
=======================================================
Version 2.0.0
* Added Nifty Icon Feature - Basically If you run more than one session you now tell which one is which!
* Display of Char Name
* Started Work on reading the colors from input
* Added Nifty Icon Feature - Basically If you run more than one session you now tell which one is which!
* Display of Char Name
* Started Work on reading the colors from input
Version 2.1.0
* Fixed a problem due to failed recompile
* Fixed a problem due to failed recompile
Version 2.2.0
* Redirected Input capture is now Handled in a Thread. Meaning a more responsive output
* Checking for |r in sysmessages, if |r is not found then don't clear our buffer
* There is a Check Box for Clean Up - which basically toggles all text post formatting. If you're
having problem disable it. Else it will highlight in a very pretty manner!
* Started Adding Colour Coding for .lookup* MaNGOS commands

View File

@ -32,6 +32,7 @@
-M
-$M16384,1048576
-K$00400000
-E"M:\Mangos\PseudoWoWGM"
-LE"c:\program files\borland\delphi6\Projects\Bpl"
-LN"c:\program files\borland\delphi6\Projects\Bpl"
-U"E:\Coding\Delphi\rutinas\fastlib"

View File

@ -41,7 +41,7 @@ MaxStackSize=1048576
ImageBase=4194304
ExeDescription=
[Directories]
OutputDir=
OutputDir=M:\Mangos\PseudoWoWGM
UnitOutputDir=
PackageDLLOutputDir=
PackageDCPOutputDir=
@ -64,7 +64,7 @@ RootDir=
IncludeVerInfo=1
AutoIncBuild=0
MajorVer=2
MinorVer=1
MinorVer=2
Release=0
Build=0
Debug=0
@ -77,7 +77,7 @@ CodePage=1252
[Version Info Keys]
CompanyName=
FileDescription=
FileVersion=2.1.0.0
FileVersion=2.2.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
@ -86,12 +86,8 @@ ProductName=
ProductVersion=1.0.0.0
Comments=
[Excluded Packages]
c:\program files\borland\delphi6\Projects\Bpl\SynUni_D5.bpl=(untitled)
c:\program files\borland\delphi6\Projects\Bpl\images.bpl=Images
c:\program files\borland\delphi6\Projects\Bpl\ryansvcl.bpl=Ryans VCL
c:\program files\borland\delphi6\Bin\dclsoap60.bpl=Borland SOAP Components
c:\program files\borland\delphi6\Projects\Bpl\dclusr60.bpl=Borland User Components
c:\program files\borland\delphi6\Projects\Bpl\XpControls.bpl=XpControls
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;
@ -99,5 +95,489 @@ Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
Count=1
Item0=E:\Coding\Delphi\rutinas\fastlib
[HistoryLists\hlOutputDirectorry]
Count=1
Item0=F:\ttWoWEmu\pseuwow\
Count=2
Item0=M:\Mangos\PseudoWoWGM
Item1=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

View File

@ -53,102 +53,102 @@
#define JclResources_RsIntelCacheDescr44 65213
#define JclResources_RsIntelCacheDescr45 65214
#define JclResources_RsIntelCacheDescr50 65215
#define JvResources_RsMenuHighlight 65216
#define ComConst_SOleError 65217
#define ComConst_SNoMethod 65218
#define ComConst_SVarNotObject 65219
#define ComConst_STooManyParams 65220
#define ComStrs_sInvalidOwner 65221
#define ComStrs_sRichEditInsertError 65222
#define ComStrs_sRichEditLoadFail 65223
#define ComStrs_sRichEditSaveFail 65224
#define ComStrs_sInvalidComCtl32 65225
#define JvResources_RsClInfoBk 65216
#define JvResources_RsGradientActiveCaption 65217
#define JvResources_RsGradientInactiveCaption 65218
#define JvResources_RsHotLight 65219
#define JvResources_RsMenuBar 65220
#define JvResources_RsMenuHighlight 65221
#define ComConst_SOleError 65222
#define ComConst_SNoMethod 65223
#define ComConst_SVarNotObject 65224
#define ComConst_STooManyParams 65225
#define JclResources_RsIntelCacheDescr00 65226
#define JclResources_RsIntelCacheDescr01 65227
#define JclResources_RsIntelCacheDescr02 65228
#define JclResources_RsIntelCacheDescr03 65229
#define JclResources_RsIntelCacheDescr04 65230
#define JclResources_RsIntelCacheDescr06 65231
#define JvResources_RsClHighlight 65232
#define JvResources_RsClHighlightText 65233
#define JvResources_RsClBtnFace 65234
#define JvResources_RsClBtnShadow 65235
#define JvResources_RsClGrayText 65236
#define JvResources_RsClBtnText 65237
#define JvResources_RsClInactiveCaptionText 65238
#define JvResources_RsClBtnHighlight 65239
#define JvResources_RsCl3DDkShadow 65240
#define JvResources_RsCl3DLight 65241
#define JvResources_RsClInfoText 65242
#define JvResources_RsClInfoBk 65243
#define JvResources_RsGradientActiveCaption 65244
#define JvResources_RsGradientInactiveCaption 65245
#define JvResources_RsHotLight 65246
#define JvResources_RsMenuBar 65247
#define JvResources_RsClLightTurquoise 65248
#define JvResources_RsClPaleBlue 65249
#define JvResources_RsClLavender 65250
#define JvResources_RsClScrollBar 65251
#define JvResources_RsClBackground 65252
#define JvResources_RsClActiveCaption 65253
#define JvResources_RsClInactiveCaption 65254
#define JvResources_RsClMenu 65255
#define JvResources_RsClWindow 65256
#define JvResources_RsClWindowFrame 65257
#define JvResources_RsClMenuText 65258
#define JvResources_RsClWindowText 65259
#define JvResources_RsClCaptionText 65260
#define JvResources_RsClActiveBorder 65261
#define JvResources_RsClInactiveBorder 65262
#define JvResources_RsClAppWorkSpace 65263
#define JvResources_RsClGray50 65264
#define JvResources_RsClLightOrange 65265
#define JvResources_RsClSeaGreen 65266
#define JvResources_RsClLightBlue 65267
#define JvResources_RsClViolet 65268
#define JvResources_RsClGray40 65269
#define JvResources_RsClPink 65270
#define JvResources_RsClGold 65271
#define JvResources_RsClBrightGreen 65272
#define JvResources_RsClTurquoise 65273
#define JvResources_RsClPlum 65274
#define JvResources_RsClGray25 65275
#define JvResources_RsClRose 65276
#define JvResources_RsClTan 65277
#define JvResources_RsClLightYellow 65278
#define JvResources_RsClLightGreen 65279
#define JvResources_RsClWhite 65280
#define JvResources_RsClMoneyGreen 65281
#define JvResources_RsClSkyBlue 65282
#define JvResources_RsClCream 65283
#define JvResources_RsClMedGray 65284
#define JvResources_RsClBrown 65285
#define JvResources_RsClOliveGreen 65286
#define JvResources_RsClDarkGreen 65287
#define JvResources_RsClDarkTeal 65288
#define JvResources_RsClDarkBlue 65289
#define JvResources_RsClIndigo 65290
#define JvResources_RsClGray80 65291
#define JvResources_RsClDarkRed 65292
#define JvResources_RsClOrange 65293
#define JvResources_RsClDarkYellow 65294
#define JvResources_RsClBlueGray 65295
#define JvResources_RsClWindowText 65232
#define JvResources_RsClCaptionText 65233
#define JvResources_RsClActiveBorder 65234
#define JvResources_RsClInactiveBorder 65235
#define JvResources_RsClAppWorkSpace 65236
#define JvResources_RsClHighlight 65237
#define JvResources_RsClHighlightText 65238
#define JvResources_RsClBtnFace 65239
#define JvResources_RsClBtnShadow 65240
#define JvResources_RsClGrayText 65241
#define JvResources_RsClBtnText 65242
#define JvResources_RsClInactiveCaptionText 65243
#define JvResources_RsClBtnHighlight 65244
#define JvResources_RsCl3DDkShadow 65245
#define JvResources_RsCl3DLight 65246
#define JvResources_RsClInfoText 65247
#define JvResources_RsClGray25 65248
#define JvResources_RsClRose 65249
#define JvResources_RsClTan 65250
#define JvResources_RsClLightYellow 65251
#define JvResources_RsClLightGreen 65252
#define JvResources_RsClLightTurquoise 65253
#define JvResources_RsClPaleBlue 65254
#define JvResources_RsClLavender 65255
#define JvResources_RsClScrollBar 65256
#define JvResources_RsClBackground 65257
#define JvResources_RsClActiveCaption 65258
#define JvResources_RsClInactiveCaption 65259
#define JvResources_RsClMenu 65260
#define JvResources_RsClWindow 65261
#define JvResources_RsClWindowFrame 65262
#define JvResources_RsClMenuText 65263
#define JvResources_RsClGray80 65264
#define JvResources_RsClDarkRed 65265
#define JvResources_RsClOrange 65266
#define JvResources_RsClDarkYellow 65267
#define JvResources_RsClBlueGray 65268
#define JvResources_RsClGray50 65269
#define JvResources_RsClLightOrange 65270
#define JvResources_RsClSeaGreen 65271
#define JvResources_RsClLightBlue 65272
#define JvResources_RsClViolet 65273
#define JvResources_RsClGray40 65274
#define JvResources_RsClPink 65275
#define JvResources_RsClGold 65276
#define JvResources_RsClBrightGreen 65277
#define JvResources_RsClTurquoise 65278
#define JvResources_RsClPlum 65279
#define JvResources_RsClLime 65280
#define JvResources_RsClYellow 65281
#define JvResources_RsClBlue 65282
#define JvResources_RsClFuchsia 65283
#define JvResources_RsClAqua 65284
#define JvResources_RsClWhite 65285
#define JvResources_RsClMoneyGreen 65286
#define JvResources_RsClSkyBlue 65287
#define JvResources_RsClCream 65288
#define JvResources_RsClMedGray 65289
#define JvResources_RsClBrown 65290
#define JvResources_RsClOliveGreen 65291
#define JvResources_RsClDarkGreen 65292
#define JvResources_RsClDarkTeal 65293
#define JvResources_RsClDarkBlue 65294
#define JvResources_RsClIndigo 65295
#define HelpIntfs_hNoTopics 65296
#define JvResources_RsClBlack 65297
#define JvResources_RsClMaroon 65298
#define JvResources_RsClGreen 65299
#define JvResources_RsClOlive 65300
#define JvResources_RsClNavy 65301
#define JvResources_RsClPurple 65302
#define JvResources_RsClTeal 65303
#define JvResources_RsClGray 65304
#define JvResources_RsClSilver 65305
#define JvResources_RsClRed 65306
#define JvResources_RsClLime 65307
#define JvResources_RsClYellow 65308
#define JvResources_RsClBlue 65309
#define JvResources_RsClFuchsia 65310
#define JvResources_RsClAqua 65311
#define ComStrs_sInvalidOwner 65297
#define ComStrs_sRichEditInsertError 65298
#define ComStrs_sRichEditLoadFail 65299
#define ComStrs_sRichEditSaveFail 65300
#define ComStrs_sInvalidComCtl32 65301
#define JvResources_RsClBlack 65302
#define JvResources_RsClMaroon 65303
#define JvResources_RsClGreen 65304
#define JvResources_RsClOlive 65305
#define JvResources_RsClNavy 65306
#define JvResources_RsClPurple 65307
#define JvResources_RsClTeal 65308
#define JvResources_RsClGray 65309
#define JvResources_RsClSilver 65310
#define JvResources_RsClRed 65311
#define Consts_SmkcDel 65312
#define Consts_SmkcShift 65313
#define Consts_SmkcCtrl 65314
@ -420,22 +420,27 @@ BEGIN
JclResources_RsIntelCacheDescr44, "Unified cache, 32 byte cache line, 4-way set associative, 1Mb"
JclResources_RsIntelCacheDescr45, "Unified cache, 32 byte cache line, 4-way set associative, 2Mb"
JclResources_RsIntelCacheDescr50, "Instruction TLB, 4 KBytes and 2 MBytes or 4 MBytes pages, 64 Entries"
JvResources_RsClInfoBk, "Tooltip background"
JvResources_RsGradientActiveCaption, "Gradient Active Caption"
JvResources_RsGradientInactiveCaption, "Gradient Inactive Caption"
JvResources_RsHotLight, "Hot Light"
JvResources_RsMenuBar, "Menu Bar"
JvResources_RsMenuHighlight, "Menu Highlight"
ComConst_SOleError, "OLE error %.8x"
ComConst_SNoMethod, "Method '%s' not supported by automation object"
ComConst_SVarNotObject, "Variant does not reference an automation object"
ComConst_STooManyParams, "Dispatch methods do not support more than 64 parameters"
ComStrs_sInvalidOwner, "Invalid owner"
ComStrs_sRichEditInsertError, "RichEdit line insertion error"
ComStrs_sRichEditLoadFail, "Failed to Load Stream"
ComStrs_sRichEditSaveFail, "Failed to Save Stream"
ComStrs_sInvalidComCtl32, "This control requires version 4.70 or greater of COMCTL32.DLL"
JclResources_RsIntelCacheDescr00, "Null descriptor"
JclResources_RsIntelCacheDescr01, "Instruction TLB, 4Kb pages, 4-way set associative, 32 entries"
JclResources_RsIntelCacheDescr02, "Instruction TLB, 4Mb pages, fully associative, 2 entries"
JclResources_RsIntelCacheDescr03, "Data TLB, 4Kb pages, 4-way set associative, 64 entries"
JclResources_RsIntelCacheDescr04, "Data TLB, 4Mb pages, 4-way set associative, 8 entries"
JclResources_RsIntelCacheDescr06, "8KB instruction cache, 4-way set associative, 32 byte line size"
JvResources_RsClWindowText, "Window text"
JvResources_RsClCaptionText, "Active window title bar text"
JvResources_RsClActiveBorder, "Active window border"
JvResources_RsClInactiveBorder, "Inactive window border"
JvResources_RsClAppWorkSpace, "Application workspace"
JvResources_RsClHighlight, "Selection background"
JvResources_RsClHighlightText, "Selection text"
JvResources_RsClBtnFace, "Button face"
@ -447,11 +452,11 @@ BEGIN
JvResources_RsCl3DDkShadow, "Dark shadow 3D elements"
JvResources_RsCl3DLight, "Highlight 3D elements"
JvResources_RsClInfoText, "Tooltip text"
JvResources_RsClInfoBk, "Tooltip background"
JvResources_RsGradientActiveCaption, "Gradient Active Caption"
JvResources_RsGradientInactiveCaption, "Gradient Inactive Caption"
JvResources_RsHotLight, "Hot Light"
JvResources_RsMenuBar, "Menu Bar"
JvResources_RsClGray25, "Gray 25%"
JvResources_RsClRose, "Rose"
JvResources_RsClTan, "Tan"
JvResources_RsClLightYellow, "Light Yellow"
JvResources_RsClLightGreen, "Light Green"
JvResources_RsClLightTurquoise, "Light Turquoise"
JvResources_RsClPaleBlue, "Pale Blue"
JvResources_RsClLavender, "Lavender"
@ -463,11 +468,11 @@ BEGIN
JvResources_RsClWindow, "Window background"
JvResources_RsClWindowFrame, "Window frame"
JvResources_RsClMenuText, "Menu text"
JvResources_RsClWindowText, "Window text"
JvResources_RsClCaptionText, "Active window title bar text"
JvResources_RsClActiveBorder, "Active window border"
JvResources_RsClInactiveBorder, "Inactive window border"
JvResources_RsClAppWorkSpace, "Application workspace"
JvResources_RsClGray80, "Gray 80%"
JvResources_RsClDarkRed, "Dark Red"
JvResources_RsClOrange, "Orange"
JvResources_RsClDarkYellow, "Dark Yellow"
JvResources_RsClBlueGray, "Blue Gray"
JvResources_RsClGray50, "Gray 50%"
JvResources_RsClLightOrange, "Light Orange"
JvResources_RsClSeaGreen, "Sea Green"
@ -479,11 +484,11 @@ BEGIN
JvResources_RsClBrightGreen, "Bright Green"
JvResources_RsClTurquoise, "Turquoise"
JvResources_RsClPlum, "Plum"
JvResources_RsClGray25, "Gray 25%"
JvResources_RsClRose, "Rose"
JvResources_RsClTan, "Tan"
JvResources_RsClLightYellow, "Light Yellow"
JvResources_RsClLightGreen, "Light Green"
JvResources_RsClLime, "Lime"
JvResources_RsClYellow, "Yellow"
JvResources_RsClBlue, "Blue"
JvResources_RsClFuchsia, "Fuchsia"
JvResources_RsClAqua, "Aqua"
JvResources_RsClWhite, "White"
JvResources_RsClMoneyGreen, "Money green"
JvResources_RsClSkyBlue, "Sky blue"
@ -495,12 +500,12 @@ BEGIN
JvResources_RsClDarkTeal, "Dark Teal"
JvResources_RsClDarkBlue, "Dark Blue"
JvResources_RsClIndigo, "Indigo"
JvResources_RsClGray80, "Gray 80%"
JvResources_RsClDarkRed, "Dark Red"
JvResources_RsClOrange, "Orange"
JvResources_RsClDarkYellow, "Dark Yellow"
JvResources_RsClBlueGray, "Blue Gray"
HelpIntfs_hNoTopics, "No topic-based help system installed"
ComStrs_sInvalidOwner, "Invalid owner"
ComStrs_sRichEditInsertError, "RichEdit line insertion error"
ComStrs_sRichEditLoadFail, "Failed to Load Stream"
ComStrs_sRichEditSaveFail, "Failed to Save Stream"
ComStrs_sInvalidComCtl32, "This control requires version 4.70 or greater of COMCTL32.DLL"
JvResources_RsClBlack, "Black"
JvResources_RsClMaroon, "Maroon"
JvResources_RsClGreen, "Green"
@ -511,11 +516,6 @@ BEGIN
JvResources_RsClGray, "Gray"
JvResources_RsClSilver, "Silver"
JvResources_RsClRed, "Red"
JvResources_RsClLime, "Lime"
JvResources_RsClYellow, "Yellow"
JvResources_RsClBlue, "Blue"
JvResources_RsClFuchsia, "Fuchsia"
JvResources_RsClAqua, "Aqua"
Consts_SmkcDel, "Del"
Consts_SmkcShift, "Shift+"
Consts_SmkcCtrl, "Ctrl+"

File diff suppressed because it is too large Load Diff

View File

@ -123,8 +123,7 @@ object frmMain: TfrmMain
Items.Strings = (
'!'
'!SAY'
'QUIT'
'SAY')
'!QUIT')
end
end
end
@ -170,6 +169,26 @@ object frmMain: TfrmMain
ParentFont = False
TabOrder = 1
end
object chkCleanMessages: TCheckBox
Left = 360
Top = 16
Width = 97
Height = 17
Anchors = [akTop, akRight]
Caption = 'Clean Up'
Checked = True
State = cbChecked
TabOrder = 2
end
object pnlTestColor: TPanel
Left = 208
Top = 16
Width = 25
Height = 25
Color = clYellow
TabOrder = 3
Visible = False
end
end
object servRemote: TServerSocket
Active = False
@ -210,7 +229,7 @@ object frmMain: TfrmMain
Left = 312
Top = 40
Bitmap = {
494C010111001300040020002000FFFFFFFFFF00FFFFFFFFFFFFFFFF424D3600
494C010111001300040020002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
000000000000360000002800000080000000A000000001002000000000000040
0100000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
@ -2854,6 +2873,7 @@ object frmMain: TfrmMain
E0000000FF000078EC000017E38001FFFE000000FE8000FCFC00001F87F001FF
FF000000FD80003EFE00003F0FFC01FFFF00000CFB4001FFFE00003F0FFE03FF
FF8E03FEFEE002FFFE0000379FFF03FFFFCF1FFEFFD0077FF1F0070BFFFF03FF
FFFF9FFFFFFC1FFFFFFC1FEFFFFF87FF}
FFFF9FFFFFFC1FFFFFFC1FEFFFFF87FF00000000000000000000000000000000
000000000000}
end
end

View File

@ -5,9 +5,37 @@ interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, RedirectConsole, ExtCtrls, IniFiles, ScktComp, JvComponentBase,
JvTrayIcon, ComCtrls, modRichEdit, StrUtils, ImgList, modSCPUtils;
JvTrayIcon, ComCtrls, modRichEdit, StrUtils, ImgList, modSCPUtils, SyncObjs;
type
TMsgType = (mtUnknown = 0, mtChat = 1, mtWhisper, mtReply, mtSysMsg, mtMOTD, mtEmote);
TPseuWowCMD = (pwUnknown = 0, pwSay = 1);
TLogItem = class
MsgType : TMsgType;
LogMessage : string;
end;
TLogThread = class(TThread)
protected
procedure Execute; override;
public
LogList : TThreadList;
currMessage : string;
currCommand : TPseuWowCMD;
critWrite : TCriticalSection;
constructor Create;
destructor Destroy; override;
procedure AddMessage(AMsg : string);
procedure SyncWrite();
procedure WriteFromPseWow(AString : String);
end;
TfrmMain = class(TForm)
pnlTop: TPanel;
txtExe: TEdit;
@ -25,6 +53,8 @@ type
pnlSessionTop: TPanel;
cbexIcon: TComboBoxEx;
txtChar: TStaticText;
chkCleanMessages: TCheckBox;
pnlTestColor: TPanel;
procedure btnRunClick(Sender: TObject);
procedure btnExitClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
@ -44,6 +74,8 @@ type
procedure cbexIconChange(Sender: TObject);
private
{ Private declarations }
Logger : TLogThread;
App : String;
Running : Boolean;
Ready : Boolean;
@ -59,7 +91,7 @@ type
procedure Execute(AFile: String);
procedure Launch;
procedure Log(AText: String; Color : TColor = clAqua);
procedure WriteFromPseWow(AString : String);
procedure AddHistoryItem(Item : String);
public
@ -75,13 +107,267 @@ implementation
procedure MyLineOut(s: string); // Output procedure
begin
// frmMain.memo1.lines.add(s);
frmMain.WriteFromPseWow(s);
frmMain.Logger.AddMessage(s);
end;
{---------TLogThread-----------------------------------------------------------\
\------------------------------------------------------------------------------}
procedure TLogThread.AddMessage(AMsg: string);
var
NewItem : TLogItem;
begin
NewItem := TLogItem.Create;
NewItem.MsgType := mtUnknown;
NewItem.LogMessage := AMsg;
LogList.Add(NewItem);
end;
constructor TLogThread.Create;
begin
inherited Create(true);
currCommand := pwUnknown;
LogList := TThreadList.Create;
critWrite := TCriticalSection.Create;
end;
destructor TLogThread.Destroy;
begin
FreeAndNil(LogList);
FreeAndNil(critWrite);
inherited;
end;
procedure TLogThread.Execute;
var
List : TList;
oItem : TLogItem;
begin
currMessage := '';
while not (Terminated) do
begin
List := LogList.LockList;
LogList.UnlockList;
while List.Count > 0 do
begin
oItem := TLogItem(List[0]);
//Do the Stuff
//If the case of sysmsg that hasn't given |r and we get a new message
//with <say> in it, write the current message
if (currMessage <> '') and (AnsiPos('<say>', oItem.LogMessage) <> 0) then
begin
currMessage := currMessage + '|r';
Synchronize(SyncWrite);
currMessage := '';
end;
currMessage := Trim(currMessage + oItem.LogMessage);
Synchronize(SyncWrite);
LogList.Remove(oItem);
oItem.Free;
end;
//TT: If we still have something in the buffer just write it
if currMessage <> '' then
begin
//In the case of a SYSMSG without |r
if AnsiPos('|r',currMessage) = 0 then
currMessage := currMessage + '|r';
Synchronize(SyncWrite);
end;
SleepEx(100, True);
end;
end;
procedure TLogThread.SyncWrite;
begin
critWrite.Acquire;
WriteFromPseWow(currMessage);
critWrite.Release;
end;
procedure TLogThread.WriteFromPseWow(AString: String);
var
mt : TMsgType;
iPos, iPos2 : Integer;
bEOL : Boolean;
NewCommand : TPseuWowCMD;
begin
//TT: Assume we have EOL
bEOL := True;
NewCommand := pwUnknown;
//TT: Remove the current command display to minimise spam
if frmMain.chkCleanMessages.Checked then
begin
//Get Our New Command
if AnsiPos('<say>:', AString) <> 0 then
NewCommand := pwSay;
//May cause a problem if there is more than cmd data in a received string
//if (currCommand <> pwUnknown) and (NewCommand = currCommand) then
// Exit;
//We have a new command
if (NewCommand = pwUnknown) and (currCommand <> pwUnknown) then
begin
//Remove redundent PW Command Text
if (currCommand = pwSay) then
AnsiReplaceText(AString, '<say>', '');
end
else
currCommand := NewCommand;
end;
try
if Trim(AString) <> '' then
begin
if LeftStr(AString, 8) = 'SYSMSG: ' then
begin
//Check for end of line |r
if AnsiPos('|r',AString) = 0 then
begin
bEOL := False;
if RightStr(Trim(AString), 1) = '"' then
bEOL := True
else
Exit;
end;
AString := AnsiReplaceText(AString,'|r','');
if frmMain.chkCleanMessages.Checked then
begin
AString := AnsiReplaceText(AString,'SYSMSG: ','');
AString := AnsiReplaceText(AString, '"', '');
end;
//Clean Ups for Say Outputs like lookup etc.
if frmMain.chkCleanMessages.Checked then
begin
if AnsiContainsText(AString, '|Hquest') then
begin
AString := AddHilightedItem(AString,'quest');
end;
if AnsiContainsText(AString, '|Hitem') then
begin
AString := AddHilightedItem(AString,'item');
end;
if AnsiContainsText(AString, '|Htele') then
begin
AString := AddHilightedItem(AString,'tele');
end;
if AnsiContainsText(AString, '|Hspell') then
begin
AString := AddHilightedItem(AString,'spell');
end;
if AnsiContainsText(AString, '|Hcreature') then
begin
AString := AddHilightedItem(AString,'creature');
end;
if AnsiContainsText(AString, '|Hobject') then
begin
AString := AddHilightedItem(AString,'object');
end;
end;
AddColourToLine(frmMain.Console,AString, );
Exit;
end;
if frmMain.chkCleanMessages.Checked then
AString := AnsiReplaceText(AString, '"', '');
AString := AnsiReplaceText(AString,'|r','');
if LeftStr(AString, 6) = 'CHAT: ' then
begin
if frmMain.chkCleanMessages.Checked then
AString := AnsiReplaceText(AString,'CHAT: ','');
AddColourToLine(frmMain.Console, AString, clWhite);
Exit;
end;
//Are we doing clean messages?
if frmMain.chkCleanMessages.Checked then
begin
AnsiReplaceText(AString,'"','');
end;
//TT: Check for known string headers and color accordingly
if LeftStr(AString, 6) = 'WHISP:' then
begin
if frmMain.chkCleanMessages.Checked then
AString := AnsiReplaceText(AString,'WHISP: ','');
AddColouredLine(frmMain.Console,AString, $00FB00FB);
Exit;
end;
if LeftStr(AString, 3) = 'TO ' then
begin
if frmMain.chkCleanMessages.Checked then
AString := AnsiReplaceText(AString,'TO ','');
AddColouredLine(frmMain.Console,AString, $00FB00FB);
Exit;
end;
if LeftStr(AString, 7) = 'EMOTE: ' then
begin
if frmMain.chkCleanMessages.Checked then
AString := AnsiReplaceText(AString,'EMOTE: ','');
AddColouredLine(frmMain.Console,AString, clYellow);
Exit;
end;
if LeftStr(AString, 6) = 'MOTD: ' then
begin
if frmMain.chkCleanMessages.Checked then
AString := AnsiReplaceText(AString,'MOTD: ','');
AddColouredLine(frmMain.Console,AString, clAqua);
Exit;
end;
//This doesnt ADD any color at the moment it just seems to clean up the string a bit
AddColourToLine(frmMain.Console,AString);
end;
finally
if bEOL then
currMessage := '';
end;
end;
{---------TfrmMain-------------------------------------------------------------\
\------------------------------------------------------------------------------}
procedure TfrmMain.FormCreate(Sender: TObject);
begin
RC_LineOut:=MyLineOut; // set Output
Logger := TLogThread.Create;
Logger.Resume;
SetupIcons;
LoadSettings;
Ready := False;
@ -95,7 +381,7 @@ begin
IniFile.WriteString('Execute','Application',txtExe.Text);
IniFile.UpdateFile;
IniFile.Free;
RC_Run(txtExe.text); // run console program
RC_Run(txtExe.text); // run frmMain.Console program
end;
procedure TfrmMain.btnExitClick(Sender: TObject);
@ -168,6 +454,9 @@ end;
procedure TfrmMain.FormDestroy(Sender: TObject);
begin
Logger.Terminate;
FreeAndNil(Logger);
servRemote.Active := False;
end;
@ -235,7 +524,7 @@ end;
procedure TfrmMain.Log(AText: String; Color: TColor);
begin
AddColouredLine(Console,'CONSOLE: '+AText, Color);
AddColouredLine(frmMain.Console,'Console: '+AText, Color);
end;
@ -245,6 +534,7 @@ var
i : Integer;
begin
ScrollMessage.Msg := WM_VScroll;
for i := 0 to Console.Lines.Count do
begin
ScrollMessage.ScrollCode := sb_LineDown;
@ -258,7 +548,7 @@ procedure TfrmMain.comCommandKeyDown(Sender: TObject; var Key: Word;
begin
if key = VK_RETURN then
begin
if ConsoleCommand(comCommand.Text) then
if frmMain.ConsoleCommand(comCommand.Text) then
begin
key := 0;
Exit;
@ -269,7 +559,17 @@ begin
AddHistoryItem(comCommand.Text);
comCommand.Text := '';
key:=0;
Exit;
end;
if key = VK_F3 then
begin
if comCommand.Items.Count > 0 then
comCommand.ItemIndex := comCommand.Items.Count -1;
Key := 0;
Exit;
end;
end;
procedure TfrmMain.clientSockConnecting(Sender: TObject;
@ -286,13 +586,6 @@ begin
end;
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
@ -309,7 +602,7 @@ begin
Result := False;
AString := UpperCase(AString);
if (AString = 'QUIT') or (AString = 'EXIT') then
if (AString = '!QUIT') or (AString = '!EXIT') then
begin
Result := True;
ShutDown;
@ -418,7 +711,7 @@ begin
if EvaluateProperty(sBuffer, 'charname=', sRes) then
begin
txtChar.Caption := sRes;
Application.Title := sRes + ' - PseuWoW Console';
Application.Title := sRes + ' - PseuWoW frmMain.Console';
TrayIcon.Hint := Application.Title;
end;
end;

View File

@ -5,9 +5,37 @@ interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, RedirectConsole, ExtCtrls, IniFiles, ScktComp, JvComponentBase,
JvTrayIcon, ComCtrls, modRichEdit, StrUtils, ImgList, modSCPUtils;
JvTrayIcon, ComCtrls, modRichEdit, StrUtils, ImgList, modSCPUtils, SyncObjs;
type
TMsgType = (mtUnknown = 0, mtChat = 1, mtWhisper, mtReply, mtSysMsg, mtMOTD, mtEmote);
TPseuWowCMD = (pwUnknown = 0, pwSay = 1);
TLogItem = class
MsgType : TMsgType;
LogMessage : string;
end;
TLogThread = class(TThread)
protected
procedure Execute; override;
public
LogList : TThreadList;
currMessage : string;
currCommand : TPseuWowCMD;
critWrite : TCriticalSection;
constructor Create;
destructor Destroy; override;
procedure AddMessage(AMsg : string);
procedure SyncWrite();
procedure WriteFromPseWow(AString : String);
end;
TfrmMain = class(TForm)
pnlTop: TPanel;
txtExe: TEdit;
@ -25,6 +53,8 @@ type
pnlSessionTop: TPanel;
cbexIcon: TComboBoxEx;
txtChar: TStaticText;
chkCleanMessages: TCheckBox;
pnlTestColor: TPanel;
procedure btnRunClick(Sender: TObject);
procedure btnExitClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
@ -44,6 +74,8 @@ type
procedure cbexIconChange(Sender: TObject);
private
{ Private declarations }
Logger : TLogThread;
App : String;
Running : Boolean;
Ready : Boolean;
@ -59,7 +91,7 @@ type
procedure Execute(AFile: String);
procedure Launch;
procedure Log(AText: String; Color : TColor = clAqua);
procedure WriteFromPseWow(AString : String);
procedure AddHistoryItem(Item : String);
public
@ -75,13 +107,263 @@ implementation
procedure MyLineOut(s: string); // Output procedure
begin
// frmMain.memo1.lines.add(s);
frmMain.WriteFromPseWow(s);
frmMain.Logger.AddMessage(s);
end;
{---------TLogThread-----------------------------------------------------------\
\------------------------------------------------------------------------------}
procedure TLogThread.AddMessage(AMsg: string);
var
NewItem : TLogItem;
begin
NewItem := TLogItem.Create;
NewItem.MsgType := mtUnknown;
NewItem.LogMessage := AMsg;
LogList.Add(NewItem);
end;
constructor TLogThread.Create;
begin
inherited Create(true);
currCommand := pwUnknown;
LogList := TThreadList.Create;
critWrite := TCriticalSection.Create;
end;
destructor TLogThread.Destroy;
begin
FreeAndNil(LogList);
FreeAndNil(critWrite);
inherited;
end;
procedure TLogThread.Execute;
var
List : TList;
oItem : TLogItem;
begin
currMessage := '';
while not (Terminated) do
begin
List := LogList.LockList;
LogList.UnlockList;
while List.Count > 0 do
begin
oItem := TLogItem(List[0]);
//Do the Stuff
//If the case of sysmsg that hasn't given |r and we get a new message
//with <say> in it, write the current message
if (currMessage <> '') and (AnsiPos('<say>', oItem.LogMessage) <> 0) then
begin
currMessage := currMessage + '|r';
Synchronize(SyncWrite);
currMessage := '';
end;
currMessage := Trim(currMessage + oItem.LogMessage);
Synchronize(SyncWrite);
LogList.Remove(oItem);
oItem.Free;
end;
//TT: If we still have something in the buffer just write it
if currMessage <> '' then
begin
//In the case of a SYSMSG without |r
if AnsiPos('|r',currMessage) = 0 then
currMessage := currMessage + '|r';
Synchronize(SyncWrite);
end;
SleepEx(100, True);
end;
end;
procedure TLogThread.SyncWrite;
begin
critWrite.Acquire;
WriteFromPseWow(currMessage);
critWrite.Release;
end;
procedure TLogThread.WriteFromPseWow(AString: String);
var
mt : TMsgType;
iPos, iPos2 : Integer;
bEOL : Boolean;
NewCommand : TPseuWowCMD;
begin
//TT: Assume we have EOL
bEOL := True;
NewCommand := pwUnknown;
//TT: Remove the current command display to minimise spam
if frmMain.chkCleanMessages.Checked then
begin
//Get Our New Command
if AnsiPos('<say>:', AString) <> 0 then
NewCommand := pwSay;
//May cause a problem if there is more than cmd data in a received string
//if (currCommand <> pwUnknown) and (NewCommand = currCommand) then
// Exit;
//We have a new command
if (NewCommand = pwUnknown) and (currCommand <> pwUnknown) then
begin
//Remove redundent PW Command Text
if (currCommand = pwSay) then
AnsiReplaceText(AString, '<say>', '');
end
else
currCommand := NewCommand;
end;
try
if Trim(AString) <> '' then
begin
if LeftStr(AString, 8) = 'SYSMSG: ' then
begin
//Check for end of line |r
if AnsiPos('|r',AString) = 0 then
begin
bEOL := False;
Exit;
end;
AString := AnsiReplaceText(AString,'|r','');
if frmMain.chkCleanMessages.Checked then
begin
AString := AnsiReplaceText(AString,'SYSMSG: ','');
AString := AnsiReplaceText(AString, '"', '');
end;
//Clean Ups for Say Outputs like lookup etc.
if frmMain.chkCleanMessages.Checked then
begin
if AnsiContainsText(AString, '|Hquest') then
begin
AString := AddHilightedItem(AString,'quest');
end;
if AnsiContainsText(AString, '|Hitem') then
begin
AString := AddHilightedItem(AString,'item');
end;
if AnsiContainsText(AString, '|Htele') then
begin
AString := AddHilightedItem(AString,'tele');
end;
if AnsiContainsText(AString, '|Hspell') then
begin
AString := AddHilightedItem(AString,'spell');
end;
if AnsiContainsText(AString, '|Hcreature') then
begin
AString := AddHilightedItem(AString,'creature');
end;
if AnsiContainsText(AString, '|Hobject') then
begin
AString := AddHilightedItem(AString,'object');
end;
end;
AddColourToLine(frmMain.Console,AString, );
Exit;
end;
if frmMain.chkCleanMessages.Checked then
AString := AnsiReplaceText(AString, '"', '');
AString := AnsiReplaceText(AString,'|r','');
if LeftStr(AString, 6) = 'CHAT: ' then
begin
if frmMain.chkCleanMessages.Checked then
AString := AnsiReplaceText(AString,'CHAT: ','');
AddColourToLine(frmMain.Console, AString, clWhite);
Exit;
end;
//Are we doing clean messages?
if frmMain.chkCleanMessages.Checked then
begin
AnsiReplaceText(AString,'"','');
end;
//TT: Check for known string headers and color accordingly
if LeftStr(AString, 6) = 'WHISP:' then
begin
if frmMain.chkCleanMessages.Checked then
AString := AnsiReplaceText(AString,'WHISP: ','');
AddColouredLine(frmMain.Console,AString, $00FB00FB);
Exit;
end;
if LeftStr(AString, 3) = 'TO ' then
begin
if frmMain.chkCleanMessages.Checked then
AString := AnsiReplaceText(AString,'TO ','');
AddColouredLine(frmMain.Console,AString, $00FB00FB);
Exit;
end;
if LeftStr(AString, 7) = 'EMOTE: ' then
begin
if frmMain.chkCleanMessages.Checked then
AString := AnsiReplaceText(AString,'EMOTE: ','');
AddColouredLine(frmMain.Console,AString, clYellow);
Exit;
end;
if LeftStr(AString, 6) = 'MOTD: ' then
begin
if frmMain.chkCleanMessages.Checked then
AString := AnsiReplaceText(AString,'MOTD: ','');
AddColouredLine(frmMain.Console,AString, clAqua);
Exit;
end;
//This doesnt ADD any color at the moment it just seems to clean up the string a bit
AddColourToLine(frmMain.Console,AString);
end;
finally
if bEOL then
currMessage := '';
end;
end;
{---------TfrmMain-------------------------------------------------------------\
\------------------------------------------------------------------------------}
procedure TfrmMain.FormCreate(Sender: TObject);
begin
RC_LineOut:=MyLineOut; // set Output
Logger := TLogThread.Create;
Logger.Resume;
SetupIcons;
LoadSettings;
Ready := False;
@ -95,7 +377,7 @@ begin
IniFile.WriteString('Execute','Application',txtExe.Text);
IniFile.UpdateFile;
IniFile.Free;
RC_Run(txtExe.text); // run console program
RC_Run(txtExe.text); // run frmMain.Console program
end;
procedure TfrmMain.btnExitClick(Sender: TObject);
@ -121,14 +403,6 @@ begin
begin
Port := 8089;
Open;
if (Active) then
begin
Close;
servRemote.Active := False;
end
else
servRemote.Active := True;
end;
@ -176,6 +450,9 @@ end;
procedure TfrmMain.FormDestroy(Sender: TObject);
begin
Logger.Terminate;
FreeAndNil(Logger);
servRemote.Active := False;
end;
@ -215,7 +492,8 @@ begin
end
else
begin
Log('Error in Checking For Listening', clMaroon);
Log('No Listening Console', clGreen);
servRemote.Active := True;
ErrorCode := 0;
end;
end;
@ -242,7 +520,7 @@ end;
procedure TfrmMain.Log(AText: String; Color: TColor);
begin
AddColouredLine(Console,'CONSOLE: '+AText, Color);
AddColouredLine(frmMain.Console,'Console: '+AText, Color);
end;
@ -252,6 +530,7 @@ var
i : Integer;
begin
ScrollMessage.Msg := WM_VScroll;
for i := 0 to Console.Lines.Count do
begin
ScrollMessage.ScrollCode := sb_LineDown;
@ -265,7 +544,7 @@ procedure TfrmMain.comCommandKeyDown(Sender: TObject; var Key: Word;
begin
if key = VK_RETURN then
begin
if ConsoleCommand(comCommand.Text) then
if frmMain.ConsoleCommand(comCommand.Text) then
begin
key := 0;
Exit;
@ -276,7 +555,17 @@ begin
AddHistoryItem(comCommand.Text);
comCommand.Text := '';
key:=0;
Exit;
end;
if key = VK_F3 then
begin
if comCommand.Items.Count > 0 then
comCommand.ItemIndex := comCommand.Items.Count -1;
Key := 0;
Exit;
end;
end;
procedure TfrmMain.clientSockConnecting(Sender: TObject;
@ -293,13 +582,6 @@ begin
end;
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
@ -316,7 +598,7 @@ begin
Result := False;
AString := UpperCase(AString);
if (AString = 'QUIT') or (AString = 'EXIT') then
if (AString = '!QUIT') or (AString = '!EXIT') then
begin
Result := True;
ShutDown;
@ -425,7 +707,7 @@ begin
if EvaluateProperty(sBuffer, 'charname=', sRes) then
begin
txtChar.Caption := sRes;
Application.Title := sRes + ' - PseuWoW Console';
Application.Title := sRes + ' - PseuWoW frmMain.Console';
TrayIcon.Hint := Application.Title;
end;
end;

View File

@ -4,9 +4,10 @@ interface
uses SysUtils, Classes, StdCtrls, ComCtrls, Graphics, StrUtils, Windows;
procedure AddColouredLine(ARichEdit : TRichEdit; AText : String; AColor : TColor);
procedure AddColourToLine(ARichEdit : TRichEdit; AText : String);
procedure AddColourToLine(ARichEdit : TRichEdit; AText : String; ADefautColor : TColor = clLime);
function HexToColor(sColor : String): TColor;
function AddHilightedItem(AString, AHText : String): string;
implementation
@ -21,14 +22,18 @@ begin
end;
end;
procedure AddColourToLine(ARichEdit : TRichEdit; AText : String);
procedure AddColourToLine(ARichEdit : TRichEdit; AText : String; ADefautColor : TColor);
var
i : Integer;
myColor : TColor;
sTemp : String;
begin
myColor := ADefautColor;
i := AnsiPos('|c',LowerCase(AText));
//TODO read multicolured lines
while i <> 0 do
begin
if UpperCase(Copy(AText, i, 4)) = '|CFF' then
@ -41,7 +46,6 @@ begin
myColor := HexToColor(sTemp);
AText := AnsiReplaceText(AText,'|CFF'+sTemp,'');
AddColouredLine(ARichEdit, AText, myColor);
{
SelStart := Length(AText) - i;
SelAttributes.Color := myColor;
@ -52,10 +56,10 @@ begin
i := AnsiPos('|c',LowerCase(AText));
end
else
i := 0;
break;
end;
ARichEdit.Lines.Add(AText);
AddColouredLine(ARichEdit, AText, myColor);
end;
function HexToColor(sColor : String): TColor;
@ -68,4 +72,24 @@ begin
);
end;
function AddHilightedItem(AString, AHText : String): string;
var
iPos, iPos2 : Integer;
begin
if AnsiContainsText(AString, '|H'+AHText) then
begin
iPos := AnsiPos('|H' + AHText, AString);
iPos2 := AnsiPos(']', AString);
Result := Copy(AString, 0, iPos - 1);
iPos := AnsiPos('[', AString);
Result := Result + Copy(AString, iPos, iPos2);
Result := AnsiReplaceText(Result, '|h','');
end;
end;
end.