Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   API de Windows (https://www.clubdelphi.com/foros/forumdisplay.php?f=7)
-   -   Ayuda HotKey en DLL ... (https://www.clubdelphi.com/foros/showthread.php?t=64664)

NoxOner 14-04-2009 02:32:13

Ayuda HotKey en DLL ...
 
Hola que tal Tengo Un problema en este codigo espero q m ayuden no tengo muxa nocion del hotkey y tengo problemas creandolo

aver si le dan una hojeada y m dicen en q es mi error


Código:

library Tutorial;
uses
  Windows;

const
  CellAddress1:dword=$353BDB80;
  CellAddress2:dword=$353D1220;
  CellAddress3:dword=$353D1280;
  CellArray1:Array[0..95] of Byte = ($C8,$78,$3D,$35,$00,$00,$00,$00,$CC,$78,$3D,$35,$00,$00,$00,$00,$58,$BB,$3B,$35,$01,$00,$00,$00,$EC,$78,$3D,$35,$01,$00,$00,$00,$CC,$75,$2F,$35,$48,$93,$2D,$35,$A4,$04,$00,$00,$08,$BF,$3B,$35,$90,$A2,$0F,$35,$E0,$9F,$0F,$35,$F0,$9F,$0F,$35,$00,$A0,$0F,$35,$20,$A0,$0F,$35,$30,$A0,$0F,$35,$40,$A0,$0F,$35,$10,$A0,$0F,$35,$01,$00,$00,$00,$FF,$FF,$FF,$FF,$50,$A5,$0F,$35,$48,$93,$2D,$35);
  CellArray2:Array[0..95] of Byte = ($C8,$78,$3D,$35,$00,$00,$00,$00,$CC,$78,$3D,$35,$00,$00,$00,$00,$58,$BB,$3B,$35,$01,$00,$00,$00,$EC,$78,$3D,$35,$01,$00,$00,$00,$CC,$75,$2F,$35,$48,$93,$2D,$35,$A4,$04,$00,$00,$08,$BF,$3B,$35,$90,$A2,$0F,$35,$E0,$9F,$0F,$35,$F0,$9F,$0F,$35,$00,$A0,$0F,$35,$20,$A0,$0F,$35,$30,$A0,$0F,$35,$40,$A0,$0F,$35,$10,$A0,$0F,$35,$01,$00,$00,$00,$FF,$FF,$FF,$FF,$50,$A5,$0F,$35,$48,$93,$2D,$35);
  CellArray3:Array[0..95] of Byte = ($C8,$78,$3D,$35,$00,$00,$00,$00,$CC,$78,$3D,$35,$00,$00,$00,$00,$58,$BB,$3B,$35,$01,$00,$00,$00,$EC,$78,$3D,$35,$01,$00,$00,$00,$CC,$75,$2F,$35,$48,$93,$2D,$35,$A4,$04,$00,$00,$08,$BF,$3B,$35,$90,$A2,$0F,$35,$E0,$9F,$0F,$35,$F0,$9F,$0F,$35,$00,$A0,$0F,$35,$20,$A0,$0F,$35,$30,$A0,$0F,$35,$40,$A0,$0F,$35,$10,$A0,$0F,$35,$01,$00,$00,$00,$FF,$FF,$FF,$FF,$50,$A5,$0F,$35,$48,$93,$2D,$35);

Procedure Cell1;
Procedure Cell2;
Procedure Cell3;
var
j3:Integer;
var
j2:Integer;
var
j:Integer;
var
x:cardinal;
 
Begin
while (true)  do
Begin
if GetAsyncKeyState(vk_f1)<>0 then
Begin
  VirtualProtectEx(GetCurrentProcess,ptr(CellAddress1),96,PAGE_EXECUTE_READWRITE,nil);
      for j := 0 To Length(CellArray1) do
        PByte(CellAddress1 + j)^:=CellArray1[j];
end;

Begin
  VirtualProtectEx(GetCurrentProcess,ptr(CellAddress2),96,PAGE_EXECUTE_READWRITE,nil);
      for j2 := 0 To Length(CellArray2) do
        PByte(CellAddress2 + j2)^:=CellArray2[j2];
end;

Begin
  VirtualProtectEx(GetCurrentProcess,ptr(CellAddress3),96,PAGE_EXECUTE_READWRITE,nil);
      for j3 := 0 To Length(CellArray3) do
        PByte(CellAddress3 + j3)^:=CellArray3[j3];
end;

Begin
  CreateThread(nil,0,@Cell1,nil,0,x);
  sleep(100);
  CreateThread(nil,0,@Cell2,nil,0,x);
  sleep(50);
  CreateThread(nil,0,@Cell3,nil,0,x);
  sleep(30);
end;
end;
end;
end.

el error cuando lo compilo m sale en el " end. "

pero la verdad no tengo idea d por q m sale ...


aver si m ayudan ^^

aki una img del error


roman 14-04-2009 02:42:00

Cada begin debe tener su correspondiente end; cuéntalos para ver cuál hace falta. Indentar el código facilita evitar este tipo de errores.

// Saludos

cHackAll 14-04-2009 02:52:11

Cita:

Empezado por roman (Mensaje 344834)
Cada begin debe tener su correspondiente end; cuéntalos para ver cuál hace falta. Indentar el código facilita evitar este tipo de errores.

// Saludos

He roman, ta gueno pro ste hot"k" !va con APIPI ^^

roman 14-04-2009 02:56:29

Sí, bueno. Hoy venía con paciencia y pude aplicar el filtro correspondiente :D

// Saludos

NoxOner 14-04-2009 19:34:19

uhm osea mi problema es el end pero kiero mtb q vean si el hotkey esta bien declarado

=) :D

uhm tmb si el sleep esta bien dond lo puc ??


edited: Me akabo de dar kuenta q los end no es el problema creo q es la sintays aver si m pueden ayudar en esto :)


La franja horaria es GMT +2. Ahora son las 05:21:43.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi