ZitatProbier's aus...
Wenn ich Vista hätte... :pinch:
ZitatProbier's aus...
Wenn ich Vista hätte... :pinch:
Aha. Braucht man dafür unbeding diese Dll?
Und funktioniert das auch unter Vista?
[Blockierte Grafik: http://download.lima-city.de/deepred/Bilder/590172958420170548.jpg] <--Dieses Progressbar
So?
[autoit]If not ProcessExists("bla.exe") then
run("bla.exe")
else
;.....
endif
Hallo,
ich finde dein Programm echt super
Und das beste ist das die Hilfe beim eingeben auf Deutsch ist.
PS: Fehlt hier ein Bild?
[Blockierte Grafik: http://download.lima-city.de/deepred/Bilder/1062116087858060465.jpg]
Edit: Da kommt ein Fehler, wenn man ein paar Tabs schließt.
[Blockierte Grafik: http://download.lima-city.de/deepred/Bilder/530041338369944195.jpg]
Aber warum hat das dann Office?
Hi,
ssl hab ich schon auf 1 und Port auf 110 aber es funkt trotzdem nicht. ![]()
aber vergiss nicht Zeile 45 eine Klammer hinzuzufügen:
[autoit]$ping = Ping(_GUICtrlListView_GetItemText(GUICtrlGetHandle($ListView1), $i)))
[/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit]Hallo,
ich habe jetzt die UDF
;
;##################################
; 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
;##################################
; 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
Aber irgendwie scheint die Funktion mit der SSL Verschlüsselung nicht zu funktionieren? Kann mir jemand helfen?
[Blockierte Grafik: http://download.lima-city.de/deepred/Bilder/1105301750588735970.jpg]
Bei mir klappt es aber.
Funkt es damit?
Hier nochmal:
#cs ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]AutoIt Version: 3.3.0.0
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]; Script Start - Add your code below here
[/autoit] [autoit][/autoit] [autoit]#include <GDIPlus.au3>
#include <WinAPI.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 447, 193, 125)
$getcaptcha = _captcha()
If $getcaptcha = False Then Exit
$Button1 = GUICtrlCreateButton("Button1", 128, 72, 75, 25, 0)
$Input1 = GUICtrlCreateInput("Input1", 96, 160, 121, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
;Danke an ProgAndy für die Hilfestellung bei GDI+ ![]()
; #FUNCTION# ====================================================================================================================
; Name...........: _captcha
; Description ...: Erstellt ein Fenster mit einem Captcha.
; Syntax.........: _captcha($iPoints = 500, $sLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", $sTitle = "Captcha", $sMsg = "Please insert the Code in the picture:", $sFont = "Times New Roman", $iSize = 10, $bBold = True)
; Parameters ....: $iPoints - Punkte die über die Schrift gezeichnet werden
; $sLetters - Buchstaben die im Captcha verwendet werden sollen
; $sTitle - Der Titel des Fensters
; $iMsg - Die Nachricht die im Fenster erscheind
; $sFont - Schriftart in der die Buchstaben geschrieben werden sollen
; $iSize - Schriftgröße in der die Buchstaben geschrieben werden sollen
; $bBold - Schrift dick schreiben (True - Ja;False - Nein)
; Return values .: Richtiges Captcha - True
; Falsches Captcha - False
; Author ........: Carsten8
; Remarks .......: Gibt auch False zurück wenn das Fenster vom Benutzer geschlossen wurde.
; ===============================================================================================================================
Func _captcha($iPoints = 500, $sLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", $sTitle = "Captcha", $sMsg = "Please insert the Code in the picture:", $sFont = "Times New Roman", $iSize = 10, $bBold = True)
Local $iLen = 10, $sCaptcha
For $i = 1 To $iLen
$sCaptcha &= StringMid($sLetters, Random(1, StringLen($sLetters)), 1)
Next
$capWin = GUICreate($sTitle, 309, 164, 303, 235)
GUICtrlCreateLabel($sMsg, 4, 4, 300, 17)
GUICtrlCreateGroup("Captcha", 4, 24, 300, 77)
$capPic = GUICtrlCreatePic("",8,40,292,55)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$capIn = GUICtrlCreateInput("", 4, 104, 300, 21)
$capOK = GUICtrlCreateButton("OK", 120, 132, 75, 25, 0)
GUISetState(@SW_SHOW, $capWin)
_GDIPlus_Startup()
$capGraph = _GDIPlus_GraphicsCreateFromHWND($capWin)
$hBMP = _GDIPlus_BitmapCreateFromGraphics(292,55,$capGraph)
_GDIPlus_GraphicsDispose($capGraph)
$capGraph = _GDIPlus_ImageGetGraphicsContext($hBMP)
_GDIPlus_GraphicsFillRect($capGraph, 0, 0, 292, 55, _GDIPlus_BrushCreateSolid(0xFFFEFEFE))
For $iL = 1 To $iLen
$rand = Random(0, 40)
_GDIPlus_GraphicsDrawString($capGraph, StringMid($sCaptcha, $iL, 1), $iL * 25, $rand, $sFont, $iSize)
If $bBold = True Then _GDIPlus_GraphicsDrawString($capGraph, StringMid($sCaptcha, $iL, 1), $iL * 25 + 1, $rand, $sFont, $iSize)
Next
For $capLines = 1 To $iPoints
$randx = Random(0, 292)
$randy = Random(0, 55)
_GDIPlus_GraphicsDrawLine($capGraph, $randx, $randy, $randx + 1, $randy + 1)
Next
$hBitmap_GDI = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBMP)
_SetBitmapToCtrl($capPic, $hBitmap_GDI)
_GDIPlus_GraphicsDispose($capGraph)
_GDIPlus_BitmapDispose($hBMP)
_GDIPlus_Shutdown()
While 1
$mGUI = GUIGetMsg(1)
Switch $mGUI[0]
Case -3
GUIDelete($capWin)
Return False
Case $capOK
If GUICtrlRead($capIn) = $sCaptcha Then
GUIDelete($capWin)
Return True
Else
GUIDelete($capWin)
Return False
EndIf
EndSwitch
WEnd
EndFunc
Func _SetBitmapToCtrl($CtrlId, $hBitmap)
Local Const $STM_SETIMAGE = 0x0172
Local Const $IMAGE_BITMAP = 0
Local Const $SS_BITMAP = 0xE
Local Const $GWL_STYLE = -16
Local $hWnd = GUICtrlGetHandle($CtrlId)
If $hWnd = 0 Then Return SetError(1, 0, 0)
Local $oldStyle = DllCall("user32.dll", "long", "GetWindowLong", "hwnd", $hWnd, "int", $GWL_STYLE)
If @error Then Return SetError(2, 0, 0)
DllCall("user32.dll", "long", "SetWindowLong", "hwnd", $hWnd, "int", $GWL_STYLE, "long", BitOR($oldStyle[0], $SS_BITMAP))
If @error Then Return SetError(3, 0, 0)
Local $oldBmp = DllCall("user32.dll", "hwnd", "SendMessage", "hwnd", $hWnd, "int", $STM_SETIMAGE, "int", $IMAGE_BITMAP, "int", $hBitmap)
If @error Then Return SetError(4, 0, 0)
If $oldBmp[0] <> 0 Then DllCall("GDI32.dll", "int", "DeleteObject", "int", $oldBmp[0])
Return 1
EndFunc
Hier
:
#cs ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]AutoIt Version: 3.3.0.0
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]; Script Start - Add your code below here
[/autoit] [autoit][/autoit] [autoit]#include <GDIPlus.au3>
#include <WinAPI.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 447, 193, 125)
$getcaptcha = _captcha()
If $getcaptcha = False Then Exit
$Button1 = GUICtrlCreateButton("Button1", 128, 72, 75, 25, 0)
$Input1 = GUICtrlCreateInput("Input1", 96, 160, 121, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
;Danke an ProgAndy für die Hilfestellung bei GDI+ ![]()
; #FUNCTION# ====================================================================================================================
; Name...........: _captcha
; Description ...: Erstellt ein Fenster mit einem Captcha.
; Syntax.........: _captcha($iPoints = 500, $sLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", $sTitle = "Captcha", $sMsg = "Please insert the Code in the picture:", $sFont = "Times New Roman", $iSize = 10, $bBold = True)
; Parameters ....: $iPoints - Punkte die über die Schrift gezeichnet werden
; $sLetters - Buchstaben die im Captcha verwendet werden sollen
; $sTitle - Der Titel des Fensters
; $iMsg - Die Nachricht die im Fenster erscheind
; $sFont - Schriftart in der die Buchstaben geschrieben werden sollen
; $iSize - Schriftgröße in der die Buchstaben geschrieben werden sollen
; $bBold - Schrift dick schreiben (True - Ja;False - Nein)
; Return values .: Richtiges Captcha - True
; Falsches Captcha - False
; Author ........: Carsten8
; Remarks .......: Gibt auch False zurück wenn das Fenster vom Benutzer geschlossen wurde.
; ===============================================================================================================================
Func _captcha($iPoints = 500, $sLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", $sTitle = "Captcha", $sMsg = "Please insert the Code in the picture:", $sFont = "Times New Roman", $iSize = 10, $bBold = True)
Local $iLen = 10, $sCaptcha
For $i = 1 To $iLen
$sCaptcha &= StringMid($sLetters, Random(1, StringLen($sLetters)), 1)
Next
$capWin = GUICreate($sTitle, 309, 164, 303, 235)
GUICtrlCreateLabel($sMsg, 4, 4, 300, 17)
GUICtrlCreateGroup("Captcha", 4, 24, 300, 77)
$capPic = GUICtrlCreatePic("",8,40,292,55)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$capIn = GUICtrlCreateInput("", 4, 104, 300, 21)
$capOK = GUICtrlCreateButton("OK", 120, 132, 75, 25, 0)
GUISetState(@SW_SHOW, $capWin)
_GDIPlus_Startup()
$capGraph = _GDIPlus_GraphicsCreateFromHWND($capWin)
$hBMP = _GDIPlus_BitmapCreateFromGraphics(292,55,$capGraph)
_GDIPlus_GraphicsDispose($capGraph)
$capGraph = _GDIPlus_ImageGetGraphicsContext($hBMP)
_GDIPlus_GraphicsFillRect($capGraph, 0, 0, 292, 55, _GDIPlus_BrushCreateSolid(0xFFFEFEFE))
For $iL = 1 To $iLen
$rand = Random(0, 40)
_GDIPlus_GraphicsDrawString($capGraph, StringMid($sCaptcha, $iL, 1), $iL * 25, $rand, $sFont, $iSize)
If $bBold = True Then _GDIPlus_GraphicsDrawString($capGraph, StringMid($sCaptcha, $iL, 1), $iL * 25 + 1, $rand, $sFont, $iSize)
Next
For $capLines = 1 To $iPoints
$randx = Random(0, 292)
$randy = Random(0, 55)
_GDIPlus_GraphicsDrawLine($capGraph, $randx, $randy, $randx + 1, $randy + 1)
Next
$hBitmap_GDI = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBMP)
_SetBitmapToCtrl($capPic, $hBitmap_GDI)
_GDIPlus_GraphicsDispose($capGraph)
_GDIPlus_BitmapDispose($hBMP)
_GDIPlus_Shutdown()
While 1
$mGUI = GUIGetMsg(1)
Switch $mGUI[0]
Case -3
GUIDelete($capWin)
Return False
Case $capOK
If GUICtrlRead($capIn) = $sCaptcha Then
GUIDelete($capWin)
Return True
Else
GUIDelete($capWin)
Return False
EndIf
EndSwitch
WEnd
EndFunc
Func _SetBitmapToCtrl($CtrlId, $hBitmap)
Local Const $STM_SETIMAGE = 0x0172
Local Const $IMAGE_BITMAP = 0
Local Const $SS_BITMAP = 0xE
Local Const $GWL_STYLE = -16
Local $hWnd = GUICtrlGetHandle($CtrlId)
If $hWnd = 0 Then Return SetError(1, 0, 0)
Local $oldStyle = DllCall("user32.dll", "long", "GetWindowLong", "hwnd", $hWnd, "int", $GWL_STYLE)
If @error Then Return SetError(2, 0, 0)
DllCall("user32.dll", "long", "SetWindowLong", "hwnd", $hWnd, "int", $GWL_STYLE, "long", BitOR($oldStyle[0], $SS_BITMAP))
If @error Then Return SetError(3, 0, 0)
Local $oldBmp = DllCall("user32.dll", "hwnd", "SendMessage", "hwnd", $hWnd, "int", $STM_SETIMAGE, "int", $IMAGE_BITMAP, "int", $hBitmap)
If @error Then Return SetError(4, 0, 0)
If $oldBmp[0] <> 0 Then DllCall("GDI32.dll", "int", "DeleteObject", "int", $oldBmp[0])
Return 1
EndFunc
Hallo,
ich versuche gerade einen XTPToolBar mit AutoIt zu machen. Jetzt weiß ich aber nicht ob man dafür eine spezielle Dll dafür braucht oder ob es schon in Windows enthalten ist.
XTPToolBar ---> [Blockierte Grafik: http://download.lima-city.de/deepred/Bilder/85009274691664133.png]
Hier müssten genung Beispiele sein ![]()
Das liegt daran, dass du vor manchen Befehlen kein @Scriptdir gesetzt hast. Das hatte ich auch mal.
Aber ansonsten finde ich sowas schon ganz toll wenn es gut funktioniert. ![]()
Danke für eure Hilfe Leute. ![]()
@Progany: Ja jetzt funkt es auch. thx
So hab ich jetzt. Aber da steht : "Could not load audio file"
#include <Bass.au3>
#include <BassConstants.au3>
;~ ProcessSetPriority(@AutoItExe, 4)
;Open Bass.DLL. Required for all function calls.
Dim $bass_dll = DllOpen("BASS.dll")
$bass_dl2 = DllOpen("Basswma.dll")
$BASS_CONFIG_WMA_ASX = 0x10102
[/autoit] [autoit][/autoit] [autoit];Initalize bass. Required for most functions.
_BASS_Init($bass_dll, 0, -1, 44100, 0, "")
_BASS_PluginLoad($bass_dll, "basswma.dll")
_BASS_SetConfig($bass_dll, $BASS_CONFIG_WMA_ASX, 1)
;Check if bass iniated. If not, we cannot continue.
If @error Then
MsgBox(0, "Error", "Could not initialize audio")
Exit
EndIf
;Set the Stream URL to listen to
$file = "mms://62.141.50.118/live/woaradio_128k.wma"
;Create a stream from that URL.
Dim $MusicHandle = _BASS_StreamCreateURL($bass_dll, $file,0,0,"TestFunc",0)
;Check if we opened the URL correctly.
If @error Then
MsgBox(0, "Error", "Could not load audio file" & @CR & "Error = " & @error)
Exit
EndIf
;Iniate playback
_BASS_ChannelPlay($bass_dll, $MusicHandle, 1)
;endless loop
While 1
;------------------------------------------------------------------------------------------
Sleep(10);adjusting this to reduce AutoItExe crashs, 10 is optimal on my pc, i think
;------------------------------------------------------------------------------------------
WEnd
;Functions
[/autoit] [autoit][/autoit] [autoit]Func OnAutoItExit()
;Free Resources
MsgBox(0,"Exit",'"OnAutoItExit()" was called' & @CRLF & "Error Code: " & _BASS_ErrorGetCode($bass_dll))
_BASS_Free($bass_dll)
EndFunc;==>OnAutoItExit
Func TestFunc($buffer, $length, $user)
;---------------------------------------------------------------------------
;!!! DO NOT PUT/CHANGE/REMOVE ANYTHING IN HERE OR IT WILL BE UNSTABLE !!!!
;---------------------------------------------------------------------------
EndFunc
Hmmm sorry. Habs nicht gemerkt :pinch:
Kann denn niemand helfen -_-
Also mithilfe der bass.dll kann man leider nur mp3 streams abspielen...
aber ich habe jetzt einen Plugin gefunden.
Soweit bin ich jetzt gekommen:
[autoit]_BASS_PluginLoad($bass_dll, "basswma.dll")
_BASS_SetConfig($bass_dll, $BASS_CONFIG_WMA_ASX, 1)
Aber ich weiß nicht wie $BASS_CONFIG_WMA_ASX deklariert werden soll, da ich es im Internet gefunden habe.
Kann jemand helfen?
funktioniert das nicht nur mithilfe einer dll???
Hmmm. Nee sind leider keine mp3s. Also die Dll in meiner letzten Post hat die funktionen wie play ,stop loadmedia usw. Nur wie kann ich die anwenden?