Sign in to follow this  
Followers 0
ngskicker

Help with get window text

5 posts in this topic

i have to always read text in a window, but i can imagine how to do it with one gui, so i cretae 2 gui, wich one is main gui, and another one is gui that read a window text then send text to main gui, but i get things that do not want in, pease someone correct my script, sorry my bad english

main gui

#NoTrayIcon
#include <GUIConstantsEx.au3>
#include <EditConstants.au3>

Opt("GUIOnEventMode", 1)
Opt("WinTextMatchMode", 3)
Opt("WinTitleMatchMode", 3)
Opt("WinDetectHiddenText", 1)
Opt("GUIDataSeparatorChar", ";")

$Form = GUICreate("ngskicker", 200, 380)
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
$Tab = GUICtrlCreateTab(0, 0, 200, 380)
GUICtrlCreateTabItem("Username")
$Group1A = GUICtrlCreateGroup("Username", 8, 25, 129, 245)
$Input1A = GUICtrlCreateInput("", 16, 40, 113, 20)
$Input2A = GUICtrlCreateInput("", 16, 60, 113, 20)
$Input3A = GUICtrlCreateInput("", 16, 80, 113, 20)
$Input4A = GUICtrlCreateInput("", 16, 100, 113, 20)
$Input5A = GUICtrlCreateInput("", 16, 120, 113, 20)
$Input6A = GUICtrlCreateInput("", 16, 140, 113, 20)
$Input7A = GUICtrlCreateInput("", 16, 160, 113, 20)
$Input8A = GUICtrlCreateInput("", 16, 180, 113, 20)
$Input9A = GUICtrlCreateInput("", 16, 200, 113, 20)
$Input0A = GUICtrlCreateInput("", 16, 220, 113, 20)
$PasswdA = GUICtrlCreateInput("", 16, 245, 113, 20, $ES_PASSWORD)
$Button1A = GUICtrlCreateButton("Open", 140, 40, 50, 25)
GUICtrlSetOnEvent(-1,"Button1A")
$Button2A = GUICtrlCreateButton("Close", 140, 70, 50, 25, 0)
GUICtrlSetOnEvent(-1,"Button2A")
$Button3A = GUICtrlCreateButton("Q-Load", 140, 100, 50, 25, 0)
GUICtrlSetOnEvent(-1,"Button3A")
$Button4A = GUICtrlCreateButton("Q-Save", 140, 130, 50, 25, 0)
GUICtrlSetOnEvent(-1,"Button4A")
$Button5A = GUICtrlCreateButton("Load", 140, 160, 50, 25, 0)
GUICtrlSetOnEvent(-1,"Button5A")
$Button6A = GUICtrlCreateButton("Save", 140, 190, 50, 25, 0)
GUICtrlSetOnEvent(-1,"Button6A")
$Button7A = GUICtrlCreateButton("Clear", 140, 220, 50, 25, 0)
GUICtrlSetOnEvent(-1,"Button7A")
$Label1A = GUICtrlCreateLabel("Password", 140, 250, 45, 17)
GUICtrlCreateTabItem("Control")
$Combobox = GUICtrlCreateInput("", 10, 30, 125)
$List = GUICtrlCreateList("", 10, 55, 125, 215)
GUICtrlSetOnEvent(-1,"KickList")
$ToListInput = GUICtrlCreateInput("", 10, 280, 125, 20, $ES_READONLY)
$Button1B = GUICtrlCreateButton("Room", 140, 30, 50, 20)
GUICtrlSetOnEvent(-1,"Button1B")
$Button2B = GUICtrlCreateButton("Enter", 140, 55, 50, 20, 0)
GUICtrlSetOnEvent(-1,"Button2B")
$Button3B = GUICtrlCreateButton("Clear", 140, 80, 50, 20, 0)
GUICtrlSetOnEvent(-1,"Button3B")
$Button4B = GUICtrlCreateButton("Leave", 140, 105, 50, 20, 0)
GUICtrlSetOnEvent(-1,"Button4B")
$Button5B = GUICtrlCreateButton("Pause", 140, 130, 50, 20, 0)
GUICtrlSetOnEvent(-1,"Button5B")
$Button6B = GUICtrlCreateButton("Kill All", 140, 155, 50, 20, 0)
GUICtrlSetState(-1,$GUI_DISABLE)
GUICtrlSetOnEvent(-1,"Button6B")
$Button7B = GUICtrlCreateButton("Flood",  140, 180, 50, 20, 0)
GUICtrlSetState(-1,$GUI_DISABLE)
$Button8B = GUICtrlCreateButton("Stop",  140, 205, 50, 20, 0)
GUICtrlSetState(-1,$GUI_DISABLE)
$Label1B = GUICtrlCreateLabel("Mode:", 150, 235)
$Input2B = GUICtrlCreateInput("Normal", 140, 250, 50, 20, $ES_READONLY + $ES_CENTER)
$ToListButton = GUICtrlCreateButton(".", 140, 280, 50, 20, 0)
GUICtrlSetOnEvent(-1,"ToListButton")
GUICtrlCreateTabItem("Setting")
GUICtrlCreateGroup("Mode", 8, 30, 182, 50)
$Radio1C = GUICtrlCreateRadio("Normal", 15, 50)
GUICtrlSetOnEvent(-1,"Radio1C")
GUICtrlSetState(-1, $GUI_CHECKED)
$Radio2C = GUICtrlCreateRadio("War", 80, 50)
GUICtrlSetOnEvent(-1,"Radio2C")
$Radio3C = GUICtrlCreateRadio("Flood", 135, 50)
GUICtrlSetOnEvent(-1,"Radio3C")
GUICtrlCreateGroup("Normal mode auto enter after kick", 8, 85, 182, 45)
$Radio4C = GUICtrlCreateRadio("Disable", 15, 100)
GUICtrlSetState(-1, $GUI_CHECKED)
$Radio5C = GUICtrlCreateRadio("Enable", 80, 100)
GUICtrlCreateGroup("War mode kick delay", 8, 135, 182, 80)
$Radio6C = GUICtrlCreateRadio("Fast", 15, 150)
GUICtrlSetOnEvent(-1,"Radio6C")
GUICtrlSetState(-1, $GUI_CHECKED)
$Radio7C = GUICtrlCreateRadio("Normal", 15, 170)
GUICtrlSetOnEvent(-1,"Radio7C")
$Radio8C = GUICtrlCreateRadio("Slow", 15, 190)
GUICtrlSetOnEvent(-1,"Radio8C")
$Input1C = GUICtrlCreateInput("250", 120, 159, 32, 20, $ES_NUMBER + $ES_RIGHT)
GUICtrlCreateLabel("Ms", 155, 160)
$Button1C = GUICtrlCreateButton("Apply", 120, 183, 50)
GUICtrlCreateGroup("Flood Option", 8, 220, 182, 50)
$Combo1C = GUICtrlCreateCombo("", 15, 240, 130)
$Button2C = GUICtrlCreateButton("Set", 150, 240, 35, 22)
GUICtrlCreateTabItem("About")
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)

While 1
    Sleep(1000)
WEnd

Func Close()
    Exit
EndFunc

Func Button1A() ; Open migpro
    Select 
        Case GUICtrlRead($Radio1C) = $GUI_CHECKED
            If ProcessExists("ngs-1.exe") Then
            Else
                Run("MP\NORMAL\ngs-1.exe")
            EndIf
            If ProcessExists("ngs-2.exe") Then
            Else
                Run("MP\NORMAL\ngs-2.exe")
            EndIf
            If ProcessExists("ngs-3.exe") Then
            Else
                Run("MP\NORMAL\ngs-3.exe")
            EndIf
            If ProcessExists("ngs-4.exe") Then
            Else
                Run("MP\NORMAL\ngs-4.exe")
            EndIf
            If ProcessExists("ngs-5.exe") Then
            Else
                Run("MP\NORMAL\ngs-5.exe")
            EndIf
            If ProcessExists("ngs-6.exe") Then
            Else
                Run("MP\NORMAL\ngs-6.exe")
            EndIf
            If ProcessExists("ngs-7.exe") Then
            Else
                Run("MP\NORMAL\ngs-7.exe")
            EndIf
            If ProcessExists("ngs-8.exe") Then
            Else
                Run("MP\NORMAL\ngs-8.exe")
            EndIf
            If ProcessExists("ngs-9.exe") Then
            Else
                Run("MP\NORMAL\ngs-9.exe")
            EndIf
            If ProcessExists("ngs-0.exe") Then
            Else
                Run("MP\NORMAL\ngs-0.exe")
            EndIf
        Case GUICtrlRead($Radio2C) = $GUI_CHECKED
            If ProcessExists("ngs-1.exe") Then
            Else
                Run("MP\DUEL\ngs-1.exe")
            EndIf
            If ProcessExists("ngs-2.exe") Then
            Else
                Run("MP\DUEL\ngs-2.exe")
            EndIf
            If ProcessExists("ngs-3.exe") Then
            Else
                Run("MP\DUEL\ngs-3.exe")
            EndIf
            If ProcessExists("ngs-4.exe") Then
            Else
                Run("MP\DUEL\ngs-4.exe")
            EndIf
            If ProcessExists("ngs-5.exe") Then
            Else
                Run("MP\DUEL\ngs-5.exe")
            EndIf
            If ProcessExists("ngs-6.exe") Then
            Else
                Run("MP\DUEL\ngs-6.exe")
            EndIf
            If ProcessExists("ngs-7.exe") Then
            Else
                Run("MP\DUEL\ngs-7.exe")
            EndIf
            If ProcessExists("ngs-8.exe") Then
            Else
                Run("MP\DUEL\ngs-8.exe")
            EndIf
            If ProcessExists("ngs-9.exe") Then
            Else
                Run("MP\DUEL\ngs-9.exe")
            EndIf
            If ProcessExists("ngs-0.exe") Then
            Else
                Run("MP\DUEL\ngs-0.exe")
            EndIf
            If ProcessExists("ngs-1a.exe") Then
            Else
                Run("MP\DUEL\ngs-1a.exe")
            EndIf
            If ProcessExists("ngs-2a.exe") Then
            Else
                Run("MP\DUEL\ngs-2a.exe")
            EndIf
            If ProcessExists("ngs-3a.exe") Then
            Else
                Run("MP\DUEL\ngs-3a.exe")
            EndIf
            If ProcessExists("ngs-4a.exe") Then
            Else
                Run("MP\DUEL\ngs-4a.exe")
            EndIf
            If ProcessExists("ngs-5a.exe") Then
            Else
                Run("MP\DUEL\ngs-5a.exe")
            EndIf
            If ProcessExists("ngs-6a.exe") Then
            Else
                Run("MP\DUEL\ngs-6a.exe")
            EndIf
            If ProcessExists("ngs-7a.exe") Then
            Else
                Run("MP\DUEL\ngs-7a.exe")
            EndIf
            If ProcessExists("ngs-8a.exe") Then
            Else
                Run("MP\DUEL\ngs-8a.exe")
            EndIf
            If ProcessExists("ngs-9a.exe") Then
            Else
                Run("MP\DUEL\ngs-9a.exe")
            EndIf
            If ProcessExists("ngs-0a.exe") Then
            Else
                Run("MP\DUEL\ngs-0a.exe")
            EndIf
            If ProcessExists("ngs-1b.exe") Then
            Else
                Run("MP\DUEL\ngs-1b.exe")
            EndIf
            If ProcessExists("ngs-2b.exe") Then
            Else
                Run("MP\DUEL\ngs-2b.exe")
            EndIf
            If ProcessExists("ngs-3b.exe") Then
            Else
                Run("MP\DUEL\ngs-3b.exe")
            EndIf
            If ProcessExists("ngs-4b.exe") Then
            Else
                Run("MP\DUEL\ngs-4b.exe")
            EndIf
            If ProcessExists("ngs-5b.exe") Then
            Else
                Run("MP\DUEL\ngs-5b.exe")
            EndIf
            If ProcessExists("ngs-6b.exe") Then
            Else
                Run("MP\DUEL\ngs-6b.exe")
            EndIf
            If ProcessExists("ngs-7b.exe") Then
            Else
                Run("MP\DUEL\ngs-7b.exe")
            EndIf
            If ProcessExists("ngs-8b.exe") Then
            Else
                Run("MP\DUEL\ngs-8b.exe")
            EndIf
            If ProcessExists("ngs-9b.exe") Then
            Else
                Run("MP\DUEL\ngs-9b.exe")
            EndIf
            If ProcessExists("ngs-0b.exe") Then
            Else
                Run("MP\DUEL\ngs-0b.exe")
            EndIf
            If ProcessExists("ngs-1c.exe") Then
            Else
                Run("MP\DUEL\ngs-1c.exe")
            EndIf
            If ProcessExists("ngs-2c.exe") Then
            Else
                Run("MP\DUEL\ngs-2c.exe")
            EndIf
            If ProcessExists("ngs-3c.exe") Then
            Else
                Run("MP\DUEL\ngs-3c.exe")
            EndIf
            If ProcessExists("ngs-4c.exe") Then
            Else
                Run("MP\DUEL\ngs-4c.exe")
            EndIf
            If ProcessExists("ngs-5c.exe") Then
            Else
                Run("MP\DUEL\ngs-5c.exe")
            EndIf
            If ProcessExists("ngs-6c.exe") Then
            Else
                Run("MP\DUEL\ngs-6c.exe")
            EndIf
            If ProcessExists("ngs-7c.exe") Then
            Else
                Run("MP\DUEL\ngs-7c.exe")
            EndIf
            If ProcessExists("ngs-8c.exe") Then
            Else
                Run("MP\DUEL\ngs-8c.exe")
            EndIf
            If ProcessExists("ngs-9c.exe") Then
            Else
                Run("MP\DUEL\ngs-9c.exe")
            EndIf
            If ProcessExists("ngs-0c.exe") Then
            Else
                Run("MP\DUEL\ngs-0c.exe")
            EndIf
            If ProcessExists("ngs-1d.exe") Then
            Else
                Run("MP\DUEL\ngs-1d.exe")
            EndIf
            If ProcessExists("ngs-2d.exe") Then
            Else
                Run("MP\DUEL\ngs-2d.exe")
            EndIf
            If ProcessExists("ngs-3d.exe") Then
            Else
                Run("MP\DUEL\ngs-3d.exe")
            EndIf
            If ProcessExists("ngs-4d.exe") Then
            Else
                Run("MP\DUEL\ngs-4d.exe")
            EndIf
            If ProcessExists("ngs-5d.exe") Then
            Else
                Run("MP\DUEL\ngs-5d.exe")
            EndIf
            If ProcessExists("ngs-6d.exe") Then
            Else
                Run("MP\DUEL\ngs-6d.exe")
            EndIf
            If ProcessExists("ngs-7d.exe") Then
            Else
                Run("MP\DUEL\ngs-7d.exe")
            EndIf
            If ProcessExists("ngs-8d.exe") Then
            Else
                Run("MP\DUEL\ngs-8d.exe")
            EndIf
            If ProcessExists("ngs-9d.exe") Then
            Else
                Run("MP\DUEL\ngs-9d.exe")
            EndIf
            If ProcessExists("ngs-0d.exe") Then
            Else
                Run("MP\DUEL\ngs-0d.exe")
            EndIf
            If ProcessExists("ngs-1e.exe") Then
            Else
                Run("MP\DUEL\ngs-1e.exe")
            EndIf
            If ProcessExists("ngs-2e.exe") Then
            Else
                Run("MP\DUEL\ngs-2e.exe")
            EndIf
            If ProcessExists("ngs-3e.exe") Then
            Else
                Run("MP\DUEL\ngs-3e.exe")
            EndIf
            If ProcessExists("ngs-4e.exe") Then
            Else
                Run("MP\DUEL\ngs-4e.exe")
            EndIf
            If ProcessExists("ngs-5e.exe") Then
            Else
                Run("MP\DUEL\ngs-5e.exe")
            EndIf
            If ProcessExists("ngs-6e.exe") Then
            Else
                Run("MP\DUEL\ngs-6e.exe")
            EndIf
            If ProcessExists("ngs-7e.exe") Then
            Else
                Run("MP\DUEL\ngs-7e.exe")
            EndIf
            If ProcessExists("ngs-8e.exe") Then
            Else
                Run("MP\DUEL\ngs-8e.exe")
            EndIf
            If ProcessExists("ngs-9e.exe") Then
            Else
                Run("MP\DUEL\ngs-9e.exe")
            EndIf
            If ProcessExists("ngs-0e.exe") Then
            Else
                Run("MP\DUEL\ngs-0e.exe")
            EndIf
            If ProcessExists("ngs-1f.exe") Then
            Else
                Run("MP\DUEL\ngs-1f.exe")
            EndIf
            If ProcessExists("ngs-2f.exe") Then
            Else
                Run("MP\DUEL\ngs-2f.exe")
            EndIf
            If ProcessExists("ngs-3f.exe") Then
            Else
                Run("MP\DUEL\ngs-3f.exe")
            EndIf
            If ProcessExists("ngs-4f.exe") Then
            Else
                Run("MP\DUEL\ngs-4f.exe")
            EndIf
            If ProcessExists("ngs-5f.exe") Then
            Else
                Run("MP\DUEL\ngs-5f.exe")
            EndIf
            If ProcessExists("ngs-6f.exe") Then
            Else
                Run("MP\DUEL\ngs-6f.exe")
            EndIf
            If ProcessExists("ngs-7f.exe") Then
            Else
                Run("MP\DUEL\ngs-7f.exe")
            EndIf
            If ProcessExists("ngs-8f.exe") Then
            Else
                Run("MP\DUEL\ngs-8f.exe")
            EndIf
            If ProcessExists("ngs-9f.exe") Then
            Else
                Run("MP\DUEL\ngs-9f.exe")
            EndIf
            If ProcessExists("ngs-0f.exe") Then
            Else
                Run("MP\DUEL\ngs-0f.exe")
            EndIf
            If ProcessExists("ngs-1g.exe") Then
            Else
                Run("MP\DUEL\ngs-1g.exe")
            EndIf
            If ProcessExists("ngs-2g.exe") Then
            Else
                Run("MP\DUEL\ngs-2g.exe")
            EndIf
            If ProcessExists("ngs-3g.exe") Then
            Else
                Run("MP\DUEL\ngs-3g.exe")
            EndIf
            If ProcessExists("ngs-4g.exe") Then
            Else
                Run("MP\DUEL\ngs-4g.exe")
            EndIf
            If ProcessExists("ngs-5g.exe") Then
            Else
                Run("MP\DUEL\ngs-5g.exe")
            EndIf
            If ProcessExists("ngs-6g.exe") Then
            Else
                Run("MP\DUEL\ngs-6g.exe")
            EndIf
            If ProcessExists("ngs-7g.exe") Then
            Else
                Run("MP\DUEL\ngs-7g.exe")
            EndIf
            If ProcessExists("ngs-8g.exe") Then
            Else
                Run("MP\DUEL\ngs-8g.exe")
            EndIf
            If ProcessExists("ngs-9g.exe") Then
            Else
                Run("MP\DUEL\ngs-9g.exe")
            EndIf
            If ProcessExists("ngs-0g.exe") Then
            Else
                Run("MP\DUEL\ngs-0g.exe")
            EndIf
            If ProcessExists("ngs-1h.exe") Then
            Else
                Run("MP\DUEL\ngs-1h.exe")
            EndIf
            If ProcessExists("ngs-2h.exe") Then
            Else
                Run("MP\DUEL\ngs-2h.exe")
            EndIf
            If ProcessExists("ngs-3h.exe") Then
            Else
                Run("MP\DUEL\ngs-3h.exe")
            EndIf
            If ProcessExists("ngs-4h.exe") Then
            Else
                Run("MP\DUEL\ngs-4h.exe")
            EndIf
            If ProcessExists("ngs-5h.exe") Then
            Else
                Run("MP\DUEL\ngs-5h.exe")
            EndIf
            If ProcessExists("ngs-6h.exe") Then
            Else
                Run("MP\DUEL\ngs-6h.exe")
            EndIf
            If ProcessExists("ngs-7h.exe") Then
            Else
                Run("MP\DUEL\ngs-7h.exe")
            EndIf
            If ProcessExists("ngs-8h.exe") Then
            Else
                Run("MP\DUEL\ngs-8h.exe")
            EndIf
            If ProcessExists("ngs-9h.exe") Then
            Else
                Run("MP\DUEL\ngs-9h.exe")
            EndIf
            If ProcessExists("ngs-0h.exe") Then
            Else
                Run("MP\DUEL\ngs-0h.exe")
            EndIf
            If ProcessExists("ngs-1i.exe") Then
            Else
                Run("MP\DUEL\ngs-1i.exe")
            EndIf
            If ProcessExists("ngs-2i.exe") Then
            Else
                Run("MP\DUEL\ngs-2i.exe")
            EndIf
            If ProcessExists("ngs-3i.exe") Then
            Else
                Run("MP\DUEL\ngs-3i.exe")
            EndIf
            If ProcessExists("ngs-4i.exe") Then
            Else
                Run("MP\DUEL\ngs-4i.exe")
            EndIf
            If ProcessExists("ngs-5i.exe") Then
            Else
                Run("MP\DUEL\ngs-5i.exe")
            EndIf
            If ProcessExists("ngs-6i.exe") Then
            Else
                Run("MP\DUEL\ngs-6i.exe")
            EndIf
            If ProcessExists("ngs-7i.exe") Then
            Else
                Run("MP\DUEL\ngs-7i.exe")
            EndIf
            If ProcessExists("ngs-8i.exe") Then
            Else
                Run("MP\DUEL\ngs-8i.exe")
            EndIf
            If ProcessExists("ngs-9i.exe") Then
            Else
                Run("MP\DUEL\ngs-9i.exe")
            EndIf
            If ProcessExists("ngs-0i.exe") Then
            Else
                Run("MP\DUEL\ngs-0i.exe")
            EndIf
            If ProcessExists("ngs-1j.exe") Then
            Else
                Run("MP\DUEL\ngs-1j.exe")
            EndIf
            If ProcessExists("ngs-2j.exe") Then
            Else
                Run("MP\DUEL\ngs-2j.exe")
            EndIf
            If ProcessExists("ngs-3j.exe") Then
            Else
                Run("MP\DUEL\ngs-3j.exe")
            EndIf
            If ProcessExists("ngs-4j.exe") Then
            Else
                Run("MP\DUEL\ngs-4j.exe")
            EndIf
            If ProcessExists("ngs-5j.exe") Then
            Else
                Run("MP\DUEL\ngs-5j.exe")
            EndIf
            If ProcessExists("ngs-6j.exe") Then
            Else
                Run("MP\DUEL\ngs-6j.exe")
            EndIf
            If ProcessExists("ngs-7j.exe") Then
            Else
                Run("MP\DUEL\ngs-7j.exe")
            EndIf
            If ProcessExists("ngs-8j.exe") Then
            Else
                Run("MP\DUEL\ngs-8j.exe")
            EndIf
            If ProcessExists("ngs-9j.exe") Then
            Else
                Run("MP\DUEL\ngs-9j.exe")
            EndIf
            If ProcessExists("ngs-0j.exe") Then
            Else
                Run("MP\DUEL\ngs-0j.exe")
            EndIf
        Case Else GUICtrlRead($Radio3C) = $GUI_CHECKED
            If ProcessExists("ngs-1.exe") Then
            Else
                Run("MP\FLOOD\ngs-1.exe")
            EndIf
            If ProcessExists("ngs-2.exe") Then
            Else
                Run("MP\FLOOD\ngs-2.exe")
            EndIf
            If ProcessExists("ngs-3.exe") Then
            Else
                Run("MP\FLOOD\ngs-3.exe")
            EndIf
            If ProcessExists("ngs-4.exe") Then
            Else
                Run("MP\FLOOD\ngs-4.exe")
            EndIf
            If ProcessExists("ngs-5.exe") Then
            Else
                Run("MP\FLOOD\ngs-5.exe")
            EndIf
            If ProcessExists("ngs-6.exe") Then
            Else
                Run("MP\FLOOD\ngs-6.exe")
            EndIf
            If ProcessExists("ngs-7.exe") Then
            Else
                Run("MP\FLOOD\ngs-7.exe")
            EndIf
            If ProcessExists("ngs-8.exe") Then
            Else
                Run("MP\FLOOD\ngs-8.exe")
            EndIf
            If ProcessExists("ngs-9.exe") Then
            Else
                Run("MP\FLOOD\ngs-9.exe")
            EndIf
            If ProcessExists("ngs-0.exe") Then
            Else
                Run("MP\FLOOD\ngs-0.exe")
            EndIf
    EndSelect
EndFunc

Func Button2A() ; Close migpro
    ProcessClose("ngs-1.exe")
    ProcessClose("ngs-2.exe")
    ProcessClose("ngs-3.exe")
    ProcessClose("ngs-4.exe")
    ProcessClose("ngs-5.exe")
    ProcessClose("ngs-6.exe")
    ProcessClose("ngs-7.exe")
    ProcessClose("ngs-8.exe")
    ProcessClose("ngs-9.exe")
    ProcessClose("ngs-0.exe")
    ProcessClose("ngs-1a.exe")
    ProcessClose("ngs-2a.exe")
    ProcessClose("ngs-3a.exe")
    ProcessClose("ngs-4a.exe")
    ProcessClose("ngs-5a.exe")
    ProcessClose("ngs-6a.exe")
    ProcessClose("ngs-7a.exe")
    ProcessClose("ngs-8a.exe")
    ProcessClose("ngs-9a.exe")
    ProcessClose("ngs-0a.exe")
    ProcessClose("ngs-1b.exe")
    ProcessClose("ngs-2b.exe")
    ProcessClose("ngs-3b.exe")
    ProcessClose("ngs-4b.exe")
    ProcessClose("ngs-5b.exe")
    ProcessClose("ngs-6b.exe")
    ProcessClose("ngs-7b.exe")
    ProcessClose("ngs-8b.exe")
    ProcessClose("ngs-9b.exe")
    ProcessClose("ngs-0b.exe")
    ProcessClose("ngs-1c.exe")
    ProcessClose("ngs-2c.exe")
    ProcessClose("ngs-3c.exe")
    ProcessClose("ngs-4c.exe")
    ProcessClose("ngs-5c.exe")
    ProcessClose("ngs-6c.exe")
    ProcessClose("ngs-7c.exe")
    ProcessClose("ngs-8c.exe")
    ProcessClose("ngs-9c.exe")
    ProcessClose("ngs-0c.exe")
    ProcessClose("ngs-1d.exe")
    ProcessClose("ngs-2d.exe")
    ProcessClose("ngs-3d.exe")
    ProcessClose("ngs-4d.exe")
    ProcessClose("ngs-5d.exe")
    ProcessClose("ngs-6d.exe")
    ProcessClose("ngs-7d.exe")
    ProcessClose("ngs-8d.exe")
    ProcessClose("ngs-9d.exe")
    ProcessClose("ngs-0d.exe")
    ProcessClose("ngs-1e.exe")
    ProcessClose("ngs-2e.exe")
    ProcessClose("ngs-3e.exe")
    ProcessClose("ngs-4e.exe")
    ProcessClose("ngs-5e.exe")
    ProcessClose("ngs-6e.exe")
    ProcessClose("ngs-7e.exe")
    ProcessClose("ngs-8e.exe")
    ProcessClose("ngs-9e.exe")
    ProcessClose("ngs-0e.exe")
    ProcessClose("ngs-1f.exe")
    ProcessClose("ngs-2f.exe")
    ProcessClose("ngs-3f.exe")
    ProcessClose("ngs-4f.exe")
    ProcessClose("ngs-5f.exe")
    ProcessClose("ngs-6f.exe")
    ProcessClose("ngs-7f.exe")
    ProcessClose("ngs-8f.exe")
    ProcessClose("ngs-9f.exe")
    ProcessClose("ngs-0f.exe")
    ProcessClose("ngs-1g.exe")
    ProcessClose("ngs-2g.exe")
    ProcessClose("ngs-3g.exe")
    ProcessClose("ngs-4g.exe")
    ProcessClose("ngs-5g.exe")
    ProcessClose("ngs-6g.exe")
    ProcessClose("ngs-7g.exe")
    ProcessClose("ngs-8g.exe")
    ProcessClose("ngs-9g.exe")
    ProcessClose("ngs-0g.exe")
    ProcessClose("ngs-1h.exe")
    ProcessClose("ngs-2h.exe")
    ProcessClose("ngs-3h.exe")
    ProcessClose("ngs-4h.exe")
    ProcessClose("ngs-5h.exe")
    ProcessClose("ngs-6h.exe")
    ProcessClose("ngs-7h.exe")
    ProcessClose("ngs-8h.exe")
    ProcessClose("ngs-9h.exe")
    ProcessClose("ngs-0h.exe")
    ProcessClose("ngs-1i.exe")
    ProcessClose("ngs-2i.exe")
    ProcessClose("ngs-3i.exe")
    ProcessClose("ngs-4i.exe")
    ProcessClose("ngs-5i.exe")
    ProcessClose("ngs-6i.exe")
    ProcessClose("ngs-7i.exe")
    ProcessClose("ngs-8i.exe")
    ProcessClose("ngs-9i.exe")
    ProcessClose("ngs-0i.exe")
    ProcessClose("ngs-1j.exe")
    ProcessClose("ngs-2j.exe")
    ProcessClose("ngs-3j.exe")
    ProcessClose("ngs-4j.exe")
    ProcessClose("ngs-5j.exe")
    ProcessClose("ngs-6j.exe")
    ProcessClose("ngs-7j.exe")
    ProcessClose("ngs-8j.exe")
    ProcessClose("ngs-9j.exe")
    ProcessClose("ngs-0j.exe")
EndFunc

Func Button3A() ; Quick Load
    $Load1 = IniRead("setup.ini","details","id01","")
    $Load2 = IniRead("setup.ini","details","id02","")
    $Load3 = IniRead("setup.ini","details","id03","")
    $Load4 = IniRead("setup.ini","details","id04","")
    $Load5 = IniRead("setup.ini","details","id05","")
    $Load6 = IniRead("setup.ini","details","id06","")
    $Load7 = IniRead("setup.ini","details","id07","")
    $Load8 = IniRead("setup.ini","details","id08","")
    $Load9 = IniRead("setup.ini","details","id09","")
    $Load0 = IniRead("setup.ini","details","id00","")
    $LoadP = IniRead("setup.ini","details","pass","")
    GUICtrlSetData($Input1A,$Load1)
    GUICtrlSetData($Input2A,$Load2)
    GUICtrlSetData($Input3A,$Load3)
    GUICtrlSetData($Input4A,$Load4)
    GUICtrlSetData($Input5A,$Load5)
    GUICtrlSetData($Input6A,$Load6)
    GUICtrlSetData($Input7A,$Load7)
    GUICtrlSetData($Input8A,$Load8)
    GUICtrlSetData($Input9A,$Load9)
    GUICtrlSetData($Input0A,$Load0)
    GUICtrlSetData($PasswdA,$LoadP)

EndFunc

Func Button4A() ; Quick Save
    $Uname1 = GUICtrlRead($Input1A)
    $Uname2 = GUICtrlRead($Input2A)
    $Uname3 = GUICtrlRead($Input3A)
    $Uname4 = GUICtrlRead($Input4A)
    $Uname5 = GUICtrlRead($Input5A)
    $Uname6 = GUICtrlRead($Input6A)
    $Uname7 = GUICtrlRead($Input7A)
    $Uname8 = GUICtrlRead($Input8A)
    $Uname9 = GUICtrlRead($Input9A)
    $Uname0 = GUICtrlRead($Input0A)
    $Pass = GUICtrlRead($PasswdA)
    IniWrite("setup.ini","details","id01",$Uname1)
    IniWrite("setup.ini","details","id02",$Uname2)
    IniWrite("setup.ini","details","id03",$Uname3)
    IniWrite("setup.ini","details","id04",$Uname4)
    IniWrite("setup.ini","details","id05",$Uname5)
    IniWrite("setup.ini","details","id06",$Uname6)
    IniWrite("setup.ini","details","id07",$Uname7)
    IniWrite("setup.ini","details","id08",$Uname8)
    IniWrite("setup.ini","details","id09",$Uname9)
    IniWrite("setup.ini","details","id00",$Uname0)
    IniWrite("setup.ini","details","pass",$Pass)
    Sleep(100)
    MsgBox(0,"ngskicker","detail has been saved",1)
EndFunc

Func Button5A() ; Load set
    $FileOpen = FileOpenDialog("Open Set", "DATA\", "Setup (*.ini)", 2)
    If @error Then
    Else
        $Load1 = IniRead($FileOpen,"details","id01","")
        $Load2 = IniRead($FileOpen,"details","id02","")
        $Load3 = IniRead($FileOpen,"details","id03","")
        $Load4 = IniRead($FileOpen,"details","id04","")
        $Load5 = IniRead($FileOpen,"details","id05","")
        $Load6 = IniRead($FileOpen,"details","id06","")
        $Load7 = IniRead($FileOpen,"details","id07","")
        $Load8 = IniRead($FileOpen,"details","id08","")
        $Load9 = IniRead($FileOpen,"details","id09","")
        $Load0 = IniRead($FileOpen,"details","id00","")
        $LoadP = IniRead($FileOpen,"details","pass","")
        GUICtrlSetData($Input1A,$Load1)
        GUICtrlSetData($Input2A,$Load1)
        GUICtrlSetData($Input3A,$Load2)
        GUICtrlSetData($Input4A,$Load3)
        GUICtrlSetData($Input5A,$Load4)
        GUICtrlSetData($Input6A,$Load5)
        GUICtrlSetData($Input7A,$Load6)
        GUICtrlSetData($Input8A,$Load7)
        GUICtrlSetData($Input9A,$Load8)
        GUICtrlSetData($Input0A,$Load9)
        GUICtrlSetData($PasswdA,$LoadP)
        $Uname1 = GUICtrlRead($Input1A)
        $Uname2 = GUICtrlRead($Input2A)
        $Uname3 = GUICtrlRead($Input3A)
        $Uname4 = GUICtrlRead($Input4A)
        $Uname5 = GUICtrlRead($Input5A)
        $Uname6 = GUICtrlRead($Input6A)
        $Uname7 = GUICtrlRead($Input7A)
        $Uname8 = GUICtrlRead($Input8A)
        $Uname9 = GUICtrlRead($Input9A)
        $Uname0 = GUICtrlRead($Input0A)
        $Pass = GUICtrlRead($PasswdA)
        IniWrite("setup.ini","details","id01",$Uname1)
        IniWrite("setup.ini","details","id02",$Uname2)
        IniWrite("setup.ini","details","id03",$Uname3)
        IniWrite("setup.ini","details","id04",$Uname4)
        IniWrite("setup.ini","details","id05",$Uname5)
        IniWrite("setup.ini","details","id06",$Uname6)
        IniWrite("setup.ini","details","id07",$Uname7)
        IniWrite("setup.ini","details","id08",$Uname8)
        IniWrite("setup.ini","details","id09",$Uname9)
        IniWrite("setup.ini","details","id00",$Uname0)
        IniWrite("setup.ini","details","pass",$Pass)
    EndIf
EndFunc

Func Button6A() ; Save Set
    $FileSave = FileSaveDialog("Save","DATA\", "Setup (*.ini)", 2)
    If @error Then
    Else
        $FileSave1 = GUICtrlRead($Input1A)
        $FileSave2 = GUICtrlRead($Input2A)
        $FileSave3 = GUICtrlRead($Input3A)
        $FileSave4 = GUICtrlRead($Input4A)
        $FileSave5 = GUICtrlRead($Input5A)
        $FileSave6 = GUICtrlRead($Input6A)
        $FileSave7 = GUICtrlRead($Input7A)
        $FileSave8 = GUICtrlRead($Input8A)
        $FileSave9 = GUICtrlRead($Input9A)
        $FileSave0 = GUICtrlRead($Input0A)
        $FileSaveS = GUICtrlRead($PasswdA)
        IniWrite($FileSave & ".ini","details","id01",$FileSave1)
        IniWrite($FileSave & ".ini","details","id02",$FileSave2)
        IniWrite($FileSave & ".ini","details","id03",$FileSave3)
        IniWrite($FileSave & ".ini","details","id04",$FileSave4)
        IniWrite($FileSave & ".ini","details","id05",$FileSave5)
        IniWrite($FileSave & ".ini","details","id06",$FileSave6)
        IniWrite($FileSave & ".ini","details","id07",$FileSave7)
        IniWrite($FileSave & ".ini","details","id08",$FileSave8)
        IniWrite($FileSave & ".ini","details","id09",$FileSave9)
        IniWrite($FileSave & ".ini","details","id00",$FileSave0)
        IniWrite($FileSave & ".ini","details","pass",$FileSaveS)
    EndIf
EndFunc

Func Button7A() ; Clear Set
    GUICtrlSetData($Input1A,"")
    GUICtrlSetData($Input2A,"")
    GUICtrlSetData($Input3A,"")
    GUICtrlSetData($Input4A,"")
    GUICtrlSetData($Input5A,"")
    GUICtrlSetData($Input6A,"")
    GUICtrlSetData($Input7A,"")
    GUICtrlSetData($Input8A,"")
    GUICtrlSetData($Input9A,"")
    GUICtrlSetData($Input0A,"")
    GUICtrlSetData($PasswdA,"")
EndFunc

Func KickList() ; Kick list
    $KickNick = GUICtrlRead($List)
    IniWrite("setup.ini","details","kick",$KickNick)
    ControlClick("ngs-1","",3002)
    ControlClick("ngs-2","",3002)
    ControlClick("ngs-3","",3002)
    ControlClick("ngs-4","",3002)
    ControlClick("ngs-5","",3002)
    ControlClick("ngs-6","",3002)
    ControlClick("ngs-7","",3002)
    ControlClick("ngs-8","",3002)
    ControlClick("ngs-9","",3002)
    ControlClick("ngs-0","",3002)
EndFunc

Func Button1B() ; Set Room
    $Room = GUICtrlRead($Combobox)
    IniWrite("setup.ini","details","room",$Room)
EndFunc

Func Button2B() ;Enter Room
    ControlClick("ngs-1","",3001)
    ControlClick("ngs-2","",3001)
    ControlClick("ngs-3","",3001)
    ControlClick("ngs-4","",3001)
    ControlClick("ngs-5","",3001)
    ControlClick("ngs-6","",3001)
    ControlClick("ngs-7","",3001)
    ControlClick("ngs-8","",3001)
    ControlClick("ngs-9","",3001)
    ControlClick("ngs-0","",3001)
EndFunc

Func Button3B() ;Clear List
    GUICtrlSetData($List, "")
EndFunc

Func Button4B() ;Leave Room
    ControlClick("ngs-1","",3004)
    ControlClick("ngs-2","",3004)
    ControlClick("ngs-3","",3004)
    ControlClick("ngs-4","",3004)
    ControlClick("ngs-5","",3004)
    ControlClick("ngs-6","",3004)
    ControlClick("ngs-7","",3004)
    ControlClick("ngs-8","",3004)
    ControlClick("ngs-9","",3004)
    ControlClick("ngs-0","",3004)
EndFunc

Func Button5B()
    If GUICtrlRead($Button5B) = "Pause" Then
        GUICtrlSetData($Button5B, "Listing..")
    Else
        GUICtrlSetData($Button5B, "Pause")
    EndIf
    GUICtrlSetState($Button5B, $GUI_DISABLE)
    ;ProcessClose("Getlist.exe")
    ;ProcessClose("migpro.exe")
    ;Run("DATA\Getlist.exe")
    GUICtrlSetState($Button5B, $GUI_ENABLE)
EndFunc

Func Button6B()
EndFunc

Func ToListButton ()
    $ToAddList = GUICtrlRead($ToListInput)
    GUICtrlSetData($List, "")
    GUICtrlSetData($List, $ToAddList)
EndFunc

Func Radio1C()
    GUICtrlSetState($Button6B, $GUI_DISABLE)
    GUICtrlSetState($Button7B, $GUI_DISABLE)
    GUICtrlSetState($Button8B, $GUI_DISABLE)
    GUICtrlSetState($Radio5C, $GUI_ENABLE)
    GUICtrlSetData($Input2B, "Normal")
EndFunc

Func Radio2C()
    GUICtrlSetState($Button6B, $GUI_ENABLE)
    GUICtrlSetState($Button7B, $GUI_DISABLE)
    GUICtrlSetState($Button8B, $GUI_DISABLE)
    GUICtrlSetState($Radio5C, $GUI_DISABLE)
    GUICtrlSetData($Input2B, "War")
EndFunc

Func Radio3C()
    GUICtrlSetState($Button6B, $GUI_DISABLE)
    GUICtrlSetState($Button7B, $GUI_ENABLE)
    GUICtrlSetState($Button8B, $GUI_ENABLE)
    GUICtrlSetState($Radio5C, $GUI_DISABLE)
    GUICtrlSetData($Input2B, "Flood")
EndFunc

Func Radio6C()
    GUICtrlSetData($Input1C, "250")
EndFunc

Func Radio7C()
    GUICtrlSetData($Input1C, "500")
EndFunc

Func Radio8C()
    GUICtrlSetData($Input1C, "750")
EndFunc

Func OnAutoItStart()
    ;Run("DATA\Getlist.exe")
EndFunc

Func OnAutoItExit()
    ProcessClose("ngs-1.exe")
    ProcessClose("ngs-2.exe")
    ProcessClose("ngs-3.exe")
    ProcessClose("ngs-4.exe")
    ProcessClose("ngs-5.exe")
    ProcessClose("ngs-6.exe")
    ProcessClose("ngs-7.exe")
    ProcessClose("ngs-8.exe")
    ProcessClose("ngs-9.exe")
    ProcessClose("ngs-0.exe")
    ProcessClose("ngs-1a.exe")
    ProcessClose("ngs-2a.exe")
    ProcessClose("ngs-3a.exe")
    ProcessClose("ngs-4a.exe")
    ProcessClose("ngs-5a.exe")
    ProcessClose("ngs-6a.exe")
    ProcessClose("ngs-7a.exe")
    ProcessClose("ngs-8a.exe")
    ProcessClose("ngs-9a.exe")
    ProcessClose("ngs-0a.exe")
    ProcessClose("ngs-1b.exe")
    ProcessClose("ngs-2b.exe")
    ProcessClose("ngs-3b.exe")
    ProcessClose("ngs-4b.exe")
    ProcessClose("ngs-5b.exe")
    ProcessClose("ngs-6b.exe")
    ProcessClose("ngs-7b.exe")
    ProcessClose("ngs-8b.exe")
    ProcessClose("ngs-9b.exe")
    ProcessClose("ngs-0b.exe")
    ProcessClose("ngs-1c.exe")
    ProcessClose("ngs-2c.exe")
    ProcessClose("ngs-3c.exe")
    ProcessClose("ngs-4c.exe")
    ProcessClose("ngs-5c.exe")
    ProcessClose("ngs-6c.exe")
    ProcessClose("ngs-7c.exe")
    ProcessClose("ngs-8c.exe")
    ProcessClose("ngs-9c.exe")
    ProcessClose("ngs-0c.exe")
    ProcessClose("ngs-1d.exe")
    ProcessClose("ngs-2d.exe")
    ProcessClose("ngs-3d.exe")
    ProcessClose("ngs-4d.exe")
    ProcessClose("ngs-5d.exe")
    ProcessClose("ngs-6d.exe")
    ProcessClose("ngs-7d.exe")
    ProcessClose("ngs-8d.exe")
    ProcessClose("ngs-9d.exe")
    ProcessClose("ngs-0d.exe")
    ProcessClose("ngs-1e.exe")
    ProcessClose("ngs-2e.exe")
    ProcessClose("ngs-3e.exe")
    ProcessClose("ngs-4e.exe")
    ProcessClose("ngs-5e.exe")
    ProcessClose("ngs-6e.exe")
    ProcessClose("ngs-7e.exe")
    ProcessClose("ngs-8e.exe")
    ProcessClose("ngs-9e.exe")
    ProcessClose("ngs-0e.exe")
    ProcessClose("ngs-1f.exe")
    ProcessClose("ngs-2f.exe")
    ProcessClose("ngs-3f.exe")
    ProcessClose("ngs-4f.exe")
    ProcessClose("ngs-5f.exe")
    ProcessClose("ngs-6f.exe")
    ProcessClose("ngs-7f.exe")
    ProcessClose("ngs-8f.exe")
    ProcessClose("ngs-9f.exe")
    ProcessClose("ngs-0f.exe")
    ProcessClose("ngs-1g.exe")
    ProcessClose("ngs-2g.exe")
    ProcessClose("ngs-3g.exe")
    ProcessClose("ngs-4g.exe")
    ProcessClose("ngs-5g.exe")
    ProcessClose("ngs-6g.exe")
    ProcessClose("ngs-7g.exe")
    ProcessClose("ngs-8g.exe")
    ProcessClose("ngs-9g.exe")
    ProcessClose("ngs-0g.exe")
    ProcessClose("ngs-1h.exe")
    ProcessClose("ngs-2h.exe")
    ProcessClose("ngs-3h.exe")
    ProcessClose("ngs-4h.exe")
    ProcessClose("ngs-5h.exe")
    ProcessClose("ngs-6h.exe")
    ProcessClose("ngs-7h.exe")
    ProcessClose("ngs-8h.exe")
    ProcessClose("ngs-9h.exe")
    ProcessClose("ngs-0h.exe")
    ProcessClose("ngs-1i.exe")
    ProcessClose("ngs-2i.exe")
    ProcessClose("ngs-3i.exe")
    ProcessClose("ngs-4i.exe")
    ProcessClose("ngs-5i.exe")
    ProcessClose("ngs-6i.exe")
    ProcessClose("ngs-7i.exe")
    ProcessClose("ngs-8i.exe")
    ProcessClose("ngs-9i.exe")
    ProcessClose("ngs-0i.exe")
    ProcessClose("ngs-1j.exe")
    ProcessClose("ngs-2j.exe")
    ProcessClose("ngs-3j.exe")
    ProcessClose("ngs-4j.exe")
    ProcessClose("ngs-5j.exe")
    ProcessClose("ngs-6j.exe")
    ProcessClose("ngs-7j.exe")
    ProcessClose("ngs-8j.exe")
    ProcessClose("ngs-9j.exe")
    ProcessClose("ngs-0j.exe")
    ProcessClose("Getlist.exe")
    ProcessClose("migpro.exe")
EndFunc

second gui

Share this post


Link to post
Share on other sites



No second gui shown.

Maybe you could reduce the number of lines in your first gui a lot by using loops

Eg instead of

If ProcessExists("ngs-1.exe") Then
            Else
                Run("MP\NORMAL\ngs-1.exe")
            EndIf
            If ProcessExists("ngs-2.exe") Then
            Else
                Run("MP\NORMAL\ngs-2.exe")
            EndIf
            If ProcessExists("ngs-3.exe") Then
            Else
                Run("MP\NORMAL\ngs-3.exe")
            EndIf
            If ProcessExists("ngs-4.exe") Then
            Else
                Run("MP\NORMAL\ngs-4.exe")
            EndIf
            If ProcessExists("ngs-5.exe") Then
            Else
                Run("MP\NORMAL\ngs-5.exe")
            EndIf
            If ProcessExists("ngs-6.exe") Then
            Else
                Run("MP\NORMAL\ngs-6.exe")
            EndIf
            If ProcessExists("ngs-7.exe") Then
            Else
                Run("MP\NORMAL\ngs-7.exe")
            EndIf
            If ProcessExists("ngs-8.exe") Then
            Else
                Run("MP\NORMAL\ngs-8.exe")
            EndIf
            If ProcessExists("ngs-9.exe") Then
            Else
                Run("MP\NORMAL\ngs-9.exe")
            EndIf
            If ProcessExists("ngs-0.exe") Then
            Else
                Run("MP\NORMAL\ngs-0.exe")
            EndIf

you could have

For $n = 0 to 9
    if not ProcessExists("ngs-" & $n & ".exe") Then Run("MP\NORMAL\ngs-" & $n & ".exe")
Next

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

No second gui shown.

Maybe you could reduce the number of lines in your first gui a lot by using loops

Eg instead of

If ProcessExists("ngs-1.exe") Then
            Else
                Run("MP\NORMAL\ngs-1.exe")
            EndIf
            If ProcessExists("ngs-2.exe") Then
            Else
                Run("MP\NORMAL\ngs-2.exe")
            EndIf
            If ProcessExists("ngs-3.exe") Then
            Else
                Run("MP\NORMAL\ngs-3.exe")
            EndIf
            If ProcessExists("ngs-4.exe") Then
            Else
                Run("MP\NORMAL\ngs-4.exe")
            EndIf
            If ProcessExists("ngs-5.exe") Then
            Else
                Run("MP\NORMAL\ngs-5.exe")
            EndIf
            If ProcessExists("ngs-6.exe") Then
            Else
                Run("MP\NORMAL\ngs-6.exe")
            EndIf
            If ProcessExists("ngs-7.exe") Then
            Else
                Run("MP\NORMAL\ngs-7.exe")
            EndIf
            If ProcessExists("ngs-8.exe") Then
            Else
                Run("MP\NORMAL\ngs-8.exe")
            EndIf
            If ProcessExists("ngs-9.exe") Then
            Else
                Run("MP\NORMAL\ngs-9.exe")
            EndIf
            If ProcessExists("ngs-0.exe") Then
            Else
                Run("MP\NORMAL\ngs-0.exe")
            EndIf

you could have

For $n = 0 to 9
    if not ProcessExists("ngs-" & $n & ".exe") Then Run("MP\NORMAL\ngs-" & $n & ".exe")
Next
thank for your advice, and this my second gui that add a text to list to my firts gui

;#NoTrayIcon
#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt("GUIOnEventMode", 1)
Opt("WinTextMatchMode", 3)
Opt("WinTitleMatchMode", 3)
Opt("WinDetectHiddenText", 1)

$Form = GUICreate("Getlist", 105, 55, -1, 550, $WS_SYSMENU, ($WS_EX_TOOLWINDOW + $WS_EX_TOPMOST))
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
$Button = GUICtrlCreateButton("GetList", 0, 1, 100, 30, 0)
GUICtrlSetOnEvent(-1,"Button")
GUISetState(@SW_SHOW)

While 1
    Sleep(1000)
WEnd

Func Close()
    Exit
EndFunc

Func onautoitstart()
    Run("migpro.exe")
    WinWaitActive("migpro")
    WinSetState( "migpro", "", @SW_HIDE)
EndFunc

Func onautoitexit()
    ProcessClose("migpro.exe")
EndFunc

Func Button()
    GUISetState(@SW_HIDE)
    Sleep(5000)
    While 1
        ControlClick("migpro", "", 3003)
        Sleep(2000)
        $ShowList = ControlGetText("migpro", "",1000)
        If StringInStr($ShowList, ";") And Not StringInStr($ShowList, "@") Then
            WinActivate("ngskicker")
            ControlSetText("ngskicker", "", 28, $ShowList)
            ControlClick("ngskicker", "", 39)
        ElseIf StringInStr($ShowList, "socket error") Then
            ProcessClose("migpro.exe")
            WinWaitClose("migpro")
            Run("migpro.exe")
            WinWaitActive("migpro")
            WinSetState( "migpro", "", @SW_HIDE)
        Else
            Sleep(1000)
        EndIf
    WEnd
EndFunc

Share this post


Link to post
Share on other sites

thank for your advice, and this my second gui that add a text to list to my firts gui

;#NoTrayIcon
#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt("GUIOnEventMode", 1)
Opt("WinTextMatchMode", 3)
Opt("WinTitleMatchMode", 3)
Opt("WinDetectHiddenText", 1)

$Form = GUICreate("Getlist", 105, 55, -1, 550, $WS_SYSMENU, ($WS_EX_TOOLWINDOW + $WS_EX_TOPMOST))
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
$Button = GUICtrlCreateButton("GetList", 0, 1, 100, 30, 0)
GUICtrlSetOnEvent(-1,"Button")
GUISetState(@SW_SHOW)

While 1
    Sleep(1000)
WEnd

Func Close()
    Exit
EndFunc

Func onautoitstart()
    Run("migpro.exe")
    WinWaitActive("migpro")
    WinSetState( "migpro", "", @SW_HIDE)
EndFunc

Func onautoitexit()
    ProcessClose("migpro.exe")
EndFunc

Func Button()
    GUISetState(@SW_HIDE)
    Sleep(5000)
    While 1
        ControlClick("migpro", "", 3003)
        Sleep(2000)
        $ShowList = ControlGetText("migpro", "",1000)
        If StringInStr($ShowList, ";") And Not StringInStr($ShowList, "@") Then
            WinActivate("ngskicker")
            ControlSetText("ngskicker", "", 28, $ShowList)
            ControlClick("ngskicker", "", 39)
        ElseIf StringInStr($ShowList, "socket error") Then
            ProcessClose("migpro.exe")
            WinWaitClose("migpro")
            Run("migpro.exe")
            WinWaitActive("migpro")
            WinSetState( "migpro", "", @SW_HIDE)
        Else
            Sleep(1000)
        EndIf
    WEnd
EndFunc
I don't know where your problem is because you need to explain with more detail. If it is with this line

$ShowList = ControlGetText("migpro", "",1000)

then we don't know what the window with the "migpro" title is, or what the control with the ID of 1000 is. How do you know the ID is 1000 and what sort of control is it?


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

I don't know where your problem is because you need to explain with more detail. If it is with this line

$ShowList = ControlGetText("migpro", "",1000)

then we don't know what the window with the "migpro" title is, or what the control with the ID of 1000 is. How do you know the ID is 1000 and what sort of control is it?

the problem is how i can retrieve text from migpro with control id 1000 every migpro show text that contain ";" and not contain "@" and then set the text to main gui without activate the main gui

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0