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

[Pytanie] Przeglądarka internetowa


Rekomendowane odpowiedzi

Opublikowano

Witam.

Kiedyś widziałem jakiś poradnik chyba na YT jak zrobić przeglądarke internetową w AutoIt, a właściwie to był chyba IE.

W CODA robiło się okienko, pasek na adres strony, buttony itd.

Jeżeli ktoś zna taki poradnik to proszę o link.

 

I jeszcze jedno pytanie jak zrobić, aby pojawiało się okienko i trzeba było wpisać w nim hasło po czym ok i jeżeli hasło prawidłowe to pojawia się drugie okno, a to zamyka.

Próbowałem coś takiego ale to pewnie źle:

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

#Region ### START Koda GUI section ### Form=c:\users\gry\desktop\form1.kxf
$Form1_1 = GUICreate("Auto Refresh by Reaver", 306, 122, 869, 397)
$Button1 = GUICtrlCreateButton("Next", 64, 80, 65, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Exit", 176, 80, 65, 25, $WS_GROUP)
$Input1 = GUICtrlCreateInput("", 72, 48, 161, 21)
$Label1 = GUICtrlCreateLabel("Enter the password to start the program:", 62, 24, 192, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
;##################################
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Button1
If $Input1 = "12345" Then Start()
Case $Button2
	   Koniec()
Case $GUI_EVENT_CLOSE
 Exit
EndSwitch
WEnd
;##################################
Func Start()
;Jakis tam kod
EndFunc
;##################################
Func Koniec()
Exit
EndFunc
;##################################

obraz24.png


Opublikowano

Poprawiony kod:

 

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#region ### START Koda GUI section ### Form=c:\users\gry\desktop\form1.kxf
$Form1_1 = GUICreate("Auto Refresh by Reaver", 306, 122, 869, 397)
$Button1 = GUICtrlCreateButton("Next", 64, 80, 65, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Exit", 176, 80, 65, 25, $WS_GROUP)
$Input1 = GUICtrlCreateInput("", 72, 48, 161, 21)
$Label1 = GUICtrlCreateLabel("Enter the password to start the program:", 62, 24, 192, 17)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
 Case $Button1
  If GUICtrlRead($Input1) = "12345" Then
Start()
  Else
MsgBox(1, "BLAD", "Zle haslo")
  EndIf
  ;Case $Button2
  ;		  Koniec()
 Case $GUI_EVENT_CLOSE
  Exit
EndSwitch
WEnd
Func Start()
MsgBox(1, "OK", "Udalo sie")
EndFunc   ;==>Start
;Func Koniec() ;To bym usunął
;Exit
;EndFunc

 

Używaj Tidy AutoIT Source (Ctrl + T), łatwiej rozeznać się w kodzie.Możesz wyrzucić te MsgBox`y z i Else, dałem je w celu sprawdzenia czy wszystko działa.

 

 

 

I jeszcze jedno pytanie jak zrobić, aby pojawiało się okienko i trzeba było wpisać w nim hasło po czym ok i jeżeli hasło prawidłowe to pojawia się drugie okno, a to zamyka.

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#region ### START Koda GUI section ### Form=c:\users\gry\desktop\form1.kxf
$Form1 = GUICreate("Auto Refresh by Reaver", 306, 122, 869, 397)
$Button1 = GUICtrlCreateButton("Next", 64, 80, 65, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Exit", 176, 80, 65, 25, $WS_GROUP)
$Input1 = GUICtrlCreateInput("", 72, 48, 161, 21)
$Label1 = GUICtrlCreateLabel("Enter the password to start the program:", 62, 24, 192, 17)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
 Case $Button1
  If GUICtrlRead($Input1) = "12345" Then
   Start()
  Else
   MsgBox(1, "BLAD", "Zle haslo")
  EndIf

 Case $GUI_EVENT_CLOSE
  Exit
EndSwitch
WEnd
Func Start()
GUIDelete($Form1)
Sleep(100)
$Form2 = GUICreate("okno", 419, 227, 192, 124)
GUISetState(@SW_SHOW)
;cd
;...
;..
;.
EndFunc   ;==>Start

Zarchiwizowany

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

×
×
  • Dodaj nową pozycję...