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] Nie Mogę Wyłączyć Progr

Rekomendowane odpowiedzi

Opublikowano

Cześć! Mam problem :| Nie mogę wyłączyć programu krzyżykiem.

Kod:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_Language=1045
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

$oIE = _IECreateEmbedded()

Opt("GUIOnEventMode", 1)

HotKeySet("{END}","ext")
#Region ### START Koda GUI section ###
$Form1 = GUICreate("Metin2 - NazwaSerwera", 566, 398, 294, 294)
$Button1 = GUICtrlCreateButton("Graj: xxx", 432, 48, 99, 41, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Wyłącz", 432, 96, 99, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Rejestracja", 448, 200, 75, 25, $WS_GROUP)
$Button4 = GUICtrlCreateButton("Ranking", 448, 232, 75, 25, $WS_GROUP)
$Button5 = GUICtrlCreateButton("Zmień hasło", 448, 264, 75, 25, $WS_GROUP)
$Button6 = GUICtrlCreateButton("KLIKNIJ TUTAJ!", 120, 344, 291, 33, $WS_GROUP)
GUICtrlSetOnEvent(-1, "Button1Click")
$Pic1 = GUICtrlCreatePic("321.png", 0, 0, 564, 396, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Browser1 = GUICtrlCreateObj($oIE, 24, 24, 180, 308)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Func ext()
        Exit
 EndFunc

Func Button1Click()
       _IENavigate($oIE, "www.xxxx.pl")
EndFunc

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


EndSwitch
WEnd

 

Mogę tylko skrótem, który tutaj zrobiłem [END]. Krzyżykiem nie mogę, jeśli przypiszę np. buttonowi2 Exit też nie działa.

Help me ^_^

 

__

Przy okazji zapytam:

Jak zrobić żeby program otworzył jakiś plik z folderu w którym się znajduje i potem się wyłączył (program wyłączył)?

I jak żeby obrazek, który dam na tło zapisał się do programu w 1 pliku exe?

Iii jeszcze jakie jest polecenie, aby włączyło stronę www w domyślnej przeglądarce? ^_^

Dumny członek MPCforum od 09 czerwca 2009 ;)

Opublikowano

 

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****

#AutoIt3Wrapper_Res_Language=1045

#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#include <ButtonConstants.au3>

#include <GUIConstantsEx.au3>

#include <StaticConstants.au3>

#include <WindowsConstants.au3>

#include <IE.au3>

 

$oIE = _IECreateEmbedded()

 

 

HotKeySet("{END}","ext")

#Region ### START Koda GUI section ###

gUICreate("Metin2 - NazwaSerwera", 566, 398, 294, 294)

$Button1 = GUICtrlCreateButton("Graj: xxx", 432, 48, 99, 41, $WS_GROUP)

$Button3 = GUICtrlCreateButton("Wyłącz", 432, 96, 99, 25, $WS_GROUP)

$Button2 = GUICtrlCreateButton("Rejestracja", 448, 200, 75, 25, $WS_GROUP)

$Button4 = GUICtrlCreateButton("Ranking", 448, 232, 75, 25, $WS_GROUP)

$Button5 = GUICtrlCreateButton("Zmień hasło", 448, 264, 75, 25, $WS_GROUP)

$Button6 = GUICtrlCreateButton("KLIKNIJ TUTAJ!", 120, 344, 291, 33, $WS_GROUP)

$Pic1 = GUICtrlCreatePic("321.png", 0, 0, 564, 396, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))

$Browser1 = GUICtrlCreateObj($oIE, 24, 24, 180, 308)

GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

case $Button1

Exit

Case $Button6

_IENavigate($oIE, "www.xxxx.pl")

EndSwitch

WEnd

 

Func ext()

Exit

EndFunc

 

 

 

shellexecute a potem killprocess czy jakoś tak:D

 

nie używaj guieventów :P

Opublikowano
  • Autor

Ok dzięki!

A ktoś odpowie na resztę pytań? :) Ważne ^_^

 

@edit

dzięki dam + ile mogę ^_^

Teraz zostało jeszcze:

I jak żeby obrazek, który dam na tło zapisał się do programu w 1 pliku exe?

Iii jeszcze jakie jest polecenie, aby włączyło stronę www w domyślnej przeglądarce? - domyśliłem się ;)

 

@edit2

mam problem :mellow:

Jak jest tak to przeglądarka działa, ale żadne buttony nie działają.

 

 

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_Language=1045
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

$oIE = _IECreateEmbedded()

Opt("GUIOnEventMode", 1)

HotKeySet("{END}","ext")
#Region ### START Koda GUI section ###
gUICreate("Metin2 - NazwaSerwera", 566, 398, 294, 294)
$Button1 = GUICtrlCreateButton("Graj: xxx", 432, 48, 99, 41, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Wyłącz", 432, 96, 99, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Rejestracja", 448, 200, 75, 25, $WS_GROUP)
$Button4 = GUICtrlCreateButton("Ranking", 448, 232, 75, 25, $WS_GROUP)
$Button5 = GUICtrlCreateButton("Zmień hasło", 448, 264, 75, 25, $WS_GROUP)
$Button6 = GUICtrlCreateButton("KLIKNIJ TUTAJ!", 72, 336, 291, 33, $WS_GROUP)
GUICtrlSetOnEvent(-1, "Button1Click")
$Pic1 = GUICtrlCreatePic("321.png", 0, 0, 564, 396, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Browser1 = GUICtrlCreateObj($oIE, 24, 24, 404, 308)
$Label2 = GUICtrlCreateLabel("Created by xFrez", 472, 376, 83, 17)
$Label1 = GUICtrlCreateLabel("Aby zobaczyć status serwera", 152, 368, 141, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


While 1
$nMsg = GUIGetMsg()
Switch $nMsg
	Case $GUI_EVENT_CLOSE
		Exit
	Case $Button1
		sleep(800)
ShellExecute("123.png")
		sleep(500)
Exit
	Case $Button2
ShellExecute("http://www.metin2.pl/")
	Case $Button3
Exit
	Case $Button4
ShellExecute("http://www.metin2.pl/")
	Case $Button5
ShellExecute("http://www.metin2.pl/")

EndSwitch
WEnd

Func Button1Click()
       _IENavigate($oIE, "www.metin2.com")
EndFunc

Func ext()
Exit
EndFunc

 

A jak jest tak to wszystko git działa prócz przeglądarki:

 

 

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_Language=1045
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

$oIE = _IECreateEmbedded()

HotKeySet("{END}","ext")
#Region ### START Koda GUI section ###
gUICreate("Metin2 - NazwaSerwera", 566, 398, 294, 294)
$Button1 = GUICtrlCreateButton("Graj: xxx", 432, 48, 99, 41, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Wyłącz", 432, 96, 99, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Rejestracja", 448, 200, 75, 25, $WS_GROUP)
$Button4 = GUICtrlCreateButton("Ranking", 448, 232, 75, 25, $WS_GROUP)
$Button5 = GUICtrlCreateButton("Zmień hasło", 448, 264, 75, 25, $WS_GROUP)
$Button6 = GUICtrlCreateButton("KLIKNIJ TUTAJ!", 72, 336, 291, 33, $WS_GROUP)
GUICtrlSetOnEvent(-1, "Button1Click")
$Pic1 = GUICtrlCreatePic("321.png", 0, 0, 564, 396, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Browser1 = GUICtrlCreateObj($oIE, 24, 24, 404, 308)
$Label2 = GUICtrlCreateLabel("Created by xFrez", 472, 376, 83, 17)
$Label1 = GUICtrlCreateLabel("Aby zobaczyć status serwera", 152, 368, 141, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


While 1
$nMsg = GUIGetMsg()
Switch $nMsg
	Case $GUI_EVENT_CLOSE
		Exit
	Case $Button1
		sleep(800)
ShellExecute("123.png")
		sleep(500)
Exit
	Case $Button2
ShellExecute("http://www.metin2.pl/")
	Case $Button3
Exit
	Case $Button4
ShellExecute("http://www.metin2.pl/")
	Case $Button5
ShellExecute("http://www.metin2.pl/")

EndSwitch
WEnd

Func Button1Click()
       _IENavigate($oIE, "www.gmail.com")
EndFunc

Func ext()
Exit
EndFunc

 

 

A wszystko przez to:

Opt("GUIOnEventMode", 1)

Dodam to działa przeglądarka - buttony nie.

Usunę to buttony działają - przeglądarka nie. Help me! I z tym poprzednim pytaniem jeszcze :P

Dumny członek MPCforum od 09 czerwca 2009 ;)

Opublikowano
  • Autor

Dzięki, dzięki!!

Ale z tego forum nie czaje nawet z translatorem ^_^

I czy da się obrazek + do tego jeszcze jeden plik z rozszerzeniem .exe? :)

Np. kliknę Start i się włącza plik "z tego wtopienia" xD

 

@edit

No.. wykorzystałem limit plusów ^_^

Na ciebie oczywiście ;)

Dumny członek MPCforum od 09 czerwca 2009 ;)

Opublikowano
  • Autor

Niee nic. Dobra jak sam obrazek "wtopić" w program? ;)

Żeby go tak jakby wgl. nie było. Bo chce tło dać w programie... :rolleyes:

Dumny członek MPCforum od 09 czerwca 2009 ;)

Opublikowano

a to nie zrozumiales tego UDF'a?

no to dodajesz tą biblioteczke

http://www.speedyshare.com/files/23953916/resources.au3

potem masz tło o nazwie image3.jpg

 

#AutoIt3Wrapper_Res_File_Add=image3.jpg, rt_rcdata, TEST_JPG_1

 

#include "resources.au3"

 

$gui = GUICreate("Data from resources simple example 1",400,150)

$pic1 = GUICtrlCreatePic("",0,0,400,150)

_ResourceSetImageToCtrl($pic1, "TEST_JPG_1") ; set JPG image to picture control from resource

GUISetState(@SW_SHOW)

 

While 1

If GUIGetMsg() = -3 Then Exit

WEnd

Opublikowano
  • Autor

Hehe no dobra dzięki zaraz sprawdzę i dam edita ;)

 

@edit

Nie działa ;x

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_Language=1045
#AutoIt3Wrapper_Res_File_Add=image3.jpg, rt_rcdata, TEST_JPG_1
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include "resources.au3"

$oIE = _IECreateEmbedded()


HotKeySet("{END}","ext")
#Region ### START Koda GUI section ###
gUICreate("Metin2 - Longju88", 566, 398, 294, 294)
$Button1 = GUICtrlCreateButton("Graj: Longju88", 432, 48, 99, 41, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Wyłącz", 432, 96, 99, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Rejestracja", 448, 200, 75, 25, $WS_GROUP)
$Button4 = GUICtrlCreateButton("Ranking", 448, 232, 75, 25, $WS_GROUP)
$Button5 = GUICtrlCreateButton("Zmień hasło", 448, 264, 75, 25, $WS_GROUP)
$Button6 = GUICtrlCreateButton("KLIKNIJ TUTAJ!", 72, 336, 291, 33, $WS_GROUP)
$Pic1 = GUICtrlCreatePic("image3.jpg", 0, 0, 564, 396, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
_ResourceSetImageToCtrl($pic1, "image3.jpg") ; set JPG image to picture control from resource
$Browser1 = GUICtrlCreateObj($oIE, 24, 24, 404, 308)
$Label2 = GUICtrlCreateLabel("Created by xFrez", 472, 376, 83, 17)
$Label1 = GUICtrlCreateLabel("Aby zobaczyć status serwera", 152, 368, 141, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


While 1
If GUIGetMsg() = -3 Then Exit
$nMsg = GUIGetMsg()
Switch $nMsg
	Case $GUI_EVENT_CLOSE
		Exit
	Case $Button1
		sleep(800)
ShellExecute("http://www.metin2.pl/")
		sleep(500)
Exit
Case $Button2
	Sleep(500)
ShellExecute("http://www.metin2.pl/")
Case $Button3
Sleep(100)
Exit
Case $Button4
Sleep(500)
ShellExecute("http://www.metin2.pl/")
Case $Button5
Sleep(500)
ShellExecute("http://www.metin2.pl/")
Case $Button6
        _IENavigate($oIE, "www.gmail.com")
EndSwitch
WEnd

Func ext()
Exit
EndFunc

Chyba jestem na to za głupi :DMusze się podszkolić, ale póki co muszę dokończyć ten program :P

@edit

To znaczy, że potrzebuję pomocy :D

Dumny członek MPCforum od 09 czerwca 2009 ;)

Opublikowano

zmien

to

_ResourceSetImageToCtrl($pic1, "image3.jpg") ; set JPG image to picture control from resource

na

_ResourceSetImageToCtrl($pic1, "IMAGE_JPG_1") ; set JPG image to picture control from resource

 

a to

$Pic1 = GUICtrlCreatePic("image3.jpg", 0, 0, 564, 396, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))

 

na

$Pic1 = GUICtrlCreatePic("", 0, 0, 564, 396, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))

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.