Skocz do zawartości

Dołącz do społecznoś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

Problam Z Klikaczem

Rekomendowane odpowiedzi

Opublikowano

Siema. Postanowiłem zrobić dla siebie takiego klikacza ale mam problem bo jak mam taki oto kod

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("KLikacz by TooFly", 220, 195, 368, 396)
GUISetIcon("C:\Documents and Settings\JMK\Pulpit\Jacek\Silkroad\Silkroad.ico")
$Button1 = GUICtrlCreateButton("Start", 8, 168, 97, 17, 0)
$Button2 = GUICtrlCreateButton("Button2", 120, 168, 89, 17, 0)
$Button3 = GUICtrlCreateButton("Button3", 8, 144, 201, 17, 0)
$Input1 = GUICtrlCreateInput("1", 120, 24, 81, 21)
$Input2 = GUICtrlCreateInput("2", 120, 64, 81, 21)
$Label1 = GUICtrlCreateLabel("Klawisz", 8, 32, 36, 17)
$Label2 = GUICtrlCreateLabel("Czas", 8, 72, 36, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
	Case $GUI_EVENT_CLOSE
		Exit
	Case  $Button1
                                  Send($Input1)
	         Sleep($Input2)
	EndSwitch
WEnd

I teraz jak zrobic zeby Input 1 zostal czytany ?

//Za duża sygnaturka.

Opublikowano
  • Autor

hmm no dobra ale jak klikne Button1 (Strart) to nic sie nie dzieje , chyba cos poplątałem w pętli tylko co ?

@EDit

a zrobiłem zmienne ale nadal nic

 #include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("KLikacz by TooFly", 220, 195, 368, 396)
GUISetIcon("C:\Documents and Settings\JMK\Pulpit\Jacek\Silkroad\Silkroad.ico")
$Button1 = GUICtrlCreateButton("Start", 8, 168, 97, 17, 0)
$Button2 = GUICtrlCreateButton("Button2", 120, 168, 89, 17, 0)
$Button3 = GUICtrlCreateButton("Button3", 8, 144, 201, 17, 0)
$Input1 = GUICtrlCreateInput("1", 120, 24, 81, 21)
$Input2 = GUICtrlCreateInput("2", 120, 64, 81, 21)
$Label1 = GUICtrlCreateLabel("Klawisz", 8, 32, 36, 17)
$Label2 = GUICtrlCreateLabel("Czas", 8, 72, 36, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

$czas=GuiCtrlRead($Input2)
$klawisz=GuiCtrlRead($Input1)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
	Case $GUI_EVENT_CLOSE
		Exit
		EndSwitch
WEnd
While 2 
	Switch $Button1
		     Send($klawisz)
	         Sleep($czas)
		 EndSwitch
		 WEnd

//Za duża sygnaturka.

Opublikowano

1)

główna pętla zaczyna sie na

While 

a kończy na

Wend

a twój

Switch $Button1

jest pod nią, wiec nie ma szans sie załapać

 

2)

druga pętla

While 2

jak by tego było mało z niewiadomych przyczyn zaczyna sie nad butionem

 

na te chwile wygląda tak ze aby odpalić program za pomocą guzika trzeba wyłączyć program (jego GUI - te graficzne okno)... no ale jak wyłączysz to nie ma guzika

 

3)

a tak poza tym nie pisze sie

While 2 

tylko

While 1

 

4)

przy pisaniu botów guzik to skrajna ostateczność, stosuje sie w zamian HotKey-e

Opublikowano
  • Autor

no dobra zrobiłem ale jest 1 błąd mam taki kod

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("KLikacz by TooFly", 220, 195, 368, 396)
GUISetIcon("C:\Documents and Settings\JMK\Pulpit\Jacek\Silkroad\Silkroad.ico")
$Button1 = GUICtrlCreateButton("Start", 8, 168, 97, 17, 0)
$Button2 = GUICtrlCreateButton("Button2", 120, 168, 89, 17, 0)
$Button3 = GUICtrlCreateButton("Button3", 8, 144, 201, 17, 0)
$Input1 = GUICtrlCreateInput("1", 120, 24, 81, 21)
$Input2 = GUICtrlCreateInput("2", 120, 64, 81, 21)
$Label1 = GUICtrlCreateLabel("Klawisz", 8, 32, 36, 17)
$Label2 = GUICtrlCreateLabel("Czas", 8, 72, 36, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

$czas=GuiCtrlRead( $Input2)
$klawisz=GuiCtrlRead($Input1)
WHile 1			     
Switch GUIGetMsg()
Case $Button1
While 1
         Send($klawisz)
         Sleep($czas)
	WEnd
	EndSwitch
WEnd

While 1
 $nMsg = GUIGetMsg()
	Switch $nMsg
	Case $GUI_EVENT_CLOSE
		Exit
		EndSwitch
	WEnd

I klika tylko to co jest w linijce

$Input1 = GUICtrlCreateInput("1", 120, 24, 81, 21)

$Input2 = GUICtrlCreateInput("2", 120, 64, 81, 21)

KLiknie 1 z czasem 2 ms

jak to zmienić ? jak bym wstawił

$Input1 = GUICtrlCreateInput("6", 120, 24, 81, 21)

$Input2 = GUICtrlCreateInput("2000", 120, 64, 81, 21)

to by klikał 6 co 2 sek

//Za duża sygnaturka.

Opublikowano

to pomnóż przez 1000

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("KLikacz by TooFly", 220, 195, 368, 396)
;GUISetIcon("C:\Documents and Settings\JMK\Pulpit\Jacek\Silkroad\Silkroad.ico")
$Button1 = GUICtrlCreateButton("Start", 8, 168, 97, 17, 0)
$Button2 = GUICtrlCreateButton("Button2", 120, 168, 89, 17, 0)
$Button3 = GUICtrlCreateButton("Button3", 8, 144, 201, 17, 0)
$Input1 = GUICtrlCreateInput("1", 120, 24, 81, 21)
$Input2 = GUICtrlCreateInput("2", 120, 64, 81, 21)
$Label1 = GUICtrlCreateLabel("Klawisz", 8, 32, 36, 17)
$Label2 = GUICtrlCreateLabel("Czas", 8, 72, 36, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

$czas=GuiCtrlRead( $Input2)*1000 ; <===| tu dopisac "razy tysiąc"
$klawisz=GuiCtrlRead($Input1)
WHile 1
Switch GUIGetMsg()
	Case $GUI_EVENT_CLOSE
		Exit
	Case $Button1
			While 1
			Send($klawisz)
			Sleep($czas)
		WEnd
EndSwitch
WEnd

 

 

do trzepania jednego klawisza luknij może to ci starczy.

http://www.mpcforum.pl/topic/108841-pomoc-z-autoit/

Opublikowano
  • Autor

mi mi chodzilo o to ze on kliknie to co jak napisze w kodzie a nie jak wlacze to

jak bym tam wpisal w kodzie

$Input1 = GUICtrlCreateInput("3", 120, 24, 81, 21)

$Input2 = GUICtrlCreateInput("400", 120, 64, 81, 21)

a w programie w miejsce KLawisze 9

a czasu 5 to i tak kliknie 3 z czasem 4sek

Chodzi mi o to jak zrobic zeby to co ja wpisze to klikal a nie co wpisze w kodzie

//Za duża sygnaturka.

Opublikowano

Banalny błąd, ale jednak. Dzieje sie tak ponieważ skrypt odczytuje wartosc Twoich 2 inputów jeszcze przed nacisnieciem przycisku...

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("KLikacz by TooFly", 220, 195, 368, 396)
;GUISetIcon("C:\Documents and Settings\JMK\Pulpit\Jacek\Silkroad\Silkroad.ico")
$Button1 = GUICtrlCreateButton("Start", 8, 168, 97, 17, 0)
$Button2 = GUICtrlCreateButton("Button2", 120, 168, 89, 17, 0)
$Button3 = GUICtrlCreateButton("Button3", 8, 144, 201, 17, 0)
$Input1 = GUICtrlCreateInput("1", 120, 24, 81, 21)
$Input2 = GUICtrlCreateInput("2", 120, 64, 81, 21)
$Label1 = GUICtrlCreateLabel("Klawisz", 8, 32, 36, 17)
$Label2 = GUICtrlCreateLabel("Czas", 8, 72, 36, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


WHile 1
       Switch GUIGetMsg()
               Case $GUI_EVENT_CLOSE
                       Exit
               Case $Button1
$czas=GuiCtrlRead( $Input2)*1000
$klawisz=GuiCtrlRead($Input1)
                               While 1
                               Send($klawisz)
                               Sleep($czas)
                       WEnd
       EndSwitch
WEnd

Teraz powinno działać

Opublikowano
  • Autor

a no właśnie wielkie dzieki :P + leci ^^

A i mam taki jescze mały problem bo jak klikne juz start to petla While bedzie dzialac w nieskonczonosc i nie da sie wylaczyc tego normalnie X. Zrobiłem to tak

#include <GUIConstants.au3>
HotKeySet("{f5}", "stop")
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("KLikacz by TooFly", 220, 195, 368, 396)
GUISetIcon("C:\Documents and Settings\JMK\Pulpit\Jacek\Silkroad\Silkroad.ico")
$Button1 = GUICtrlCreateButton("Start", 8, 168, 97, 17, 0)
$Button2 = GUICtrlCreateButton("Button2", 120, 168, 89, 17, 0)
$Button3 = GUICtrlCreateButton("Button3", 8, 144, 201, 17, 0)
$Input1 = GUICtrlCreateInput("2", 120, 24, 81, 21)
$Input2 = GUICtrlCreateInput("10", 120, 64, 81, 21)
$Label1 = GUICtrlCreateLabel("Klawisz", 8, 32, 36, 17)
$Label2 = GUICtrlCreateLabel("Czas", 8, 72, 36, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
WHile 1			     
Switch GUIGetMsg()
$nMsg = GUIGetMsg()
	Case $GUI_EVENT_CLOSE
		Exit
 Case $Button1
  $czas=GuiCtrlRead($Input2)*1000
  $klawisz=GuiCtrlRead($Input1)
While 1
         Send($klawisz)
         Sleep($czas)
WEnd
	EndSwitch
	WEnd

Moze dac to w ta pentle ale jak dalem do petli If Button3 then exit to odrazu mi wylaczal

//Za duża sygnaturka.

Opublikowano
  • Autor

potem cos z nimi zrobie, narazie zastanawiam się jak zrobić żeby przerwać pętle while 1 gdzy jest send klawisz

//Za duża sygnaturka.

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.

Ostatnio przeglądający 0

  • Brak zarejestrowanych użytkowników przeglądających tę stronę.

Konto

Nawigacja

Skonfiguruj powiadomienia push w przeglądarce

Chrome (Android)
  1. Stuknij ikonę kłódki obok paska adresu.
  2. Stuknij Uprawnienia → Powiadomienia.
  3. Dostosuj swoje ustawienie.
Chrome (Komputer)
  1. Kliknij ikonę kłódki na pasku adresu.
  2. Wybierz Ustawienia witryny.
  3. Znajdź Powiadomienia i dostosuj swoje ustawienie.