Jump to content

Recommended Posts

Posted

This is my script:

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3> 
#Region ### START Koda GUI section ### Form=C:\Documents and Settings\User\Pulpit\Skrypty\koda_1.7.1.0\Forms\Otaku Team.kxf

$Form1 = GUICreate("Generator Opisów [Otaku Team]", 634, 751, 192, 124)
$MenuItem1 = GUICtrlCreateMenu("&Opis")
$MenuItem2 = GUICtrlCreateMenuItem("Generuj BBCode", $MenuItem1)
$MenuItem6 = GUICtrlCreateMenuItem("Wyczyść Wszystko", $MenuItem1)
$MenuItem3 = GUICtrlCreateMenu("&Grafiki Teamowe")
$MenuItem4 = GUICtrlCreateMenuItem("Edytuj Grafiki", $MenuItem3)
$MenuItem5 = GUICtrlCreateMenuItem("Ustaw Domyślne", $MenuItem3)
$MenuItem7 = GUICtrlCreateMenu("&Skład Misji")
$Menuitem11 = GUICtrlCreateMenuItem("Uczestnicy Misji..",$MenuItem7)
$MenuItem8 = GUICtrlCreateMenu("&Pobierz Informacje")
$MenuItem10 = GUICtrlCreateMenuItem("Azunime.net...",$MenuItem8)
$MenuItem9 = GUICtrlCreateMenu("O P&rogramie")
$Group1 = GUICtrlCreateGroup("Info Ogólne", 8, 8, 313, 97)
$Label1 = GUICtrlCreateLabel("Tytuł Oryginalny :", 16, 24, 87, 17)
$Input1 = GUICtrlCreateInput("", 104, 20, 209, 21)
$Input2 = GUICtrlCreateInput("", 104, 46, 209, 21)
$Label2 = GUICtrlCreateLabel("Tytuł Polski :", 16, 50, 66, 17)
$Input3 = GUICtrlCreateInput("", 104, 72, 209, 21)
$Label3 = GUICtrlCreateLabel("Link do okładki :", 16, 76, 84, 17)
$Group2 = GUICtrlCreateGroup("Szczegóły", 8, 112, 313, 121)
$Label4 = GUICtrlCreateLabel("Typ :", 16, 127, 28, 17)
$Input4 = GUICtrlCreateInput("", 104, 124, 209, 21)
$Input5 = GUICtrlCreateInput("", 104, 150, 209, 21)
$Label5 = GUICtrlCreateLabel("Data Premiery :", 16, 154, 76, 17)
$Input6 = GUICtrlCreateInput("", 104, 176, 209, 21)
$Label6 = GUICtrlCreateLabel("Dozwolony Wiek:", 16, 180, 87, 17)
$Label7 = GUICtrlCreateLabel("Ocena :", 16, 206, 42, 17)
$Input7 = GUICtrlCreateInput("", 104, 202, 209, 21)
$Group3 = GUICtrlCreateGroup("Opis", 8, 240, 313, 177)
$Edit1 = GUICtrlCreateEdit("", 16, 256, 297, 153,$WS_VSCROLL)
$Group4 = GUICtrlCreateGroup("Produkcja", 8, 424, 313, 297)
$Label8 = GUICtrlCreateLabel("Reżyser :", 16, 440, 48, 17)
$Input8 = GUICtrlCreateInput("", 104, 436, 209, 21)
$Input9 = GUICtrlCreateInput("", 104, 462, 209, 21)
$Label9 = GUICtrlCreateLabel("Muzyka :", 16, 466, 47, 17)
$Input10 = GUICtrlCreateInput("", 104, 488, 209, 21)
$Label10 = GUICtrlCreateLabel("Scenografia :", 16, 492, 67, 17)
$Label11 = GUICtrlCreateLabel("Dźwięk :", 16, 518, 45, 17)
$Input11 = GUICtrlCreateInput("", 104, 514, 209, 21)
$Edit2 = GUICtrlCreateEdit("", 16, 568, 297, 145)
$Label12 = GUICtrlCreateLabel("Obsada:", 16, 544, 44, 17)
$Group5 = GUICtrlCreateGroup("Plik", 328, 8, 297, 169)
$Edit3 = GUICtrlCreateEdit("", 336, 24, 281, 105)
GuiCtrlSetData(-1,"AviCodec")
$Input18 = GUICtrlCreateInput("", 336, 152, 89, 21)
$Input19 = GUICtrlCreateInput("", 432, 152, 89, 21)
$Input20 = GUICtrlCreateInput("", 528, 152, 89, 21)
$Label25 = GUICtrlCreateLabel("Język", 361, 135, 31, 17)
$Label26 = GUICtrlCreateLabel("Napisy", 457, 135, 36, 17)
$Label27 = GUICtrlCreateLabel("Grupa", 553, 135, 33, 17)
$Group6 = GUICtrlCreateGroup("Screeny", 328, 184, 297, 177)
$Edit4 = GUICtrlCreateEdit("", 336, 200, 281, 153)
$Group7 = GUICtrlCreateGroup("Download", 328, 368, 297, 353, -1, $WS_EX_TRANSPARENT)
$Tab1 = GUICtrlCreateTab(336, 384, 281, 297)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("Epik 1")
$Input12 = GUICtrlCreateInput("", 348, 432, 257, 21)
$Label13 = GUICtrlCreateLabel("Nazwa", 348, 416, 37, 17)
$Edit5 = GUICtrlCreateEdit("", 348, 488, 257, 177)
$Label14 = GUICtrlCreateLabel("Download", 348, 472, 52, 17)
$TabSheet2 = GUICtrlCreateTabItem("Epik 2")
$Label15 = GUICtrlCreateLabel("Nazwa", 348, 416, 37, 17)
$Input13 = GUICtrlCreateInput("", 348, 432, 257, 21)
$Edit6 = GUICtrlCreateEdit("", 348, 488, 257, 177)
$Label16 = GUICtrlCreateLabel("Download", 348, 472, 52, 17)
$TabSheet3 = GUICtrlCreateTabItem("Epik 3")
$Label17 = GUICtrlCreateLabel("Nazwa", 348, 416, 37, 17)
$Input14 = GUICtrlCreateInput("", 348, 432, 257, 21)
$Edit7 = GUICtrlCreateEdit("", 348, 488, 257, 177)
$Label18 = GUICtrlCreateLabel("Download", 348, 472, 52, 17)
$TabSheet4 = GUICtrlCreateTabItem("Epik 4")
$Label19 = GUICtrlCreateLabel("Nazwa", 348, 416, 37, 17)
$Input15 = GUICtrlCreateInput("", 348, 432, 257, 21)
$Edit8 = GUICtrlCreateEdit("", 348, 488, 257, 177)
$Label20 = GUICtrlCreateLabel("Download", 348, 472, 52, 17)
$TabSheet5 = GUICtrlCreateTabItem("Epik 5")
$Label21 = GUICtrlCreateLabel("Nazwa", 348, 416, 37, 17)
$Input16 = GUICtrlCreateInput("", 348, 432, 257, 21)
$Edit9 = GUICtrlCreateEdit("", 348, 488, 257, 177)
$Label22 = GUICtrlCreateLabel("Download", 348, 472, 52, 17)
$TabSheet6 = GUICtrlCreateTabItem("Epik 6")
$Label23 = GUICtrlCreateLabel("Nazwa", 348, 416, 37, 17)
$Input17 = GUICtrlCreateInput("", 348, 432, 257, 21)
$Edit10 = GUICtrlCreateEdit("", 348, 488, 257, 177)
$Label24 = GUICtrlCreateLabel("Download", 348, 472, 52, 17)
GUICtrlCreateTabItem("")
$Checkbox1 = GUICtrlCreateCheckbox("Zbiorczy HC", 360, 688, 81, 17)
$Button1 = GUICtrlCreateButton("Uczestnicy Misji", 456, 688, 137, 17, $WS_GROUP)

GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
If $nMsg = $MenuItem10 Then
    $Form2 = GUICreate("Pobierz Informacje - azunime.net", 317, 82, 192, 124)
    $Labeln1 = GUICtrlCreateLabel("Link:", 8, 8, 27, 17)
    $Inputn1 = GUICtrlCreateInput("", 8, 24, 297, 21)
    $Buttonn1 = GUICtrlCreateButton("Znajdź", 130, 56, 57, 17, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    While 1
        $nMsg = GuiGetMsg()
        Switch $nMsg
        Case $Buttonn1
            If Not GuiCtrlRead($Inputn1) = "" Then
                $oIE = _IECreate(GuiCtrlRead($Inputn1))
                _IELoadWait($oIE)
                $tyt = _IEGetObjById($oIE,"typanime") ; Typ Anime (np Serial TV)
                $prm = _IEGetObjById($oIE,"premiera") ; Data Premiery
                $ocr = _IEGetObjById($oIE,"ocena_redakcji") ; Ocena Redakcji
                $ogw = _IEGetObjById($oIE,"ograniczenie_wieku") ; Ograniczenia wiekowe
                $ogi = _IEGetObjById($oIE,"ograniczenie_img") ; Ikonka ograniczeń + http://azunime.net/anime/
                $opi = _IEGetObjByID($oIE,"synopsis") ; opis
                If @Error Then
                ToolTip("Nie znaleziono niektórych informacji!",0,0,"Błąd")
                EndIf
                $l1 = StringReplace(_IEPropertyGet($tyt,"innertext"), "Produkcja" & @CRLF, "")
                $l2 = StringReplace(_IEPropertyGet($prm,"innertext"), "Premiera" & @CRLF, "")
                $naw1 = StringReplace(_IEPropertyGet($ogw,"innertext"),"(","")
                $naw2 = StringReplace($naw1,")","")
                $l3 = StringReplace(_IEPropertyGet($ocr,"innertext"), "Ocena redakcji", "")
                If NOT $l1 = 0 Then
                    GuiCtrlSetData($Input4,$l1)
                EndIf
                If NOT $l2 = 0 Then
                    GuiCtrlSetData($Input5,$l2)
                EndIf
                If Not $naw2 = 0 Then
                    GuiCtrlSetData($Input6,$naw2)
                EndIf
                If NOT $l3 = 0 Then
                    GuiCtrlSetData($Input7,$l3 & " [redakcja Azunime.net]")
                EndIf
            Else
                MsgBox(48,"Pobierz Informacje...","Najpierw wpisz link!")
            EndIf
        Case $GUI_EVENT_CLOSE
            GuiDelete($Form2)
        EndSwitch
    WEnd
EndIf
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

EndSwitch
WEnd

If i close Form2, i cant again open Form2 and all script no response.. any1 tell me why?

Posted (edited)

Hey

Form1 wont respond again as the last form created was form2 so the $nMsg = GUIGetMsg() wont return anything back from form1, lookup 'Advanced GUIGetMsg and Multiple Windows' in the helpfile for more info

Have made some edits to your code to make it work

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#Region ### START Koda GUI section ### Form=C:\Documents and Settings\User\Pulpit\Skrypty\koda_1.7.1.0\Forms\Otaku Team.kxf
local $Buttonn1

$Form1 = GUICreate("Generator Opisów [Otaku Team]", 634, 751, 192, 124)
$MenuItem1 = GUICtrlCreateMenu("&Opis")
$MenuItem2 = GUICtrlCreateMenuItem("Generuj BBCode", $MenuItem1)
$MenuItem6 = GUICtrlCreateMenuItem("Wyczysc Wszystko", $MenuItem1)
$MenuItem3 = GUICtrlCreateMenu("&Grafiki Teamowe")
$MenuItem4 = GUICtrlCreateMenuItem("Edytuj Grafiki", $MenuItem3)
$MenuItem5 = GUICtrlCreateMenuItem("Ustaw Domyslne", $MenuItem3)
$MenuItem7 = GUICtrlCreateMenu("&Sklad Misji")
$Menuitem11 = GUICtrlCreateMenuItem("Uczestnicy Misji..",$MenuItem7)
$MenuItem8 = GUICtrlCreateMenu("&Pobierz Informacje")
$MenuItem10 = GUICtrlCreateMenuItem("Azunime.net...",$MenuItem8)
$MenuItem9 = GUICtrlCreateMenu("O P&rogramie")
$Group1 = GUICtrlCreateGroup("Info Ogólne", 8, 8, 313, 97)
$Label1 = GUICtrlCreateLabel("Tytul Oryginalny :", 16, 24, 87, 17)
$Input1 = GUICtrlCreateInput("", 104, 20, 209, 21)
$Input2 = GUICtrlCreateInput("", 104, 46, 209, 21)
$Label2 = GUICtrlCreateLabel("Tytul Polski :", 16, 50, 66, 17)
$Input3 = GUICtrlCreateInput("", 104, 72, 209, 21)
$Label3 = GUICtrlCreateLabel("Link do okladki :", 16, 76, 84, 17)
$Group2 = GUICtrlCreateGroup("Szczególy", 8, 112, 313, 121)
$Label4 = GUICtrlCreateLabel("Typ :", 16, 127, 28, 17)
$Input4 = GUICtrlCreateInput("", 104, 124, 209, 21)
$Input5 = GUICtrlCreateInput("", 104, 150, 209, 21)
$Label5 = GUICtrlCreateLabel("Data Premiery :", 16, 154, 76, 17)
$Input6 = GUICtrlCreateInput("", 104, 176, 209, 21)
$Label6 = GUICtrlCreateLabel("Dozwolony Wiek:", 16, 180, 87, 17)
$Label7 = GUICtrlCreateLabel("Ocena :", 16, 206, 42, 17)
$Input7 = GUICtrlCreateInput("", 104, 202, 209, 21)
$Group3 = GUICtrlCreateGroup("Opis", 8, 240, 313, 177)
$Edit1 = GUICtrlCreateEdit("", 16, 256, 297, 153,$WS_VSCROLL)
$Group4 = GUICtrlCreateGroup("Produkcja", 8, 424, 313, 297)
$Label8 = GUICtrlCreateLabel("Rezyser :", 16, 440, 48, 17)
$Input8 = GUICtrlCreateInput("", 104, 436, 209, 21)
$Input9 = GUICtrlCreateInput("", 104, 462, 209, 21)
$Label9 = GUICtrlCreateLabel("Muzyka :", 16, 466, 47, 17)
$Input10 = GUICtrlCreateInput("", 104, 488, 209, 21)
$Label10 = GUICtrlCreateLabel("Scenografia :", 16, 492, 67, 17)
$Label11 = GUICtrlCreateLabel("Dzwiek :", 16, 518, 45, 17)
$Input11 = GUICtrlCreateInput("", 104, 514, 209, 21)
$Edit2 = GUICtrlCreateEdit("", 16, 568, 297, 145)
$Label12 = GUICtrlCreateLabel("Obsada:", 16, 544, 44, 17)
$Group5 = GUICtrlCreateGroup("Plik", 328, 8, 297, 169)
$Edit3 = GUICtrlCreateEdit("", 336, 24, 281, 105)
GuiCtrlSetData(-1,"AviCodec")
$Input18 = GUICtrlCreateInput("", 336, 152, 89, 21)
$Input19 = GUICtrlCreateInput("", 432, 152, 89, 21)
$Input20 = GUICtrlCreateInput("", 528, 152, 89, 21)
$Label25 = GUICtrlCreateLabel("Jezyk", 361, 135, 31, 17)
$Label26 = GUICtrlCreateLabel("Napisy", 457, 135, 36, 17)
$Label27 = GUICtrlCreateLabel("Grupa", 553, 135, 33, 17)
$Group6 = GUICtrlCreateGroup("Screeny", 328, 184, 297, 177)
$Edit4 = GUICtrlCreateEdit("", 336, 200, 281, 153)
$Group7 = GUICtrlCreateGroup("Download", 328, 368, 297, 353, -1, $WS_EX_TRANSPARENT)
$Tab1 = GUICtrlCreateTab(336, 384, 281, 297)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("Epik 1")
$Input12 = GUICtrlCreateInput("", 348, 432, 257, 21)
$Label13 = GUICtrlCreateLabel("Nazwa", 348, 416, 37, 17)
$Edit5 = GUICtrlCreateEdit("", 348, 488, 257, 177)
$Label14 = GUICtrlCreateLabel("Download", 348, 472, 52, 17)
$TabSheet2 = GUICtrlCreateTabItem("Epik 2")
$Label15 = GUICtrlCreateLabel("Nazwa", 348, 416, 37, 17)
$Input13 = GUICtrlCreateInput("", 348, 432, 257, 21)
$Edit6 = GUICtrlCreateEdit("", 348, 488, 257, 177)
$Label16 = GUICtrlCreateLabel("Download", 348, 472, 52, 17)
$TabSheet3 = GUICtrlCreateTabItem("Epik 3")
$Label17 = GUICtrlCreateLabel("Nazwa", 348, 416, 37, 17)
$Input14 = GUICtrlCreateInput("", 348, 432, 257, 21)
$Edit7 = GUICtrlCreateEdit("", 348, 488, 257, 177)
$Label18 = GUICtrlCreateLabel("Download", 348, 472, 52, 17)
$TabSheet4 = GUICtrlCreateTabItem("Epik 4")
$Label19 = GUICtrlCreateLabel("Nazwa", 348, 416, 37, 17)
$Input15 = GUICtrlCreateInput("", 348, 432, 257, 21)
$Edit8 = GUICtrlCreateEdit("", 348, 488, 257, 177)
$Label20 = GUICtrlCreateLabel("Download", 348, 472, 52, 17)
$TabSheet5 = GUICtrlCreateTabItem("Epik 5")
$Label21 = GUICtrlCreateLabel("Nazwa", 348, 416, 37, 17)
$Input16 = GUICtrlCreateInput("", 348, 432, 257, 21)
$Edit9 = GUICtrlCreateEdit("", 348, 488, 257, 177)
$Label22 = GUICtrlCreateLabel("Download", 348, 472, 52, 17)
$TabSheet6 = GUICtrlCreateTabItem("Epik 6")
$Label23 = GUICtrlCreateLabel("Nazwa", 348, 416, 37, 17)
$Input17 = GUICtrlCreateInput("", 348, 432, 257, 21)
$Edit10 = GUICtrlCreateEdit("", 348, 488, 257, 177)
$Label24 = GUICtrlCreateLabel("Download", 348, 472, 52, 17)
GUICtrlCreateTabItem("")
$Checkbox1 = GUICtrlCreateCheckbox("Zbiorczy HC", 360, 688, 81, 17)
$Button1 = GUICtrlCreateButton("Uczestnicy Misji", 456, 688, 137, 17, $WS_GROUP)

GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg(1)
Select 
;~  If $nMsg = $MenuItem10 Then
    Case $nMsg[0] = $MenuItem10 And $nMsg[1] = $Form1
    $Form2 = GUICreate("Pobierz Informacje - azunime.net", 317, 82, 192, 124)
    $Labeln1 = GUICtrlCreateLabel("Link:", 8, 8, 27, 17)
    $Inputn1 = GUICtrlCreateInput("", 8, 24, 297, 21)
    $Buttonn1 = GUICtrlCreateButton("Znajdz", 130, 56, 57, 17, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
;~     While 1
;~         $nMsg = GuiGetMsg()
;~         Switch $nMsg
        Case $nMsg[0] = $Buttonn1 And $nMsg[1] = $Form1
            If Not GuiCtrlRead($Inputn1) = "" Then
                $oIE = _IECreate(GuiCtrlRead($Inputn1))
                _IELoadWait($oIE)
                $tyt = _IEGetObjById($oIE,"typanime") ; Typ Anime (np Serial TV)
                $prm = _IEGetObjById($oIE,"premiera") ; Data Premiery
                $ocr = _IEGetObjById($oIE,"ocena_redakcji") ; Ocena Redakcji
                $ogw = _IEGetObjById($oIE,"ograniczenie_wieku") ; Ograniczenia wiekowe
                $ogi = _IEGetObjById($oIE,"ograniczenie_img") ; Ikonka ograniczen + http://azunime.net/anime/
                $opi = _IEGetObjByID($oIE,"synopsis") ; opis
                If @Error Then
                ToolTip("Nie znaleziono niektórych informacji!",0,0,"Blad")
                EndIf
                $l1 = StringReplace(_IEPropertyGet($tyt,"innertext"), "Produkcja" & @CRLF, "")
                $l2 = StringReplace(_IEPropertyGet($prm,"innertext"), "Premiera" & @CRLF, "")
                $naw1 = StringReplace(_IEPropertyGet($ogw,"innertext"),"(","")
                $naw2 = StringReplace($naw1,")","")
                $l3 = StringReplace(_IEPropertyGet($ocr,"innertext"), "Ocena redakcji", "")
                If NOT $l1 = 0 Then
                    GuiCtrlSetData($Input4,$l1)
                EndIf
                If NOT $l2 = 0 Then
                    GuiCtrlSetData($Input5,$l2)
                EndIf
                If Not $naw2 = 0 Then
                    GuiCtrlSetData($Input6,$naw2)
                EndIf
                If NOT $l3 = 0 Then
                    GuiCtrlSetData($Input7,$l3 & " [redakcja Azunime.net]")
                EndIf
            Else
                MsgBox(48,"Pobierz Informacje...","Najpierw wpisz link!")
            EndIf
        Case $nMsg[0] = $GUI_EVENT_CLOSE And $nMsg[1] = $Form2
            GuiDelete($Form2)
        Case $nMsg[0] = $GUI_EVENT_CLOSE And $nMsg[1] = $Form1
            GuiDelete($Form1)
            Exit
    EndSelect
;~  EndSwitch
    WEnd
;~ EndIf
;~ Switch $nMsg
;~ Case $GUI_EVENT_CLOSE
;~ Exit

;~ EndSwitch
;~ WEnd
Edited by Yoriz
GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...