Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 11:25

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Problem mit Variablen

Discussion on Problem mit Variablen within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
Darkbanner's Avatar
 
elite*gold: 30
Join Date: May 2010
Posts: 486
Received Thanks: 161
Problem mit Variablen

Hallo ich hab grad nen riesen problem.
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
Aber leider übernimmt er bei
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
Darkbanner is offline  
Old 03/09/2012, 22:59   #2
 
elite*gold: 0
Join Date: Mar 2011
Posts: 8,645
Received Thanks: 3,454
PHP Code:
Send(GUICtrlRead($Input1)) 
Freddy​ is offline  
Thanks
1 User
Old 03/09/2012, 23:01   #3


 
Lawliet's Avatar
 
elite*gold: 2
Join Date: Jul 2009
Posts: 14,456
Received Thanks: 4,685
Send(Guictrlread($input1))
#zu spät
Lawliet is offline  
Thanks
1 User
Old 03/09/2012, 23:01   #4
 
Darkbanner's Avatar
 
elite*gold: 30
Join Date: May 2010
Posts: 486
Received Thanks: 161
Danke, du hast mein Leben gerettet
Nächstes mal denk ich mal nach, versprochen
Darkbanner is offline  
Old 03/09/2012, 23:04   #5
 
elite*gold: 50
Join Date: Mar 2010
Posts: 1,373
Received Thanks: 521
$Input enthält nur die ControlID, die GUICtrlCreateInput dir zurückgegeben hat. Um beispielsweise den Inhalt einer InputBox aus zu lesen, musst du GUICtrlRead verwenden.
PHP Code:
Send (GUICtrlRead($Input1)) 
jacky919 is offline  
Reply


Similar Threads Similar Threads
c++ variablen problem...
02/17/2011 - C/C++ - 6 Replies
hi... ich wollte mir, mehr zur übung als zum nutzen..., einen kleinen rechner machen, der dreiecke berechnen kann mit ein paar variable ...a,b,c,alpha,beta,gamma... jetzt kommt das problem... int opt; double a; double b; double c; double alpha; <- ich weis, man kann das auch in einer zeile schreiben...
variablen bei c++ (Hilfe)
01/28/2011 - WarRock - 3 Replies
Hej E*pvpers , ich lerne gerade das coden naja mehr lerne ich gerade c++ :D . Jetzt bin ich nun zu dem thema gekommen variablen" jedoch verstehe ich echt überhaupt net für was man die braucht ich checke rein garnix , da steht z.b gerade bei mir #include <iostream> using namespace std; int main() { int x; x=42;
Variablen..
10/30/2010 - AutoIt - 2 Replies
Habe zwei fast identische codes aber der 2 te ist immer falsch :( Der geht HotKeySet("s", "start") HotKeySet("e", "ende") $Variable = 10 Func start () while 1 if $Variable > 1 then
[PHP] Die Variablen
08/22/2010 - Coding Tutorials - 3 Replies
Hallo ELitepvpers Heute erkläre ich euch etwas über Variablen, wie sie aufgebaut sind und noch ein paar kleine Beispiele, damit das heut gelernte richtig sitzt ;) Vielleicht kennst du Variablen aus dem Mathe unterricht. Das sind diese komischen Buchstaben, die keinen Sinn zu ergeben scheinen, aber doch so wichtig sind. In PHP werden Variablen verwendet, um Inhalte (z.B. Text oder Zahlen) darin zu speichern. Das besondere ist an einer Variable ist, das du es zwar beliebig nennen darfst,...
[Problem] Variablen sortieren
02/02/2010 - AutoIt - 2 Replies
Ich bräuchte eine Möglichkeit wie ich variablen nach der Größe sortieren kann. Ich habe mir das ungefähr so vorgestellt: $variable1 = 6 $variable2 = 3 $variable3 = 4 $variable4 = 7 $variable5 = 2 $variable6 = 8 $variable7 = 1



All times are GMT +1. The time now is 11:25.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.