Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 03:02

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

Advertisement



Ich steh auf dem Schlauch.. O.o

Discussion on Ich steh auf dem Schlauch.. O.o within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
arisha's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 76
Received Thanks: 6
Question Ich steh auf dem Schlauch.. O.o

Hallöle
Habe nach einiger Zeit wieder mit Auto it angefangen...
Nun habe ich folgendes Problem: Ich habe am anfang des "scripts" 2 Input boxen gemacht:
Code:
$Input1 = GUICtrlCreateInput("", 16, 56, 193, 21)
$Input2 = GUICtrlCreateInput("", 16, 104, 193, 21)
Nun schreibt jemand etwas darein, welches später wieder ausgelesen wird....nur ist das Problem,dass , auch wenn jemand was die Inputboxen geschrieben hat, es so aussieht, als ob man nichts darein geschrieben hätte :/

Ich hoffe ihr versteht mich, und könnt mir bei meinem Problem helfen
arisha is offline  
Old 01/30/2012, 17:15   #2

 
Njahs's Avatar
 
elite*gold: 574
Join Date: Nov 2010
Posts: 2,498
Received Thanks: 726
Es wäre sinnvoll, wenn du dein ganzes Script hier posten würdest.

Du musst den Input erst dann auslesen, wenn du ihn auch brauchst.
Wenn du ihn am anfang ausliest ist der Input ja noch leer

(GuiCtrlRead)
Njahs is offline  
Old 01/30/2012, 17:36   #3
 
arisha's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 76
Received Thanks: 6
Danke schonmal für die Antwort Hier der Code
Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 219, 171, 186, 124)
$Input1 = GUICtrlCreateInput("", 16, 56, 193, 21)
$Input2 = GUICtrlCreateInput("", 16, 104, 193, 21)
$Label1 = GUICtrlCreateLabel("Hallooo", 32, 8, 165, 32)
GUICtrlSetFont(-1, 14, 800, 0, "Nightclub BTN")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
HotKeySet("{F5}","CallMailExe")                           ; Wenn man F5 drückt wird CallMailExe ausgeführt.....
$Email = GUICtrlRead($Input1)                             ; Hier liegt das Problem
$Zahlen = GUICtrlRead($Input2)               ;Hier liegt das Problem
CallMailExe(@ScriptDir & "\mail7.exe",$Email,$Zahlen)   ; Hier werden die Variablen eingefügt (zeile 15-16)
Die Funktion CallMailExe kommt später noch...aber brauchen wir hier nicht Ein weiteres Problem: Anstatt ich den strich vor den Buchstaben habe, ist er unter ihnen und "frisst" sie auf...auch wenn ich leertaste drücke...wie macht man das weg?
arisha is offline  
Old 01/30/2012, 18:16   #4
 
elite*gold: 0
Join Date: Jan 2012
Posts: 179
Received Thanks: 348
In deinem Script wird die Inputbox sofort ausgelesen.
Dass kann nicht richtig sein, dar dann natürlich nichts drin steht.

So könnte es aussehen.

PHP Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
HotKeySet("{F5}","CallMailExe"
#Region ### START Koda GUI section ### Form=
$Form1_1 GUICreate("Form1"220172275257)
$Input1 GUICtrlCreateInput(""165619321)
$Input2 GUICtrlCreateInput(""1610419321)
$Label1 GUICtrlCreateLabel("Hallooo"32816532)
GUICtrlSetFont(-1148000"Nightclub BTN")
$Button1 GUICtrlCreateButton("Eingabe Bestätigen"561369925)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$Button1
            EingabeAuslesen
()

    EndSwitch
WEnd

Func EingabeAuslesen
()
    
$Email GUICtrlRead($Input1)
    
$Zahlen GUICtrlRead($Input2)
    
MsgBox(0,"","$Email = "&$Email&@crlf&"$Zahlen = "&$Zahlen)
EndFunc

Func CallMailExe
()
    
MsgBox(0,"","CallMailExe aufgerufen!")
EndFunc 
Crack-7 is offline  
Old 01/30/2012, 18:43   #5
 
arisha's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 76
Received Thanks: 6
Danke...aber leider passt das so nicht...die stelle
Code:
Func EingabeAuslesen()
$Email = GUICtrlRead($Input1)
$Zahlen = GUICtrlRead($Input2)
Muss hier herein ---->
Code:
CallMailExe(@ScriptDir & "\mail7.exe",$Email,$Zahlen)
Also für $Email + $Zahl soll das Ergebnis hin
arisha is offline  
Old 01/30/2012, 20:16   #6
 
potato.'s Avatar
 
elite*gold: 0
The Black Market: 119/0/0
Join Date: Aug 2010
Posts: 1,204
Received Thanks: 230
Mit dem Befehl
PHP Code:
$Email GUICtrlRead($Input1
& dem anderen erreichst du
schon, dass die Variable $Email definiert wird.
Falls das aber noch "zu langsam" ist kannst du auch
PHP Code:
CallMailExe(@ScriptDir "\mail7.exe",GUICtrlRead($Input1),GUICtrlRead($Input2)) 
schreiben. Dann werden die Werte aber nicht in einer Variable gespeichert.
potato. is offline  
Old 01/30/2012, 20:38   #7
 
arisha's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 76
Received Thanks: 6
Das die nicht gespeichert werden ist mir egal, will ja bloß das sie dort eingefügt werden :/ Habs mal mit GuiCtrlRead gemacht, funktioniert aber trotzdem nicht... :/
Hier mal das Komplette script:
Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 219, 171, 186, 124)
$Input1 = GUICtrlCreateInput("", 16, 56, 193, 21)
$Input2 = GUICtrlCreateInput("", 16, 104, 193, 21)
$Label1 = GUICtrlCreateLabel("halloooo", 32, 8, 165, 32)
GUICtrlSetFont(-1, 14, 800, 0, "Nightclub BTN")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
HotKeySet("{F5}","CallMailExe")                           
   $Email = GUICtrlRead($Input1)
$Zahl = GUICtrlRead($Input2)
CallMailExe(@ScriptDir & "\mail7.exe",GUICtrlRead($Input1),GUICtrlRead($Input2))    

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

	EndSwitch
WEnd


Func CallMailExe($Path, $AccName, $AccPw)
	local $var = "|@Name:" & $AccName & "|@Pw:" & $AccPw
	$var = StringReplace($var," ","kdw<Y>")
	ShellExecute($Path,$var,@ScriptDir,"",@SW_Hide)
EndFunc


Desweiteren spuckt er nun auch einen weiteren Fehler aus:
ERROR: CallMailExe() called by a previous line with 0 arg(s). Min = 3. First previous line calling this Func is 14.
Func CallMailExe($Path, $AccName, $AccPw)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^

Oh man ey :/
arisha is offline  
Old 01/30/2012, 23:02   #8
 
YunoSubs's Avatar
 
elite*gold: 0
Join Date: May 2011
Posts: 275
Received Thanks: 49
Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 219, 171, 186, 124)
$Input1 = GUICtrlCreateInput("", 16, 56, 193, 21)
$Input2 = GUICtrlCreateInput("", 16, 104, 193, 21)
$Label1 = GUICtrlCreateLabel("halloooo", 32, 8, 165, 32)
GUICtrlSetFont(-1, 14, 800, 0, "Nightclub BTN")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

$Email = GUICtrlRead($Input1)
$Zahl = GUICtrlRead($Input2)

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
	EndSwitch
	If _IsPressed('74') Then CallMailExe(@ScriptDir & "\mail7.exe", GUICtrlRead($Input1),GUICtrlRead($Input2))
WEnd


Func CallMailExe($Path, $AccName, $AccPw)
	local $var = "|@Name:" & $AccName & "|@Pw:" & $AccPw
	$var = StringReplace($var," ","kdw<Y>")
	ShellExecute($Path,$var,@ScriptDir,"",@SW_Hide)
	Sleep(200)
EndFunc
YunoSubs is offline  
Thanks
1 User
Old 01/31/2012, 17:51   #9
 
elite*gold: 179
Join Date: May 2010
Posts: 355
Received Thanks: 42
What E-Mail Function are you using , hotmail , yahoo or... ?
Everything™ is offline  
Old 01/31/2012, 20:49   #10
 
arisha's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 76
Received Thanks: 6
Ok danke Shawn! Aber was bedeutet
Code:
('74')
? Ist das ne Abkürzung für ne Taste? O.o Danke trotzdem.... funktioniert
arisha is offline  
Old 02/01/2012, 20:20   #11
 
elite*gold: 50
Join Date: Mar 2010
Posts: 1,373
Received Thanks: 521
Guck dir mal die Dokumentation zu _IsPressed() an:
0x74 ist die hexadezimale Repräsentation des Virtual Keycodes für die Taste F5.
Du musst nur "74" bzw. '74' übergeben, weil die Funktion das "0x" selber davor setzt.
("0x" & $KeyCode)
jacky919 is offline  
Old 02/07/2012, 07:37   #12
 
elite*gold: 0
Join Date: Jan 2012
Posts: 179
Received Thanks: 348
Mal erlich das hat doch keinen Sinn wenn du sowieso die Sprache nicht kannst.

Dann send lieber gleich deinen ganzen source und sag was du machen willst, und jemand macht es dir.

Ansonsten solltest du vielleich mal tutorials ansehen, wenn du was lernen willst.

Du hast schon so viele Tipps bekommen, und wenn dir dass nicht reicht, um 2 Editboxen auszulesen, weis ich auch nicht.
Crack-7 is offline  
Reply


Similar Threads Similar Threads
*Kauf der neuen Maus steh an, nur wlche?**
09/09/2011 - Technical Support - 10 Replies
Servus. Ich schwanke zwischen den beiden hier: Logitech MX518 Refresh optische Gaming Maus: Amazon.de: Games und PC - Pyra - Mobile Gaming Mouse: Windows: Amazon.de: Games Was würdet ihr jetzt sagen, wlche? Oder doch ne ganz andere? Bitte mal ne begründung. Lg .Halloadrian
Auf Steh bot?
05/26/2011 - Metin2 Private Server - 6 Replies
Hallo Com , Scripter Wollte mal fragen ob es eine Scripter gibt der einen Bot erstellen kann der immer auf Hier Neu Starten klickt ? Oder gibt es schon so einen Bot ? Thx im Vorraus
du behindertes kind steh auf
02/16/2006 - Quotes - 6 Replies



All times are GMT +2. The time now is 03:02.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.