Da du jetzt dein "Script" fertig hast, kannst du die Präfix auf Gelößt umstellen
1. Post Editieren
2. Präfix umstellen
Beiträge von Texos
-
-
Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [autoit]
#include <GUIConstantsEx.au3>
#include <IE.au3>_IEErrorHandlerRegister()
[/autoit] [autoit][/autoit] [autoit]
$index = _IECreateEmbedded()#Region ### START Koda GUI section ### Form=
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
$Form1 = GUICreate("Form1", 470, 430, Default, Default)
$button1 = GUICtrlCreateButton("Start", 0, Default, 469, Default)
$lalal = GUICtrlCreateObj($index, 0, 25, 473, 409)
_IENavigate($index, "http://newmt2-reloaded.eu/shop.php", 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###While 1
[/autoit] [autoit][/autoit] [autoit]$nMsg = GUIGetMsg()
[/autoit]
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $button1
$oForm = _IEFormGetObjByName($index, "Login")
$oQuery = _IEFormElementGetObjByName($oForm, "userid")
$oQuery2 = _IEFormElementGetObjByName($oForm, "password")
;~ $oQuery3 = _IEFormElementGetObjByName($oForm, "Submit")
_IEFormElementSetValue($oQuery, "x")
_IEFormElementSetValue($oQuery2, "x")
;~ _IEFormElementSetValue($oQuery3, "x")
$lala = _IEFormSubmit($oForm)
EndSwitch
WEndhier ein simples login teil
Spoiler anzeigen
[autoit]
[/autoit]
_IENavigate ($oIE, "Deine Url")
_IELoadWait($oIE)
$oForm = _IEFormGetObjByName ($oIE, "Login")
$oQuery = _IEFormElementGetObjByName ($oForm, "userid")
_IEFormElementSetValue ($oQuery, "Dein Namen eintragen")
$oQuery = _IEFormElementGetObjByName ($oForm, "password")
_IEFormElementSetValue ($oQuery, "Dein Passwort eintragen")
$oSubmit = _IEFormElementGetObjByName ( $oForm, "submit" )
_IEAction ($oSubmit, "click")
_IELoadWait($oIE)hoffe es entspricht deinem niveau

-
ich kappier es nicht um ehrlich zu sein

body hat nen inhalt , kommt man direkt auf den quelltext wo auch die zahl1 deklariert ist. -
wenn er da angelangt ist bei dem IsArray dann macht das script irg. ganixmehr^^
-
yep, macht es aber nicht bei mir

weil ich einfach nur den geldwert auslesen will
1. freewar wird mit dem browser aufgerufen.
2.es wird nichts ersetzt + verändert.
also kann mir nun jemand helfen? -
wie mache ich das? habe noch nie mit arrays gearbeitet^^
-
Heyho

Wollte mal bei euch nachfragen wieso er mir nicht _StringBetween ausliest. Stimmt da irgendetwas nicht etc.?
[autoit]
[/autoit]
$body= _IEBodyReadHTML ("http://world1.freewar.com/fwEnglish/srv/src/fwEnglishExport/internal/item.php")
$Zahl1 =_StringBetween($body, '<b>Geld: </b>',' <img src=')
MsgBox(0,"",$Zahl1)
MsgBox(0,"",$Zahl1) zeigt mir 0 an(also hat er nix gefunden. aber warum?? -
meine frage war ganz alleine auf die frage mit dem hotkeyset bezogen , keine botfrage, obwohl es auch kein richtiges botprogramm ist wenn du es dir mal richtig anschauen würdest, lol xD
-
hey..
mich regt es grad en wenig auf^^ ich bekomme en hotkeyset mit der funktion Pause nicht rein...hier mein Script :
Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
#NoTrayIcon
#include <WindowsConstants.au3>
#include <Constants.au3>
#Include <GuiConstants.au3>
#Include <IE.au3>
#Include <Array.au3>MsgBox(0,"Script make by Lissy@Testworld", "Have fun :)")
[/autoit] [autoit][/autoit] [autoit]$1 = Inputbox("Account eingeben" , "Account eintippen")
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
$2 = Inputbox("Passwort eingeben", "Passwort eingeben", "", "*")Dim $fenstertitel = "Freewar Bot v0.1"
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit];Tray Einstellungen und Menüpunkte
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
Opt("TrayOnEventMode",1)
Opt("TrayMenuMode",1)
Opt("MouseCoordMode",2)
TraySetClick ( 16 )
$fensteritem = TrayCreateItem("Fenster ins Tray")
TrayItemSetOnEvent(-1,"gui_anzeigen")
TrayCreateItem("")
$exititem = TrayCreateItem("Exit")
TrayItemSetOnEvent(-1,"ExitScript")
TraySetOnEvent ( $TRAY_EVENT_PRIMARYDOWN, "gui_anzeigen" )
TraySetState()
;Tray Ende;erstellt den eingebetten IE
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
$oIE = _IECreateEmbedded ();Hauptfenster
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
$main_window = GUICreate($fenstertitel, @DesktopWidth-8, @DesktopHeight-66, 0, 0, $WS_CAPTION + $WS_SYSMENU + $WS_MINIMIZEBOX + $WS_VISIBLE + $WS_CLIPSIBLINGS )
GUISetBkColor (0xded3b9)
$GUIActiveX = GUICtrlCreateObj($oIE, 10, 60, @DesktopWidth-30, @DesktopHeight-200)
GUISetState(@SW_SHOW,$main_window )einloggen()
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]While 1
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
sleep(25)
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitScript()
EndSelect
WEndFunc einloggen()
[/autoit] [autoit][/autoit] [autoit]_IENavigate ($oIE, "http://world1.freewar.com/fwEnglish/srv/src/fwEnglishExport/index.php")
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
_IELoadWait($oIE)
$oForm = _IEFormGetObjByName ($oIE, "login_form")
$oQuery = _IEFormElementGetObjByName ($oForm, "name")
_IEFormElementSetValue ($oQuery, $1)
$oQuery = _IEFormElementGetObjByName ($oForm, "password")
_IEFormElementSetValue ($oQuery, $2)
sleep(1000)
;_IEFormSubmit ($oForm,0)
;$oSubmit = _IEFormElementGetCollection ($oForm, 1)
Sleep(1000)
$oSubmit = _IEFormElementGetObjByName ( $oForm, "submit" )
Sleep(1000)
_IEAction ($oSubmit, "click")
_IELoadWait($oIE)
Sleep(1000)
_IELinkClickByText ( $oIE, "Hier klicken um Freewar ohne Popup zu starten")
_IEAction ($oSubmit, "click")
Sleep(2000)While 1
[/autoit] [autoit][/autoit] [autoit]
_IENavigate ($oIE, "http://world1.freewar.com/fwEnglish/srv/src/fwEnglishExport/internal/main.php")
_IELinkClickByText ( $oIE, "Schnellangriff")
_IELinkClickByText ( $oIE, "Schnellangriff")
_IELinkClickByText ( $oIE, "Schnellangriff")
_IELinkClickByText ( $oIE, "Schnellangriff")
_IELinkClickByText ( $oIE, "Schnellangriff")
_IELinkClickByText ( $oIE, "Schnellangriff")
_IELinkClickByText ( $oIE, "Schnellangriff")
_IELinkClickByText ( $oIE, "Schnellangriff")
_IELinkClickByText ( $oIE, "Schnellangriff")
_IELinkClickByText ( $oIE, "Schnellangriff")
Sleep(500)
WendEndFunc
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit];minimiert die GUI in tray und zeigt sie wieder, je nachdem was wie der status gerad ist
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
func gui_anzeigen()
If TrayItemGetText ( $fensteritem ) = "Fenster ins Tray" Then
GUISetState(@SW_HIDE,$main_window)
TrayItemSetText($fensteritem,"Fenster maximieren")
Else
GUISetState(@SW_SHOW,$main_window)
TrayItemSetText($fensteritem,"Fenster ins Tray")
EndIf
EndFuncfunc ExitScript()
[/autoit]
GUIDelete($main_window)
Exit
EndFunc -
-
Hey, wollte mal fragen wie ich das hier alles verkürzen könnte, das mein script nicht so lang wird.

Hier mein Script:
Spoiler anzeigen
Msgbox(0,"Potenzsrechnung", "Dies ist ein Potenz-Rechner @ Made by Dennis Graß @ Germany")
$a = InputBox("Standart-Zahl hier eintragen!","Standart-Zahl hier eintragen!")
$zahl = InputBox("Hoch-Zahl hier eintragen!", "Hoch-Zahl hier eintragen!");Terminates script if no command-line arguments
If $zahl = 1 Then
MsgBox(0, "ergebnis:" , $a)
;Alternative:
elseIf $zahl = 2 Then
MsgBox(0, "ergebnis:" , $a * $a)
Endif
If $zahl = 3 Then
MsgBox(0, "ergebnis:" , $a * $a * $a)
;Alternative:
elseIf $zahl = 4 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a)
Endif
If $zahl = 5 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 6 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a)
Endif
If $zahl = 7 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 8 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a)
Endif
If $zahl = 9 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 10 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
Endif
If $zahl = 11 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 12 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
Endif
If $zahl = 13 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 14 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
Endif
If $zahl = 15 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 16 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
EndIf
If $zahl = 17 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 18 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
EndIf
If $zahl = 19 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 20 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
EndIf
If $zahl = 21 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 22 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
EndIf
If $zahl = 23 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 24 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
EndIf
If $zahl = 25 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 26 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
EndIf
If $zahl = 27 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 28 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
EndIf
If $zahl = 29 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 30 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
EndIf
If $zahl = 31 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 32 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
EndIf
If $zahl = 33 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 34 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
EndIf
If $zahl = 35 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 36 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
EndIf
If $zahl = 37 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 38 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
EndIf
If $zahl = 39 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 40 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
EndIf
If $zahl = 41 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 42 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
EndIf
If $zahl = 43 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 44 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
EndIf
If $zahl = 45 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 46 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
EndIf
If $zahl = 47 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 48 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
EndIf
If $zahl = 49 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
;Alternative:
elseIf $zahl = 50 Then
MsgBox(0, "ergebnis:" , $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a * $a)
EndIf -
Dankeschön für deine hilfe

-
Moin, kenne mich ja eig schon recht gut mit au3 aus aber eine frage hätte ich trotzdem.
Mit der Funktion MouseClick kann man ja ne position anklicken. Die Maus fährt dann erst hin und klickt
MouseClick("left" , xxx , yyy)
Gibt es ne möglichkeit das er diese Position direkt anklickt ohne das die Maus sich noch dort hin bewegen muss? weil das ja schon länger dauert. -
schon ok habs gefunden
$oIE.Move('right') -
Hehe, ja meine ich ja, JavaScript.
Er soll in einer While 1 Wend schleife immer diesen Befehl ausführen.
Deswegen wollte ich fragen ob das geht und wie da ich mich leider noch nicht so gut mit au3 auskenne und fleißig am lernen bin
-
Moin
Wollte mal fragen ob es geht das man ein Java befehl in au3 einschließt
hier der Befehl : javascript:MoveRight()
ginge das
-
hey^^
ich suche nach dem Befehl das wenn ich im script coords angebe er nur im fenster sucht.
er soll zuerst das fenster finden dann soll er dort coords suchen und nicht auf dem desktop von untenlinks nach obenrechts sondern nur in dem fenster,
entschuldige das ich mich wiederhole =P
wäre nett wenn mir jemand helfen könnte finde den befehl nicht =( -
Hat sich ja bis jetzt alles erledigt,ich weiß nurnicht wie ich ne datei abschicke.
Den Dateipfad muss man ja in die $s_Attach-Files eingeben oder? Habe ich auch schonmal gemacht nur geht es nicht.. -
Habe dies hier aus einem anderen Forum gefunden
[autoit];##################################
[/autoit][autoit][/autoit][autoit]
; Include
;##################################
#Include<file.au3>
;##################################
; Variables
;##################################
$SmtpServer = "MailServer" ; address for the smtp-server to use - REQUIRED
$FromName = "Name" ; name from who the email was sent
$FromAddress = "your@Email.Address.com" ; address from where the mail should come
$ToAddress = "your@Email.Address.com" ; destination address of the email - REQUIRED
$Subject = "Userinfo" ; subject from the email - can be anything you want it to be
$Body = "" ; the messagebody from the mail - can be left blank but then you get a blank mail
$AttachFiles = "" ; the file you want to attach- leave blank if not needed
$CcAddress = "CCadress1@test.com" ; address for cc - leave blank if not needed
$BccAddress = "BCCadress1@test.com" ; address for bcc - leave blank if not needed
$Importance = "Normal" ; Send message priority: "High", "Normal", "Low"
$Username = "******" ; username for the account used from where the mail gets sent - REQUIRED
$Password = "********" ; password for the account used from where the mail gets sent - REQUIRED
$IPPort = 25 ; port used for sending the mail
$ssl = 0 ; enables/disables secure socket layer sending - put to 1 if using httpS
;~ $IPPort=465 ; GMAIL port used for sending the mail
;~ $ssl=1 ; GMAILenables/disables secure socket layer sending - put to 1 if using httpS;##################################
[/autoit][autoit][/autoit][autoit][/autoit]
; Script
;##################################
Global $oMyRet[2]
Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")
$rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl)
If @error Then
MsgBox(0, "Error sending message", "Error code:" & @error & " Description:" & $rc)
EndIf
;
; The UDF
Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance="Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0)
Local $objEmail = ObjCreate("CDO.Message")
$objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>'
$objEmail.To = $s_ToAddress
Local $i_Error = 0
Local $i_Error_desciption = ""
If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress
If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress
$objEmail.Subject = $s_Subject
If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then
$objEmail.HTMLBody = $as_Body
Else
$objEmail.Textbody = $as_Body & @CRLF
EndIf
If $s_AttachFiles <> "" Then
Local $S_Files2Attach = StringSplit($s_AttachFiles, ";")
For $x = 1 To $S_Files2Attach[0]
$S_Files2Attach[$x] = _PathFull($S_Files2Attach[$x])
ConsoleWrite('@@ Debug(62) : $S_Files2Attach = ' & $S_Files2Attach & @LF & '>Error code: ' & @error & @LF) ;### Debug Console
If FileExists($S_Files2Attach[$x]) Then
$objEmail.AddAttachment ($S_Files2Attach[$x])
Else
ConsoleWrite('!> File not found to attach: ' & $S_Files2Attach[$x] & @LF)
SetError(1)
Return 0
EndIf
Next
EndIf
$objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
$objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer
If Number($IPPort) = 0 then $IPPort = 25
$objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort
;Authenticated SMTP
If $s_Username <> "" Then
$objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
$objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username
$objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password
EndIf
If $ssl Then
$objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
EndIf
;Update settings
$objEmail.Configuration.Fields.Update
; Set Email Importance
Switch $s_Importance
Case "High"
$objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "High"
Case "Normal"
$objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Normal"
Case "Low"
$objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Low"
EndSwitch
$objEmail.Fields.Update
; Sent the Message
$objEmail.Send
If @error Then
SetError(2)
Return $oMyRet[1]
EndIf
$objEmail=""
EndFunc ;==>_INetSmtpMailCom
;
;
; Com Error Handler
Func MyErrFunc()
$HexNumber = Hex($oMyError.number,
$oMyRet[0] = $HexNumber
$oMyRet[1] = StringStripWS($oMyError.description, 3)
ConsoleWrite("### COM Error ! Number: " & $HexNumber & " ScriptLine: " & $oMyError.scriptline & " Description:" & $oMyRet[1] & @LF)
SetError(1); something to check for when this function returns
Return
EndFunc ;==>MyErrFunc
funzt perfekt, nur der haken ist wie sende ich eine datei und keine nachricht?
-
Danke Xeno =)
könntest du mir vll. helfen mit der Datei versenden?
Kann das noch nicht so mit dem _INetSmtpMail , werde es mir aber bald anschauen

Mein email http ist mail.web.de