⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jianghupaodianyuanma.txt

📁 一个在“江湖”游戏里面泡点的程序
💻 TXT
字号:
下面是我很多年前编写的一个在“江湖”游戏里面泡点的程序,该程序手动选择浏览器的HANDLE,然后自动完成打怪、发言等功能。,程序如下: 

program jianghu; 

{$apptype console} 

uses windows,messages; 

function GetFocusHld: hwnd; 
var 
windowhld:hwnd; 
threadld:dword; 
begin 
windowhld:=GetForegroundWindow; 
threadld:=GetWindowThreadProcessId(Windowhld,nil); 
AttachThreadInput(GetCurrentThreadId,threadld,true); 
Result:=getfocus; 
AttachThreadInput(GetCurrentThreadId,threadld,false); 
end; 

procedure SendKeys(focushld:hwnd;sSend:string); 
var 
i:integer; 
ch: byte; 
begin 
if focushld = 0 then Exit; 
i := 1; 
while i <= Length(sSend) do 
begin 
ch := byte(sSend[i]); 
if Windows.IsDBCSLeadByte(ch) then 
begin 
Inc(i); 
SendMessage(focushld, WM_IME_CHAR, MakeWord(byte(sSend[i]), ch), 0); 
end 
else 
SendMessage(focushld, WM_IME_CHAR, word(ch), 0); 
Inc(i); 
end; 
postmessage(focushld,WM_keydown,13,0); 
end; 

procedure CloseIEPopWind; 
var 
hCurrentWindow, hActWind: HWnd; 
szText: array [0..255] of char; 
begin 
hActWind:=FindWindow('Progman',nil); 
hCurrentWindow := GetWindow(hActWind, GW_HWNDFIRST); 
while hCurrentWindow <> 0 do 
begin 
if (GetWindowText(hCurrentWindow, @szText, 255)>0) and (szText='Microsoft Internet Explorer') 
then begin 
//writeln('Found IE Pop Window ',hCurrentWindow, #9, szText); 
PostMessage(hCurrentWindow,WM_CLOSE,1,0); 
end; 
hCurrentWindow:=GetWindow(hCurrentWindow, GW_HWNDNEXT); 
end; 
end; 

var 
s: string; 
i,n: integer; 
focushld: hwnd; 
nosay: boolean; 
begin 
n:=0; 
nosay:=false; 
if ParamCount>0 then begin 
val(ParamStr(1),n,i); 
nosay:=(i=0)and(n=0); 
if i<>0 then n:=0 
end; 
if n=0 then n:=10; 
writeln('江湖自动泡点程序--杨光彬 2002年5月7日修订版'#13#10); 
writeln('用法:',ParamStr(0),' [自动重复时间(这次为',n,'秒)]'#13#10); 
n:=n*1000; 
if not nosay then begin 
writeln('请在五秒之内移动到江湖窗口,鼠标点击话语输入框,等待自动说出0'#13#10); 
sleep(5000); 
focushld:=getfocushld; 
write('已经开始自动泡点,按Ctrl+C退出程序。(',focushld,') ... '); 
end else write('此次仅仅是自动关闭IE弹出窗口,按Ctrl+C退出程序 ... '); 
i:=0; 
repeat 
CloseIEPopWind; 
if not nosay then begin 
str(i,s); 
if i mod (180000 div n)=0 then sendkeys(focushld,'/练武$') else 
sendkeys(focushld,s); 
inc(i); 
end; 
sleep(n); 
until false; 
end. 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -