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

[Pytanie] problemy i pytani

Rekomendowane odpowiedzi

Opublikowano

siema mam kilka problemów ale najpier przedstawie kod:

 

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 271, 123, 358, 108)
$Group1 = GUICtrlCreateGroup("Group1", 8, 8, 257, 105)
$Button1 = GUICtrlCreateButton("Button1", 16, 32, 105, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Button2", 16, 72, 105, 25, $WS_GROUP)
$Input1 = GUICtrlCreateInput("Input1", 136, 32, 89, 21)
$Input2 = GUICtrlCreateInput("Input2", 136, 72, 89, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

Func grupa1()
$Button1 = $Input1 = Send("{}")
$Button2 = $Input2 = Send("{}")
If @error Then
	Exit
EndIf
EndFunc

 

 

 

Problemy/pytania:

1. Chyba źle zrobiłem z inputami.(proszę o poprawkę)

2.Czym zastąpić "Send" aby wciskało przyciski takie jakie wpisze w pole input?

3.Trzeba zastosować "_IsPressed"?

 

PROSZE POMÓŻCIE!

Wynagrodze limitem przez 2 dni + lub - :)

Opublikowano

WTF?

 

1, 2:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 271, 123, 358, 108)
$Group1 = GUICtrlCreateGroup("Group1", 8, 8, 257, 105)
$Button1 = GUICtrlCreateButton("Button1", 16, 32, 105, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Button2", 16, 72, 105, 25, $WS_GROUP)
$Input1 = GUICtrlCreateInput("Input1", 136, 32, 89, 21)
$Input2 = GUICtrlCreateInput("Input2", 136, 72, 89, 21)
GUISetState(@SW_SHOW)

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

 

...

 

3. _IsPressed to funkcja, która wychwytuje przyciski wciskane na klawiaturze... nie widzę tu z nią żadnego związku. :huh:

 

 

@Down - wiem, wiem... z tym niech sobie chłopak sam poradzi i zrobi jak mu pasuje ;)

Edytowane przez wjatek

Opublikowano

w ten sposób te sendy pójdą sobie ... nigdzie , bo aktywnym oknem będzie właśnie gui

If you = stupid then

insert(foot.in.your.ass)

end if

licznik-54-96732-stat.png

Opublikowano
  • Autor

@wjatek

 

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 271, 123, 358, 108)
$Group1 = GUICtrlCreateGroup("Group1", 8, 8, 257, 105)
$Button1 = GUICtrlCreateButton("Button1", 16, 32, 105, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Button2", 16, 72, 105, 25, $WS_GROUP)
$Input1 = GUICtrlCreateInput("Input1", 136, 32, 89, 21)
$Input2 = GUICtrlCreateInput("Input2", 136, 72, 89, 21)
GUISetState(@SW_SHOW)

HotKeySet("{F1}", "a")
HotKeySet("{F2}", "b")


While 1
       $nMsg = GUIGetMsg()
       Switch $nMsg
               Case $GUI_EVENT_CLOSE
                       Exit
               Case $Button1
                       a()
               Case $Button2
                       b()
       EndSwitch
WEnd

Func a()
	while 1
	Sleep(10)
	Send(GUICtrlRead($Input1))
	ControlSend("[CLASS:Notepad]", "", "Edit1", $Input1)
	WEnd
EndFunc

Func b()
	While 1
	Send(GUICtrlRead($Input2))
	ControlSend("[CLASS:Notepad]", "", "Edit1", $Input2)
	WEnd
EndFunc

 

 

tak pokombinowałem ale zamiast jakiegokolwiek przycisku wciska 6 ;/ wtf?

Edytowane przez R3dyXmetin

Opublikowano
  • Autor

hfaua i wjatek +

 

a co jeśli chce żeby z odstępami czasu (w ms) które wpisze w $input3 i 4?

 

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 337, 147, 192, 124)
$Group1 = GUICtrlCreateGroup("Group1", 0, 0, 329, 137)
$Button1 = GUICtrlCreateButton("Button1", 24, 24, 89, 33, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Button2", 24, 72, 89, 33, $WS_GROUP)
$Input1 = GUICtrlCreateInput("Input1", 120, 24, 105, 21)
$Input2 = GUICtrlCreateInput("Input2", 120, 72, 105, 21)
$Input3 = GUICtrlCreateInput("Input3", 232, 24, 81, 21)
$Input4 = GUICtrlCreateInput("Input4", 232, 72, 81, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

HotKeySet("{F1}", "a")
HotKeySet("{F2}", "b")


While 1
       $nMsg = GUIGetMsg()
       Switch $nMsg
               Case $GUI_EVENT_CLOSE
                       Exit
               Case $Button1
                       a()
               Case $Button2
                       b()
       EndSwitch
       WEnd

       Func a()
               while 1
               Send(GUICtrlRead($Input1))
               ControlSend("[CLASS:Notepad]", "", "Edit1", guictrlread($input1))
			$Input3=
               WEnd
       EndFunc

       Func b()
               While 1
               Send(GUICtrlRead($Input2))
               ControlSend("[CLASS:Notepad]", "", "Edit1", guictrlread($input2))
			$Input4=
               WEnd
       EndFunc

 

Opublikowano
  • Autor

aaaaaaa no faktycznie ^^ dzieki :):) do niedzieli daje ci i wjatkowi limit + :).

@topic close prosze.

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.