Bin seit langer Zeit wieder am rumbasteln und komme einfach nicht weiter.
Hier mal der Skript:
Code:
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <CMD.au3>
#include <Inet.au3>
#include <GUIConstantsEx.au3>
#include <GuiIPAddress.au3>
#NoTrayIcon
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Tabbed Notebook Dialog", 412, 311, 403, 180)
$PageControl1 = GUICtrlCreateTab(8, 8, 396, 256)
$TabSheet1 = GUICtrlCreateTabItem("Home")
$Text = GUICtrlCreateLabel("Willkommen bei Razors Webbot", 16, 72, 377, 145)
$TabSheet2 = GUICtrlCreateTabItem("Accounts")
GUICtrlSetState(-1,$GUI_SHOW)
$Input1 = GUICtrlCreateInput("Input1", 16, 40, 73, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Input2 = GUICtrlCreateInput("Input2", 16, 64, 73, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Input3 = GUICtrlCreateInput("Input3", 16, 88, 73, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Input4 = GUICtrlCreateInput("Input4", 16, 112, 73, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Input5 = GUICtrlCreateInput("Input5", 16, 136, 73, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Input6 = GUICtrlCreateInput("Input6", 16, 160, 73, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Input7 = GUICtrlCreateInput("Input7", 16, 184, 73, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Input8 = GUICtrlCreateInput("Input8", 16, 208, 73, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Input9 = GUICtrlCreateInput("Input9", 16, 232, 73, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Input10 = GUICtrlCreateInput("Input10", 96, 40, 73, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Input11 = GUICtrlCreateInput("Input11", 96, 64, 73, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Input12 = GUICtrlCreateInput("Input12", 96, 88, 73, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Input13 = GUICtrlCreateInput("Input13", 96, 112, 73, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Input14 = GUICtrlCreateInput("Input14", 96, 136, 73, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Input15 = GUICtrlCreateInput("Input15", 96, 160, 73, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Input16 = GUICtrlCreateInput("Input16", 96, 184, 73, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Input17 = GUICtrlCreateInput("Input17", 96, 208, 73, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Input18 = GUICtrlCreateInput("Input18", 96, 232, 73, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Input19 = GUICtrlCreateInput("Input19", 176, 40, 73, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Input20 = GUICtrlCreateInput("Input20", 176, 64, 73, 22)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Passwort = GUICtrlCreateLabel("Passwort", 202, 232, 51, 18)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Pass = GUICtrlCreateInput("password", 258, 232, 126, 22, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD))
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlSetTip(-1, "1")
GUICtrlCreateTabItem("")
$Button1 = GUICtrlCreateButton("&OK", 166, 272, 80, 25)
$Button2 = GUICtrlCreateButton("&Cancel", 246, 272, 75, 25)
$Button3 = GUICtrlCreateButton("&Help", 328, 272, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$pw = InputBox("Passwort", "Bitte das Passwort des Routers eintragen", "0000", "*")
Run ("test.exe")
Sleep (2000)
MouseClick ("left", 381, 309, 1)
Sleep (10000)
_CMDStart(0)
_CMDWrite('curl http://192.168.2.1/cgi-bin/login.cgi -d "pws=' & $pw & '"')
_CMDWrite('curl http://192.168.2.1/cgi-bin/disconnect.exe')
_CMDWrite('curl http://192.168.2.1/cgi-bin/connect.exe')
_CMDEnd()
Sleep (10000)
MouseClick ("left", 1088, 428, 1)
Send ($Input1)
Sleep (1000)
MouseClick ("left", 1088, 483, 1)
Send ($pass)
Sleep (100)
und so weiter
Send ($Input1)
Send ($pass)
das, was vorher im GUI eingegeben wurde nicht.
Kann mir einer sagen wo der Fehler liegt?
Komme leider grade nicht mehr weiter.
MFG,
Darkbanner






