贴贴偶这的源码,想做个A3机器人,弄了个头就没时间做了,自己看看把,游戏里按小键盘的 * 呼出<br>改成别的你可以换<br>if ((lParam and $80000000) = 0) and (wParam = $6A) then<br>这一行<br><br>A3Main.pas<br>-----------------<br>unit A3Main;<br><br>interface<br><br>uses<br> Windows, Forms, StdCtrls, ComCtrls, shellApi, ExtCtrls, Menus,<br> Controls, Classes, Graphics;<br><br>type<br> TFrmMain = class(TForm)<br> BtnLogin: TButton;<br> procedure BtnLoginClick(Sender: TObject);<br> procedure FormDestroy(Sender: TObject);<br> procedure FormCreate(Sender: TObject);<br> procedure FormHide(Sender: TObject);<br> private<br> { Private declarations }<br> public<br> { Public declarations }<br> end;<br><br>var<br> FrmMain: TFrmMain;<br><br>implementation<br><br>{$R *.dfm}<br>function sethook: bool; external 'a3bot.dll';<br>function endhook: bool; external 'a3bot.dll';<br>function Gowindow: bool; external 'a3bot.dll';<br><br>procedure TFrmMain.BtnLoginClick(Sender: TObject);<br>begin<br> sethook;<br>// if frmmain.gotoWindowMode.Checked then Gowindow;<br> BtnLogin.Enabled := False;<br>end;<br><br>procedure TFrmMain.FormDestroy(Sender: TObject);<br>begin<br> endhook;<br>end;<br><br>procedure TFrmMain.FormCreate(Sender: TObject);<br>begin<br> //cbAccountType.ItemIndex := 0;<br> //edUserName.Text := Encode(cbAccountType.Text);<br>end;<br>end.<br><br>-----------------<br>A3BOT.DPR<br>-----------------<br>library A3BOT;<br><br>uses<br> SysUtils,<br> Classes,<br> Windows,<br> PopWin in 'PopWin.pas' {FrmPopWin},<br> Hook in 'Hook.pas';<br><br>{$R *.res}<br><br>exports sethook, endhook, Encode, Decode,Gowindow;<br>begin<br> hNextHookProc := 0;<br> procSaveExit := ExitProc;<br> ExitProc := @HotKeyHookExit;<br>end.<br>-----------------<br>HOOK.PAS<br>-----------------<br>unit Hook;<br><br>interface<br><br>uses Windows, Messages, Dialogs, Sysutils, PopWin;<br><br>var<br> hNextHookProc: HHook;<br> procSaveExit: Pointer;<br> OldHook: HHOOK;<br> WinFind: Integer;<br> MuProcId: DWORD;<br> OldProc: FARPROC;<br> Style: Longint;<br> swl: longint;<br> gowin: boolean;<br>function sethook: bool; export;<br>function Gowindow: bool; export;<br>function WinA3(hwnd:HWND):bool;export;<br>function MyProc(Hwnd:HWND;iCode:UINT;wParam:WPARAM;lParam:LPARAM):integer; stdcall;<br>function hookproc(iCode: Integer; wParam: WPARAM; lParam: LPARAM):LRESULT; stdcall;<br>function endhook: bool; export;<br>procedure HotKeyHookExit; far;<br><br>implementation<br><br>function WinA3(hwnd:HWND):bool;export;<br>begin<br>style:=getwindowlong(hwnd,GWL_STYLE);<br>style:=WS_CAPTION;<br>setwindowlong(hwnd,GWL_STYLE,style);<br>showwindow(hwnd,SW_SHOWNORMAL);<br>oldproc:=FARPROC(getwindowlong(hwnd,GWL_WNDPROC));<br>swl:=setwindowlong(hwnd,GWL_WNDPROC,longint(@MyProc));<br>result:=true;<br>end;<br><br>function MyProc(Hwnd:HWND;iCode:UINT;wParam:WPARAM;lParam:LPARAM):integer; stdcall;<br>begin<br>if (iCode=WM_ACTIVATEAPP) or (iCode=WM_ACTIVATE) OR (iCode=WM_KILLFOCUS) or (iCode=WM_SETFOCUS) then<br>exit;<br>result:=CallWindowProc(oldproc,hwnd,iCode,wparam,lparam);<br>end;<br><br>function HookProc(iCode: integer; wParam: wParam; lParam: lParam):LResult; stdcall;<br>var<br> hwnd: dword;<br> AppRect: TRect;<br> title: pchar;<br>begin<br> result := 0;<br> title := '';<br> if iCode < 0 then<br> begin<br> CallNextHookEx(hnexthookproc, iCode, wParam, lParam);<br> result := 0;<br> Exit;<br> end;<br> if ((lParam and $80000000) = 0) and (wParam = $6A) then<br> begin<br> hwnd := getforegroundwindow;<br> try<br> GetMem(title, 255);<br> getwindowtext(hwnd, title, 255);<br> if (title = 'pRoJeCtAaA') or (title = 'ProjectA3') or (title = 'Project A3') then<br> begin<br> if gowin then WinA3(hwnd);<br> try<br> Messagebeep(0);<br> FrmPopWin := TFrmPopWin.CreateParented(hwnd);<br> GetWindowRect(hwnd, AppRect);<br> FrmPopWin.Caption := title + ' A3 机器人';<br> FrmPopWin.Show;<br> finally<br> //FrmPopWin.Free;<br> end;<br> end;<br> finally<br> FreeMem(title);<br> end;<br> result := 1;<br> end;<br>end;<br><br>function sethook: bool; export;<br>begin<br> result := false;<br> if hnexthookproc <> 0 then<br> exit;<br> hNextHookProc := SetWindowsHookEx(WH_KEYBOARD, hookproc, HInstance, 0);<br> Result := hNextHookProc <> 0;<br>end;<br><br>procedure hotkeyhookexit;<br>begin<br> if hNextHookProc <> 0 then<br> endHook;<br> ExitProc := procSaveExit;<br>end;<br><br>function endhook: bool; export;<br>begin<br> if hNextHookProc <> 0 then<br> begin<br> UnhookWindowshookEx(hNextHookProc); // 解除 Keyboard Hook<br> hNextHookProc := 0;<br> end;<br> Result := hNextHookProc = 0;<br>end;<br><br>function Gowindow: bool; export;<br>begin<br>gowin:=true;<br>Result:= true;<br>end;<br>end.<br>-----------------<br>POPWIN.PAS<br>-----------------<br>unit PopWin;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Variants, Graphics, Controls, Forms,<br> Dialogs, ExtCtrls, ComCtrls, Buttons, StdCtrls, Classes;<br><br>type<br> TFrmPopWin = class(TForm)<br> PageControl1: TPageControl;<br> SheetInfo: TTabSheet;<br> ListViewInfo: TListView;<br> Check62: TCheckBox;<br> Check63: TCheckBox;<br> Check64: TCheckBox;<br> SheetChat: TTabSheet;<br> Label2: TLabel;<br> Label3: TLabel;<br> Label11: TLabel;<br> Label13: TLabel;<br> SpeedButton1: TSpeedButton;<br> SpeedButton2: TSpeedButton;<br> SpeedButton3: TSpeedButton;<br> SpeedButton4: TSpeedButton;<br> SpeedButton5: TSpeedButton;<br> SpeedButton6: TSpeedButton;<br> Label4: TLabel;<br> SpeedButton10: TSpeedButton;<br> SpeedButton11: TSpeedButton;<br> SpeedButton12: TSpeedButton;<br> eAutoReply: TComboBox;<br> AutoSayMemo: TMemo;<br> edAutoSay: TEdit;<br> UpDown1: TUpDown;<br> GroupBox7: TGroupBox;<br> Check72: TCheckBox;<br> Check73: TCheckBox;<br> Check74: TCheckBox;<br> Check75: TCheckBox;<br> Check76: TCheckBox;<br> Check77: TCheckBox;<br> cmFriends: TComboBox;<br> cmBlacks: TComboBox;<br> cmEnemy: TComboBox;<br> Check65: TCheckBox;<br> Check67: TCheckBox;<br> Check66: TCheckBox;<br> Check68: TCheckBox;<br> Check69: TCheckBox;<br> Check70: TCheckBox;<br> Check71: TCheckBox;<br> Check78: TCheckBox;<br> Check79: TCheckBox;<br> SheetChatHistory: TTabSheet;<br> Bevel1: TBevel;<br> BtnClearChatHistory: TSpeedButton;<br> ChatHistory: TListBox;<br> Check80: TCheckBox;<br> Check81: TCheckBox;<br> Check82: TCheckBox;<br> SheetNoteBook: TTabSheet;<br> Label14: TLabel;<br> MemoNoteBook: TMemo;<br> Check83: TCheckBox;<br> SheetMaps: TTabSheet;<br> PnMaps3: TPanel;<br> pbPoint: TPaintBox;<br> PaintBox1: TPaintBox;<br> ImgMap: TImage;<br> PnMaps2: TPanel;<br> Label15: TLabel;<br> edSelectMap: TEdit;<br> BitBtn1: TBitBtn;<br> rbOrgin: TRadioButton;<br> rbZoom: TRadioButton;<br> tvMaps: TTreeView;<br> SheetTask: TTabSheet;<br> Splitter1: TSplitter;<br> TaskTreeView: TTreeView;<br> TaskMemo: TMemo;<br> SheetObject: TTabSheet;<br> BtnResetObj: TSpeedButton;<br> BtnAddObj: TSpeedButton;<br> BtnDelObj: TSpeedButton;<br> ObjListView: TListView;<br> EditAddObj: TEdit;<br> SheetOthers: TTabSheet;<br> Label19: TLabel;<br> SpeedButton8: TSpeedButton;<br> Label5: TLabel;<br> GroupBox13: TGroupBox;<br> MagicListView: TListView;<br> GroupBox14: TGroupBox;<br> BtnAddBoss: TSpeedButton;<br> BtnDelBoss: TSpeedButton;<br> EditAddBoss: TEdit;<br> BossListView: TListView;<br> CmbCommand: TComboBox;<br> SheetGuaJi: TTabSheet;<br> GroupBox1: TGroupBox;<br> GroupBox3: TGroupBox;<br> Check86: TCheckBox;<br> GroupBox6: TGroupBox;<br> ComboBox1: TComboBox;<br> ComboBox2: TComboBox;<br> RadioButton1: TRadioButton;<br> RadioButton2: TRadioButton;<br> Check84: TCheckBox;<br> Check85: TCheckBox;<br> GroupBox2: TGroupBox;<br> Label1: TLabel;<br> ComboBox4: TComboBox;<br> GroupBox4: TGroupBox;<br> BtnGuaJi: TButton;<br> GroupBox5: TGroupBox;<br> Check10: TCheckBox;<br> procedure Check10Click(Sender: TObject);<br> private<br> { Private declarations }<br> public<br> { Public declarations }<br> end;<br><br>var<br> FrmPopWin: TFrmPopWin;<br><br>implementation<br>{$R *.dfm}<br><br>procedure TFrmPopWin.Check10Click(Sender: TObject);<br>begin<br> if Check10.Checked = True then<br> mouse_event(MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0);<br> if Check10.Checked = False then<br> mouse_event(MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0);<br>end;<br>end.<br>-----------------<br>POPWIN.DFM<br>-----------------<br>object FrmPopWin: TFrmPopWin<br> Left = 193<br> Top = 103<br> BorderStyle = bsDialog<br> Caption = 'A3'#26426#22120#20154<br> ClientHeight = 301<br> ClientWidth = 385<br> Color = clBtnFace<br> Font.Charset = DEFAULT_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -11<br> Font.Name = 'MS Sans Serif'<br> Font.Style = []<br> OldCreateOrder = False<br> Position = poDefault<br> Visible = True<br> PixelsPerInch = 96<br> TextHeight = 13<br> object PageControl1: TPageControl<br> Left = 0<br> Top = 0<br> Width = 385<br> Height = 301<br> ActivePage = SheetGuaJi<br> Align = alClient<br> Font.Charset = ANSI_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = []<br> HotTrack = True<br> ParentFont = False<br> TabIndex = 8<br> TabOrder = 0<br> TabStop = False<br> TabWidth = 29<br> object SheetInfo: TTabSheet<br> Caption = #20449#24687<br> ImageIndex = 11<br> object ListViewInfo: TListView<br> Left = 0<br> Top = 0<br> Width = 377<br> Height = 256<br> Align = alTop<br> Columns = <<br> item<br> Caption = #21517#31216<br> Width = 150<br> end<br> item<br> Alignment = taCenter<br> Caption = #26041#20301<br> Width = 40<br> end<br> item<br> Alignment = taCenter<br> Caption = #22352#26631<br> Width = 80<br> end<br> item<br> Alignment = taCenter<br> Caption = #31867#22411<br> end><br> ColumnClick = False<br> Font.Charset = ANSI_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = []<br> FlatScrollBars = True<br> GridLines = True<br> OwnerDraw = True<br> ReadOnly = True<br> ParentFont = False<br> TabOrder = 0<br> ViewStyle = vsReport<br> end<br> object Check62: TCheckBox<br> Left = 74<br> Top = 257<br> Width = 73<br> Height = 17<br> Caption = #26174#31034#29609#23478<br> Checked = True<br> State = cbChecked<br> TabOrder = 1<br> end<br> object Check63: TCheckBox<br> Left = 162<br> Top = 257<br> Width = 71<br> Height = 17<br> Caption = #26174#31034#24618#29289<br> Checked = True<br> State = cbChecked<br> TabOrder = 2<br> end<br> object Check64: TCheckBox<br> Left = 250<br> Top = 257<br> Width = 73<br> Height = 17<br> Caption = #26174#31034'NPC'<br> Checked = True<br> State = cbChecked<br> TabOrder = 3<br> end<br> end<br> object SheetChat: TTabSheet<br> Caption = #32842#22825<br> ImageIndex = 2<br> object Label2: TLabel<br> Left = 146<br> Top = 47<br> Width = 12<br> Height = 12<br> Caption = #31186<br> end<br> object Label3: TLabel<br> Left = 79<br> Top = 47<br> Width = 24<br> Height = 12<br> Caption = #38388#38548<br> end<br> object Label11: TLabel<br> Left = 8<br> Top = 193<br> Width = 36<br> Height = 12<br> Caption = #22909' '#21451<br> Font.Charset = ANSI_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = []<br> ParentFont = False<br> end<br> object Label13: TLabel<br> Left = 8<br> Top = 246<br> Width = 36<br> Height = 12<br> Caption = #40657#21517#21333<br> Font.Charset = ANSI_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = []<br> ParentFont = False<br> end<br> object SpeedButton1: TSpeedButton<br> Tag = -1<br> Left = 206<br> Top = 187<br> Width = 33<br> Height = 19<br> Caption = #32842#22825<br> Font.Charset = ANSI_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = []<br> ParentFont = False<br> end<br> object SpeedButton2: TSpeedButton<br> Tag = -1<br> Left = 243<br> Top = 187<br> Width = 33<br> Height = 19<br> Caption = #28155#21152<br> Font.Charset = ANSI_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = []<br> ParentFont = False<br> end<br> object SpeedButton3: TSpeedButton<br> Tag = -1<br> Left = 279<br> Top = 187<br> Width = 33<br> Height = 19<br> Caption = #21024#38500<br> Font.Charset = ANSI_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = []<br> ParentFont = False<br> end<br> object SpeedButton4: TSpeedButton<br> Tag = -1<br> Left = 206<br> Top = 242<br> Width = 33<br> Height = 19<br> Caption = #32842#22825<br> Font.Charset = ANSI_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = []<br> ParentFont = False<br> end<br> object SpeedButton5: TSpeedButton<br> Tag = -1<br> Left = 243<br> Top = 242<br> Width = 33<br> Height = 19<br> Caption = #28155#21152<br> Font.Charset = ANSI_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = []<br> ParentFont = False<br> end<br> object SpeedButton6: TSpeedButton<br> Tag = -1<br> Left = 279<br> Top = 242<br> Width = 33<br> Height = 19<br> Caption = #21024#38500<br> Font.Charset = ANSI_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = []<br> ParentFont = False<br> end<br> object Label4: TLabel<br> Left = 8<br> Top = 219<br> Width = 36<br> Height = 12<br> Caption = #20167' '#25932<br> Font.Charset = ANSI_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = []<br> ParentFont = False<br> end<br> object SpeedButton10: TSpeedButton<br> Tag = -1<br> Left = 206<br> Top = 215<br> Width = 33<br> Height = 19<br> Caption = #32842#22825<br> Font.Charset = ANSI_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = []<br> ParentFont = False<br> end<br> object SpeedButton11: TSpeedButton<br> Tag = -1<br> Left = 243<br> Top = 215<br> Width = 33<br> Height = 19<br> Caption = #28155#21152<br> Font.Charset = ANSI_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = []<br> ParentFont = False<br> end<br> object SpeedButton12: TSpeedButton<br> Tag = -1<br> Left = 279<br> Top = 215<br> Width = 33<br> Height = 19<br> Caption = #21024#38500<br> Font.Charset = ANSI_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = []<br> ParentFont = False<br> end<br> object eAutoReply: TComboBox<br> Tag = -1<br> Left = 80<br> Top = 9<br> Width = 201<br> Height = 20<br> ItemHeight = 12<br> MaxLength = 190<br> TabOrder = 0<br> Items.Strings = (<br> #24744#22909#65292#25105#26377#20107#19981#22312<br> #25105#21435#21507#39277#20102'....'<br> #25346#26426#20013'....'<br> #25346#26426#32451#21151' '#35831#21247#25171#25200)<br> end<br> object AutoSayMemo: TMemo<br> Tag = -1<br> Left = 8<br> Top = 65<br> Width = 361<br> Height = 51<br> Font.Charset = ANSI_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = []<br> MaxLength = 190<br> ParentFont = False<br> ScrollBars = ssVertical<br> TabOrder = 1<br> end<br> object edAutoSay: TEdit<br> Tag = -1<br> Left = 105<br> Top = 43<br> Width = 21<br> Height = 20<br> MaxLength = 2<br> TabOrder = 2<br> Text = '14'<br> end<br> object UpDown1: TUpDown<br> Tag = -1<br> Left = 126<br> Top = 43<br> Width = 15<br> Height = 20<br> Associate = edAutoSay<br> Min = 2<br> Max = 99<br> Position = 14<br> TabOrder = 3<br> Wrap = False<br> end<br> object GroupBox7: TGroupBox<br> Left = 8<br> Top = 130<br> Width = 361<br> Height = 44<br> Caption = #32842#22825#20869#23481#36807#28388<br> Font.Charset = ANSI_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = []<br> ParentFont = False<br> TabOrder = 4<br> object Check72: TCheckBox<br> Left = 8<br> Top = 17<br> Width = 49<br> Height = 17<br> Caption = #20844#20849<br> TabOrder = 0<br> end<br> object Check73: TCheckBox<br> Left = 62<br> Top = 17<br> Width = 49<br> Height = 17<br> Caption = #21898#35805<br> TabOrder = 1<br> end<br> object Check74: TCheckBox<br> Left = 115<br> Top = 17<br> Width = 73<br> Height = 17<br> Caption = #36229#32423#21898#35805<br> TabOrder = 2<br> end<br> object Check75: TCheckBox<br> Left = 190<br> Top = 17<br> Width = 49<br> Height = 17<br> Caption = #34892#20250<br> TabOrder = 3<br> end<br> object Check76: TCheckBox<br> Left = 244<br> Top = 17<br> Width = 49<br> Height = 17<br> Caption = #31169#32842<br> TabOrder = 4<br> end<br> object Check77: TCheckBox<br> Left = 298<br> Top = 17<br> Width = 57<br> Height = 17<br> Caption = #40657#21517#21333<br> TabOrder = 5<br> end<br> end<br> object cmFriends: TComboBox<br> Tag = -1<br> Left = 48<br> Top = 187<br> Width = 156<br> Height = 20<br> Font.Charset = ANSI_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = []<br> ItemHeight = 0<br> MaxLength = 32<br> ParentFont = False<br> TabOrder = 5<br> end<br> object cmBlacks: TComboBox<br> Tag = -1<br> Left = 48<br> Top = 241<br> Width = 156<br> Height = 20<br> Font.Charset = ANSI_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = []<br> ItemHeight = 0<br> MaxLength = 32<br> ParentFont = False<br> TabOrder = 6<br> end<br> object cmEnemy: TComboBox<br> Tag = -1<br> Left = 48<br> Top = 214<br> Width = 156<br> Height = 20<br> Font.Charset = ANSI_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = []<br> ItemHeight = 0<br> MaxLength = 32<br> ParentFont = False<br> TabOrder = 7<br> end<br> object Check65: TCheckBox<br> Left = 8<br> Top = 11<br> Width = 73<br> Height = 17<br> Caption = #33258#21160#22238#22797<br> TabOrder = 8<br> end<br> object Check67: TCheckBox<br> Left = 8<br> Top = 45<br> Width = 65<br> Height = 17<br> Caption = #33258#21160#21457#35328<br> TabOrder = 9<br> end<br> object Check66: TCheckBox<br> Left = 296<br> Top = 11<br> Width = 73<br> Height = 17<br> Caption = #26469#35328#21457#22768<br> TabOrder = 10<br> end<br> object Check68: TCheckBox<br> Left = 180<br> Top = 45<br> Width = 46<br> Height = 17<br> Caption = #26222#36890<br> Checked = True<br> State = cbChecked<br> TabOrder = 11<br> end<br> object Check69: TCheckBox<br> Left = 229<br> Top = 45<br> Width = 46<br> Height = 17<br> Caption = #21898#35805<br> TabOrder = 12<br> end<br> object Check70: TCheckBox<br> Left = 278<br> Top = 45<br> Width = 46<br> Height = 17<br> Caption = #23567#32452<br> TabOrder = 13<br> end<br> object Check71: TCheckBox<br> Left = 328<br> Top = 45<br> Width = 46<br> Height = 17<br> Caption = #34892#20250<br> TabOrder = 14<br> end<br> object Check78: TCheckBox<br> Left = 322<br> Top = 188<br> Width = 49<br> Height = 17<br> Caption = #25552#37266<br> TabOrder = 15<br> end<br> object Check79: TCheckBox<br> Left = 322<br> Top = 215<br> Width = 49<br> Height = 17<br> Caption = #25552#37266<br> TabOrder = 16<br> end<br> end<br> object SheetChatHistory: TTabSheet<br> Caption = #35760#24405<br> ImageIndex = 8<br> object Bevel1: TBevel<br> Left = 0<br> Top = 0<br> Width = 377<br> Height = 249<br> Align = alTop<br> Style = bsRaised<br> end<br> object BtnClearChatHistory: TSpeedButton<br> Tag = -1<br> Left = 334<br> Top = 251<br> Width = 41<br> Height = 20<br> Caption = #28165#31354<br> end<br> object ChatHistory: TListBox<br> Left = 7<br> Top = 8<br> Width = 364<br> Height = 233<br> TabStop = False<br> Style = lbOwnerDrawVariable<br> BevelInner = bvLowered<br> BevelOuter = bvRaised<br> Color = clBlack<br> ExtendedSelect = False<br> Font.Charset = GB2312_CHARSET<br> Font.Color = clWhite<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = []<br> ItemHeight = 56<br> ParentFont = False<br> TabOrder = 0<br> end<br> object Check80: TCheckBox<br> Left = 8<br> Top = 253<br> Width = 97<br> Height = 17<br> Caption = #21551#29992#26469#35328#35760#24405<br> Checked = True<br> State = cbChecked<br> TabOrder = 1<br> end<br> object Check81: TCheckBox<br> Left = 112<br> Top = 253<br> Width = 49<br> Height = 17<br> Caption = #28378#23631<br> Checked = True<br> State = cbChecked<br> TabOrder = 2<br> end<br> object Check82: TCheckBox<br> Left = 168<br> Top = 253<br> Width = 97<br> Height = 17<br> Caption = #36807#28388#30456#21516#30340#35805<br> Checked = True<br> State = cbChecked<br> TabOrder = 3<br> end<br> end<br> object SheetNoteBook: TTabSheet<br> Caption = #20415#31546<br> ImageIndex = 9<br> object Label14: TLabel<br> Left = 5<br> Top = 257<br> Width = 228<br> Height = 12<br> Caption = #25552#37266': '#35831#19981#35201#25226'"'#23494#30721'"'#31561#37325#35201#20449#24687#20889#22312#36825#37324<br> end<br> object MemoNoteBook: TMemo<br> Left = 0<br> Top = 0<br> Width = 377<br> Height = 249<br> Align = alTop<br> Lines.Strings = (<br> '')<br> ScrollBars = ssBoth<br> TabOrder = 0<br> end<br> object Check83: TCheckBox<br> Left = 301<br> Top = 254<br> Width = 73<br> Height = 17<br> Caption = #33258#21160#20445#23384<br> TabOrder = 1<br> end<br> end<br> object SheetMaps: TTabSheet<br> Caption = #22320#22270<br> ImageIndex = 10<br> object PnMaps3: TPanel<br> Left = 0<br> Top = 22<br> Width = 377<br> Height = 252<br> Align = alClient<br> BevelOuter = bvLowered<br> TabOrder = 0<br> object pbPoint: TPaintBox<br> Left = 216<br> Top = 128<br> Width = 65<br> Height = 65<br> end<br> object PaintBox1: TPaintBox<br> Left = 0<br> Top = 0<br> Width = 249<br> Height = 169<br> Visible = False<br> end<br> object ImgMap: TImage<br> Left = 0<br> Top = 0<br> Width = 233<br> Height = 145<br> end<br> end<br> object PnMaps2: TPanel<br> Left = 0<br> Top = 0<br> Width = 377<br> Height = 22<br> Align = alTop<br> BevelOuter = bvNone<br> TabOrder = 1<br> object Label15: TLabel<br> Left = 2<br> Top = 4<br> Width = 24<br> Height = 12<br> Caption = #36873#25321<br> end<br> object edSelectMap: TEdit<br> Left = 30<br> Top = 0<br> Width = 187<br> Height = 20<br> Font.Charset = GB2312_CHARSET<br> Font.Color = clWindowText<br> Font.Height = -12<br> Font.Name = #23435#20307<br> Font.Style = [fsBold]<br> ParentFont = False<br> ReadOnly = True<br> TabOrder = 0<br> end<br> object BitBtn1: TBitBtn<br> Left = 199<br> Top = 2<br> Width = 16<br> Height = 14<br> TabOrder = 1<br> TabStop = False<br> Glyph.Data = {<br> D6080000424DD60800000000000036080000280000000A000000080000000100<br> 100003000000A000000000000000000000000001000000000000007C0000E003<br> 00001F0000000000000000008000008000000080800080000000800080008080<br> 0000C0C0C000C0DCC000F0CAA6000020400000206000002080000020A0000020<br> C0000020E00000400000004020000040400000406000004080000040A0000040<br> C0000040E00000600000006020000060400000606000006080000060A0000060<br> C0000060E00000800000008020000080400000806000008080000080A0000080<br> C0000080E00000A0000000A0200000A0400000A0600000A0800000A0A00000A0<br> C00000A0E00000C0000000C0200000C0400000C0600000C0800000C0A00000C0<br> C00000C0E00000E0000000E0200000E0400000E0600000E0800000E0A00000E0<br> C00000E0E00040000000400020004000400040006000400080004000A0004000<br> C0004000E00040200000402020004020400040206000402080004020A0004020<br> C0004020E00040400000404020004040400040406000404080004040A0004040<br> C0004040E00040600000406020004060400040606000406080004060A0004060<br> C0004060E00040800000408020004080400040806000408080004080A0004080<br> C0004080E00040A0000040A0200040A0400040A0600040A0800040A0A00040A0<br> C00040A0E00040C0000040C0200040C0400040C0600040C0800040C0A00040C0<br> C00040C0E00040E0000040E0200040E0400040E0600040E0800040E0A00040E0<br> C00040E0E00080000000800020008000400080006000800080008000A0008000<br> C0008000E00080200000802020008020400080206000802080008020A0008020<br> C0008020E00080400000804020008040400080406000804080008040A0008040<br> C0008040E00080600000806020008060400080606000806080008060A0008060<br> C0008060E00080800000808020008080400080806000808080008080A0008080<br> C0008080E00080A0000080A0200080A0400080A0600080A0800080A0A00080A0<br> C00080A0E00080C0000080C0200080C0400080C0600080C0800080C0A00080C0<br> C00080C0E00080E0000080E0200080E0400080E0600080E0800080E0A00080E0<br> C00080E0E000C0000000C0002000C0004000C0006000C0008000C000A000C000<br> C000C000E000C0200000C0202000C0204000C0206000C0208000C020A000C020<br> C000C020E000C0400000C0402000C0404000C0406000C0408000C040A000C040<br> C000C040E000C0600000C0602000C0604000C0606000C0608000C060A000C060<br> C000C060E000C0800000C0802000C0804000C0806000C0808000C080A000C080<br> C000C080E000C0A00000C0A02000C0A04000C0A06000C0A08000C0A0A000C0A0<br> C000C0A0E000C0C00000C0C02000C0C04000C0C06000C0C08000C0C0A000F0FB<br> FF00A4A0A000808080000000FF0000FF000000FFFF00FF000000FF00FF00FFFF<br> 0000FFFFFF00FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F<br> FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F00000000FF7FFF7FFF7F<br> FF7FFF7FFF7FFF7F0000000000000000FF7FFF7FFF7FFF7FFF7F000000000000<br> 000000000000FF7FFF7FFF7F00000000000000000000000000000000FF7FFF7F<br> FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F<br> FF7FFF7FFF7F}<br> end<br> object rbOrgin: TRadioButton<br> Left = 304<br> Top = 2<br> Width = 68<br> Height = 17<br> Caption = #21407#22987#22823#23567<br> TabOrder = 2<br> end<br> object rbZoom: TRadioButton<br> Left = 232<br> Top = 2<br> Width = 68<br> Height = 17<br> Caption = #33258#21160#36866#24212<br> Checked = True<br> TabOrder = 3<br> TabStop = True<br> end<br> end<br> object tvMaps: TTreeView<br> Left = 30<br> Top = 21<br> Width = 187<br> Height = 125<br> Ctl3D = False<br> Indent = 19<br> ParentCtl3D = False<br> ReadOnly = True<br> TabOrder = 2<br> Visible = False<br> end<br> end<br> object SheetTask: TTabSheet<br> Caption = #20219#21153<br> ImageIndex = 5<br> object Splitter1: TSplitter<br> Left = 0<br> Top = -28<br> Width = 377<br> Height = 257<br> Cursor = crVSplit<br> Align = alBottom<br> end<br> object TaskTreeView: TTreeView<br> Left = 0<br> Top = 0<br> Width = 377<br> Height = 229<br> Align = alClient<br> Indent = 19<br> ReadOnly = True<br> RightClickSelect = True<br> TabOrder = 1<br> end<br> object TaskMemo: TMemo<br> Left = 0<br> Top = 229<br> Width = 377<br> Height = 45<br> Align = alBottom<br> ReadOnly = True<br> TabOrder = 0<br> end<br> end<br> object SheetObject: TTabSheet<br> Caption = #29289#21697<br> ImageIndex = 6<br> object BtnResetObj: TSpeedButton<br> Left = 309<br> Top = 247<br> Width = 59<br> Height = 21<br> Caption = #24674#22797#40664#35748<br> end<br> object BtnAddObj: TSpeedButton<br> Left = 137<br> Top = 247<br> Width = 21<br> Height = 19<br> Caption = #65291<br> end<br> object BtnDelObj: TSpeedButton<br> Left = 161<br> Top = 247<br> Width = 21<br> Height = 19<br> Caption = #65293<br> end<br> object ObjListView: TListView<br> Left = 8<br> Top = 8<br> Width = 361<br> Height = 228<br> BevelWidth = 0<br> Columns = <<br> item<br> Caption = #29289#21697#21517#31216<br> Width = 180<br> end<br> item<br> Alignment = taCenter<br> Caption = #25552#37266<br> Width = 36<br> end<br> item<br> Alignment = taCenter<br> Caption = #39068#33394<br> Width = 36<br> end<br> item<br> Alignment = taCenter<br> Caption = #25441#21462<br> Width = 36<br> end<br> item<br> Alignment = taCenter<br> Caption = #26174#31034<br> Width = 36<br> end><br> ColumnClick = False<br> FlatScrollBars = True<br> GridLines = True<br> HotTrack = True<br> ReadOnly = True<br> RowSelect = True<br> TabOrder = 0<br> ViewStyle = vsReport<br> end<br> object EditAddObj: TEdit<br> Left = 8<br> Top = 247<br> Width = 121<br> Height = 20<br> MaxLength = 40<br> TabOrder = 1<br> end<br> end<br> object SheetOthers: TTabSheet<br> Caption = #20854#23427<br> ImageIndex = 7<br> object Label19: TLabel<br> Left = 229<br> Top = 253<br> Width = 84<br> Height = 12<br> Caption = #38647#36798#20013#24618#29289#39068#33394<br> end<br> object SpeedButton8: TSpeedButton<br> Left = 161<br> Top = 250<br> Width = 35<br> Height = 20<br> Caption = #25191#34892<br> end<br> object Label5: TLabel<br> Left = 5<br> Top = 255<br> Width = 48<br> Height = 12<br> Caption = #29305#27530#21629#20196<br> end<br> object GroupBox13: TGroupBox<br> Left = 4<br> Top = 4<br> Width = 192<br> Height = 237<br> Caption = #39764#27861#38145#23450<br> TabOrder = 0<br> object MagicListView: TListView<br> Left = 8<br> Top = 16<br> Width = 176<br> Height = 215<br> BevelWidth = 0<br> Columns = <<br> item<br> Caption = #39764#27861#21517#31216<br> Width = 80<br> end<br> item<br> Alignment = taCenter<br> Caption = #38145#23450<br> Width = 36<br> end><br> ColumnClick = False<br> FlatScrollBars = True<br> GridLines = True<br> HotTrack = True<br> ReadOnly = True<br> RowSelect = True<br> TabOrder = 0<br> ViewStyle = vsReport<br> end<br> end<br> object GroupBox14: TGroupBox<br> Left = 201<br> Top = 4<br> Width = 176<br> Height = 237<br> Caption = 'Boss'#21015#34920<br> TabOrder = 1<br> object BtnAddBoss: TSpeedButton<br> Left = 121<br> Top = 211<br> Width = 21<br> Height = 19<br> Caption = #65291<br> end<br> object BtnDelBoss: TSpeedButton<br> Left = 145<br> Top = 211<br> Width = 21<br> Height = 19<br> Caption = #65293<br> end<br> object EditAddBoss: TEdit<br> Left = 8<br> Top = 211<br> Width = 105<br> Height = 20<br> MaxLength = 40<br> TabOrder = 1<br> end<br> object BossListView: TListView<br> Left = 8<br> Top = 16<br> Width = 159<br> Height = 189<br> BevelWidth = 0<br> Columns = <<br> item<br> Caption = #24618#29289#21517#31216<br> Width = 100<br> end<br> item<br> Alignment = taCenter<br> Caption = #25552#37266<br> Width = 36<br> end><br> ColumnClick = False<br> FlatScrollBars = True<br> GridLines = True<br> HotTrack = True<br> ReadOnly = True<br> RowSelect = True<br> TabOrder = 0<br> ViewStyle = vsReport<br> end<br> end<br> object CmbCommand: TComboBox<br> Left = 56<br> Top = 250<br> Width = 102<br> Height = 20<br> Style = csDropDownList<br> ItemHeight = 12<br> TabOrder = 2<br> Items.Strings = (<br> '@'#21152#20837#34892#20250<br> '@'#36864#20986#34892#20250<br> '@'#20801#35768#22238#29983#26415<br> '@'#20801#35768#22825#22320#21512#19968<br> '@'#22825#22320#21512#19968<br> '@'#28155#21152#25104#21592<br> '@'#20801#35768#32467#30431<br> '@'#32467#30431)<br> end<br> end<br> object SheetGuaJi: TTabSheet<br> Caption = #25346#26426<br> ImageIndex = 12<br> object GroupBox1: TGroupBox<br> Left = 253<br> Top = 146<br> Width = 109<br> Height = 79<br> Caption = #20667#65314#24335#23547#24618<br> TabOrder = 0<br> Visible = False<br> end<br> object GroupBox3: TGroupBox<br> Left = 196<br> Top = 71<br> Width = 165<br> Height = 66<br> Caption = #25441#29289<br> TabOrder = 1<br> object Check86: TCheckBox<br> Left = 12<br> Top = 21<br> Width = 133<br> Height = 17<br> Caption = #20351#29992#29289#21697#25441#21462#35268#21017<br> TabOrder = 0<br> end<br> end<br> object GroupBox6: TGroupBox<br> Left = 12<br> Top = 18<br> Width = 173<br> Height = 119<br> Caption = #25112#26007<br> TabOrder = 2<br> object ComboBox1: TComboBox<br> Left = 70<br> Top = 84<br> Width = 84<br> Height = 20<br> Style = csDropDownList<br> ItemHeight = 12<br> TabOrder = 0<br> Items.Strings = (<br> #22238#22478<br> #21453#20987)<br> end<br> object ComboBox2: TComboBox<br> Left = 86<br> Top = 36<br> Width = 54<br> Height = 20<br> Style = csDropDownList<br> ItemHeight = 12<br> TabOrder = 1<br> Items.Strings = (<br> 'F1'<br> 'F2'<br> 'F3'<br> 'F4'<br> 'F5'<br> 'F6'<br> 'F7'<br> 'F8'<br> 'F9'<br> 'F10'<br> 'F11'<br> 'F12')<br> end<br> object RadioButton1: TRadioButton<br> Left = 12<br> Top = 22<br> Width = 70<br> Height = 17<br> Caption = #29289#29702#25915#20987<br> TabOrder = 2<br> end<br> object RadioButton2: TRadioButton<br> Left = 12<br> Top = 38<br> Width = 70<br> Height = 17<br> Caption = #39764#27861#25915#20987<br> TabOrder = 3<br> end<br> object Check84: TCheckBox<br> Left = 12<br> Top = 66<br> Width = 57<br> Height = 17<br> Caption = #19981#25250#24618<br> TabOrder = 4<br> end<br> object Check85: TCheckBox<br> Left = 12<br> Top = 85<br> Width = 57<br> Height = 17<br> Caption = #34987'PK'<br> TabOrder = 5<br> end<br> end<br> object GroupBox2: TGroupBox<br> Left = 196<br> Top = 18<br> Width = 165<br> Height = 47<br> Caption = #23547#24618<br> TabOrder = 3<br> object Label1: TLabel<br> Left = 12<br> Top = 22<br> Width = 24<br> Height = 12<br> Caption = #35268#21017<br> end<br> object ComboBox4: TComboBox<br> Left = 43<br> Top = 17<br> Width = 110<br> Height = 20<br> Style = csDropDownList<br> ItemHeight = 12<br> TabOrder = 0<br> Items.Strings = (<br> #20667#65314#24335#23547#24618)<br> end<br> end<br> object GroupBox4: TGroupBox<br> Left = 12<br> Top = 146<br> Width = 117<br> Height = 109<br> Caption = #20667#65314#24335#23547#24618<br> TabOrder = 4<br> object Check10: TCheckBox<br> Left = 8<br> Top = 16<br> Width = 97<br> Height = 17<br> Caption = #27979#35797<br> TabOrder = 0<br> OnClick = Check10Click<br> end<br> end<br> object BtnGuaJi: TButton<br> Tag = -1<br> Left = 286<br> Top = 239<br> Width = 78<br> Height = 21<br> Caption = #24320#22987#25346#26426<br> TabOrder = 5<br> end<br> object GroupBox5: TGroupBox<br> Left = 137<br> Top = 146<br> Width = 108<br> Height = 109<br> Caption = #20667#65314#24335#23547#24618<br> TabOrder = 6<br> Visible = False<br> end<br> end<br> end<br>end<br><br>====================<br>应该够清楚了,呵呵,在网络游戏 A3,MIR3,MU 下弹出和窗口化游戏主窗口没任何问题,别的没试<br>注意把<br>if (title = 'pRoJeCtAaA') or (title = 'ProjectA3') or (title = 'Project A3')<br>title里的内容改成你想钩上去的的窗口的caption<br><br>下面这个是处理游戏失焦时自动关闭的<br>function MyProc(Hwnd:HWND;iCode:UINT;wParam:WPARAM;lParam:LPARAM):integer; stdcall;<br>begin<br>if (iCode=WM_ACTIVATEAPP) or (iCode=WM_ACTIVATE) OR (iCode=WM_KILLFOCUS) or (iCode=WM_SETFOCUS) then<br>exit;<br>result:=CallWindowProc(oldproc,hwnd,iCode,wparam,lparam);<br>end;