dandy wrote:
an example of integration with already made script
It is as simple as adding 9 lines to the top of any script as demonstrated below:
Code:
x := RegisterCallback( "AttachDetected" )
m := DllCall( "Kernel32\GetModuleHandle", Str,"ntdll.dll" )
a := DllCall( "Kernel32\GetProcAddress", UInt,m, Str,"DbgUiRemoteBreakin" )
DllCall( "kernel32\VirtualProtect", UInt,a, UInt,1, UInt,0x40, UIntP,o )
NumPut( 0xe9, a+0, 0, "UChar" ) , NumPut( (x-5-a), a+1, 0, "Int" )
DllCall( "kernel32\VirtualProtect", UInt,a, UInt,1, UInt,o, UIntP,o )
AttachDetected() {
ExitApp
}
/*
Crazy Scripting : Dingbat Flipper 45L
http://www.autohotkey.com/forum/viewtopic.php?t=18794
*/
Gui, +AlwaysOnTop
Gui,Font,s28, Webdings
Loop 36
Ix:=A_Index, Ch.=Chr(158+Ix) "|" Chr(158+Ix) ((Ix<36) ? "|" : "")
Sort,Ch,D| Random
X:=10, Y:=10, R:=1, C:=1, Ix:=1
Loop,Parse,Ch,|
{
Gui,Add,Button,x%X% y%Y% w46 h46 vB%Ix% gMainProcedure
X:=X+50, C:=C+1, Ix:=Ix+1
If (C>9)
R:=R+1, C:=1, Y:=Y+50, X:=10
}
Gui,Font,S8 Bold,Tahoma
Gui,Margin,10,10
Gui,Add,StatusBar
e:=SB_SetParts(75,75,250), CL:=0, FL:=0, A_Time:=SubStr(A_Now,1,8)
Gui,Show,,Dingbat Flipper 45L
SetTimer,GameTimer,1000
Return ; [ End of Auto-Execute Section ]
F2::ReLoad
MainProcedure: ; [ Main Procedure ]
iNo:=Substr(A_GuiControl,2,2)
If (iNo!=S1 and iNo!=S2 and AR!=1) {
e:=GuiC(N,"B" iNo,GetF(Ch,iNo)), S0:=S1, S1:=S2, S2:=iNo, e:=GuiC(N,"B" S0), AR:=1
If ( GetF(Ch,S1) == GetF(Ch,S2) ) ; == is used for case sensitive matching
e:=GuiC("Disable","B" S1), e:=GuiC("Disable","B" S2), S1:=0, S2:=0, FL:=FL+1
CL:=CL+1, AR:=0, SB_SetText("`tClicks: " CL,1), SB_SetText("`tFlips: " FL "/36",2)
IfEqual,FL,36, Gui,Show,,GAME OVER! Press <F2> to play again
} Return
GameTimer: ; [ Game Timer ]
If (WinActive("Dingbat Flipper 45L") And CL>0) {
A_Time+=1,S
FormatTime,MMSS,%A_Time%,mm:ss
SB_SetText("`t" MMSS,4)
} Return
GetF(Str="",Fld=1) { ; GetField()
Loop,Parse,Str,|
IfEqual,A_Index,%Fld%, Return,A_LoopField
}
GuiC(P1="",P2="",P3="") { ; GuiControl()
GuiControl,%P1%, %P2%,%P3%
}
GuiClose:
ExitApp
I chose to exit app when "Attach" detected.
You may choose, er.. like shutdown, to slow down the script kiddie.
