
Aber so schwer wars ja eigentlich nicht...
Hab übrigens nur ne billig no name Maus, ne Maus tut ihren Zweck, da brauch ich keine übergroße Genauigkeit (was bringt das überhaupt?)
Code: Alles auswählen
Macro Happy
;-)
EndMacro
Happy End
Liegts an mir, oder ist dieser Schluss wirklich zweideutig?hardfalcon hat geschrieben:Ist alles das gleiche, Freiheit will vorbereitet sein. Je früher, desto besser, sonst kann man sich am Ende selber nicht (mehr) kontrollieren.
Code: Alles auswählen
Global Mem.l = AllocateMemory(1024)
PokeL(Mem, 1)
;- Proceduren
Procedure maus(x, y, aktion1 = 0, aktion2 = 0)
BlockInput_(2 And 1) : x=Abs(x) : y=Abs(y)
Protected a.l, b.l, sa.l, sb.l
SetCursorPos_(x, y)
If aktion1 <> 0 : mouse_event_(aktion1, x, y, 0, 0) : EndIf
If aktion2 <> 0 : mouse_event_(aktion2, x, y, 0, 0) : EndIf
BlockInput_(#False)
ProcedureReturn #True
EndProcedure
;- Macros
Macro DesktopOutput()
Mem
EndMacro
Macro WaitForWindow(Name)
Repeat
Delay(1)
Until GetForegroundWindow_() = FindWindow_(0, Name)
EndMacro
;- Main Loop
Win$ = "Pilsner Urquell Undress - Mozilla Firefox"
SetForegroundWindow_(FindWindow_(0, Win$))
WaitForWindow(Win$)
Repeat
Delay(1)
Until GetAsyncKeyState_(#VK_SPACE)
Repeat
StartDrawing(DesktopOutput())
For x = 340 To 800
Col = Point(x, 725)
b = (Red(Col)+Green(Col)+Blue(Col))*100/765
If b < 75
Maus(x, 725)
Break
EndIf
If GetAsyncKeyState_(#VK_ESCAPE)
End
EndIf
Next
StopDrawing()
Delay(1)
ForEver
End