大虾们,谁能解决这个问题,我想了一天一夜(急)!(200分)

  • 主题发起人 dfwczy20
  • 开始时间
D

dfwczy20

Unregistered / Unconfirmed
GUEST, unregistred user!
为什么2个按鼠标的命令都不能执行
var
i1:shortint;
procedure TForm1.Timer5Timer(Sender: TObject);
begin
inc(i1);
if i1=30 then
begin
windows.ClipCursor(0);
SetCursorPos(29,326);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
rect.Left:=100;
rect.Top:=100;
rect.Bottom:=200;
rect.Right:=200;
windows.ClipCursor(@rect);
end;
if i1=40 then
begin
windows.ClipCursor(0);
SetCursorPos(953,12);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
end;
Timer5.Enabled:=false;
end;
 
Timer5.Enabled:=false;
该事件只执行一次?
 
label aa;
begin
aa:
goto aa;
循环一下
 
label aa;
begin
aa:
goto aa;
循环一下
 
你写一个线成把 时钟的代码写到线成里。然后。用始终来调用线成。
 
你在Timer5的定时器事件里写了"Timer5.Enabled:=false;", 该定时器只执行了一次, 以后就停止了.最好仔细说明您的需求.
 
该过程只执行一次,l1只能加1,加不到30,也就是说两个IF语句的条件都不满足怎么执行?
 
看了半天代码,看的我好混~~~
i1是如何赋值到 30 或 40 的?
楼上的仁兄说的及是~~~
条件不满足~~~
 
这样只执行一次 数据怎么能增加到30or40?
所以我认同 衣雪锋做法 在AA处编写循环代码
 
最好仔细说明您的需求.
 
帮顶!

╭=========================================╮

80G海量源代码,控件,书籍全免费狂下不停!

http://www.source520.com

╰=========================================╯
 
鼠标指向按钮的位置对吗?可能指到按钮外了。
 
顶部