Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

[Problem] Checkbox


Rekomendowane odpowiedzi

Opublikowano

Witam. Mam problem z checkboxem który nie chce działać . Proszę o pomoc, aby ten checkbox działał!

 

#include <ImageSearch.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$MargoBot = GUICreate("MargoBot", 615, 438, 192, 124)
$checkbox = GUICtrlCreateCheckbox("Apostata", 16, 64, 65, 17)
$Pic1 = GUICtrlCreatePic("C:\Users\Szymon\Documents\npc216.gif", 88, 48, 44, 52)
$SPAMBOT = GUICtrlCreateLabel("SPAMBOT", 408, 8, 56, 17)
$Input1 = GUICtrlCreateInput("Tresc", 304, 24, 281, 21)
GUICtrlCreateInput("1000-jedna sekunda", 376, 72, 121, 21)
$CZAS = GUICtrlCreateLabel("CZAS", 416, 56, 32, 17)
$AKTYWUJ = GUICtrlCreateButton("AKTYWUJ", 512, 72, 75, 25)
$EBOT = GUICtrlCreateLabel("EBOT", 64, 16, 33, 17)
GUISetState(@SW_SHOW)


 While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
   
	  If GUICtrlRead($checkbox) = $GUI_CHECKED Then
	  global $x, $y
   $result = _ImageSearch("obrazki/npc216.bmp", 1, $x, $y, 10)
If $result = 1 Then
	MouseClick("left", $x, $y)
    MouseClick("left", $x, $y)
	MouseClick("left", $x, $y)
EndIf
 $result = _ImageSearch("obrazki/zakaz.bmp", 1, $x, $y, 10)
If $result = 1 Then
	MouseClick("left", $x, $y)
EndIf
 $result = _ImageSearch("obrazki/auto.bmp", 1, $x, $y, 10)
If $result = 1 Then
	MouseClick("left", $x, $y)
EndIf
 $result = _ImageSearch("obrazki/potwierdz.bmp", 1, $x, $y, 10)
If $result = 1 Then
	MouseClick("left", $x, $y)
EndIf
 $result = _ImageSearch("obrazki/zamknij.bmp", 1, $x, $y, 10)
If $result = 1 Then
	MouseClick("left", $x, $y)
EndIf
EndIf
 EndSwitch
 WEnd

 

xxx

Opublikowano
#include <ImageSearch.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$MargoBot = GUICreate("MargoBot", 615, 438, 192, 124)
$checkbox = GUICtrlCreateCheckbox("Apostata", 16, 64, 65, 17)
$Pic1 = GUICtrlCreatePic("C:\Users\Szymon\Documents\npc216.gif", 88, 48, 44, 52)
$SPAMBOT = GUICtrlCreateLabel("SPAMBOT", 408, 8, 56, 17)
$Input1 = GUICtrlCreateInput("Tresc", 304, 24, 281, 21)
GUICtrlCreateInput("1000-jedna sekunda", 376, 72, 121, 21)
$CZAS = GUICtrlCreateLabel("CZAS", 416, 56, 32, 17)
$AKTYWUJ = GUICtrlCreateButton("AKTYWUJ", 512, 72, 75, 25)
$EBOT = GUICtrlCreateLabel("EBOT", 64, 16, 33, 17)
GUISetState(@SW_SHOW)
Global $x, $y

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
	EndSwitch
	If GUICtrlRead($checkbox) = $GUI_CHECKED Then
		$result = _ImageSearch("obrazki/npc216.bmp", 1, $x, $y, 10)
		If $result = 1 Then
			MouseClick("left", $x, $y)
			MouseClick("left", $x, $y)
			MouseClick("left", $x, $y)
		EndIf
		$result = _ImageSearch("obrazki/zakaz.bmp", 1, $x, $y, 10)
		If $result = 1 Then
			MouseClick("left", $x, $y)
		EndIf
		$result = _ImageSearch("obrazki/auto.bmp", 1, $x, $y, 10)
		If $result = 1 Then
			MouseClick("left", $x, $y)
		EndIf
		$result = _ImageSearch("obrazki/potwierdz.bmp", 1, $x, $y, 10)
		If $result = 1 Then
			MouseClick("left", $x, $y)
		EndIf
		$result = _ImageSearch("obrazki/zamknij.bmp", 1, $x, $y, 10)
		If $result = 1 Then
			MouseClick("left", $x, $y)
		EndIf
	EndIf
WEnd

 

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...