hallo,
habe schon seit fast 2 jahren ein IT Helpdesktool am start!
dieses habe ich nun etwas umgeschrieben und es kommen mit der neuen autoit version einige fehler!
auch ist eine screenshotfunktion mit dabei, hier kommt es zu verzögerungen ( springt warscheinlich nicht sauber aus der while schleife) beim senden, wenn ich einen screenshot mit tastenkombi über hotkeyset erzeugt habe!
hat einer eine idee?
kann man die fehler beseitigen, habe zumindest keinen festgestellt!
hier das script
Spoiler anzeigen
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=..\Icons\ICONGROUP_32515.ico
#AutoIt3Wrapper_outfile=IT-Helpdesk_neu.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstants.au3>
#include <File.au3>
#include <Array.au3>
#include <adfunctions.au3>
#include <ScreenCapture.au3>
#include <Date.au3>
$mail = _ADGetObjectAttribute(@UserName,"mail")
;$mail = _ADGetObjectAttribute("erfmkh","mail")
;MsgBox(0,"",$mail)
;-------begin username auflösen----
;$user = _ADSamAccountNameToFQDN(@UserName)
;$user_split = StringSplit($user, ",")
;$user_split1 = StringSplit($user_split[1], "=")
;$username = $user_split1[2]
$username = @UserName
;-------ende username auflösen----
[/autoit] [autoit][/autoit] [autoit]$SourceFile1 = "Das IT-Helpdesk Tool wird gestartet!"
$DestinationFile1 = ""
_PStart()
[/autoit] [autoit][/autoit] [autoit]Func _PStart()
[/autoit] [autoit][/autoit] [autoit]#region------------------------------------Declare Variables-------------------------------
Local $ByteBlock, $Counter
Local Const $BlockSize = 99
Local Const $Opt = Opt("GUIOnEventMode", 0)
#endregion---------------------------------------------------------------------------------
#region------------------------------------GUI create--------------------------------------
Local $GUI = GUICreate('', 400, 105, Default, Default, 0x80880000)
Local $Label1 = GUICtrlCreateLabel($SourceFile1, 8, 10)
;Local $Label2 = GUICtrlCreateLabel($DestinationFile1, 8, 30)
Local $Label3 = GUICtrlCreateLabel("0%", 360, 25, 30, 20, 0x2)
Local $Button = GUICtrlCreateButton("Abbrechen", 160, 75, 80)
Local $PBar = GUICtrlCreateProgress(8, 50, 384, 20)
GUISetState()
#endregion---------------------------------------------------------------------------------
#region----------------------------------Copy File-----------------------------------------
Do
$ByteBlock = $BlockSize
If @error Then ExitLoop
$Counter += 1
GUICtrlSetData($PBar, $Counter)
GUICtrlSetData($Label3, $Counter & ' %')
If $Counter = 100 Then ExitLoop ;GUIDelete($GUI)
[/autoit] [autoit][/autoit] [autoit]If GUIGetMsg() = $Button Then EXIT
;~ Opt("GUIOnEventMode", $Opt)
;~ GUIDelete($GUI)
;~ Return SetError(4,4,0)
;~ EndIf
Sleep(10) ;Bremse - Auskommentieren für maximale Geschwindigkeit
[/autoit] [autoit][/autoit] [autoit]Until 0
#endregion---------------------------------------------------------------------------------
Opt("GUIOnEventMode", $Opt)
GUIDelete($GUI)
Return 1
EndFunc
;----------------------------------
#Region ### START Koda GUI section ### Form=C:\it_tool_incl_tabs.kxf
$Form1 = GUICreate("IT-Helpdesk", 341, 385, 198, 150)
GUISetIcon("D:\005.ico")
$PageControl1 = GUICtrlCreateTab(8, 8, 324, 368)
;------------------------------ tabsheet 1 ---------------------------------------------------
$TabSheet1 = GUICtrlCreateTabItem("IT-Helpdesk")
$Edit1 = GUICtrlCreateEdit("", 36, 122, 257, 73)
GUICtrlSetData(-1, StringFormat(""))
$Button1 = GUICtrlCreateButton("Senden", 36, 242, 121, 33)
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Button2 = GUICtrlCreateButton("Abbruch", 172, 242, 121, 33)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Label2 = GUICtrlCreateLabel(@UserName & " / " & @ComputerName & " / " & @IPAddress1, 28, 322, 280, 17, 0x01)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Checkbox1 = GUICtrlCreateCheckbox("Dringend", 36, 210, 193, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Label3 = GUICtrlCreateLabel("Wähle das System!", 36, 42, 112, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Combobox1 = GUICtrlCreateCombo("", 36, 66, 129, 25)
GUICtrlSetData(-1, "As400|Amadeus|Bistro|Blank|Buma|Drucker|Galileo|Jack|Mediatrix|Merlin|Ostteamtool|Pilot Pro|SK Produktdb|PC|Sonstiges|Telefon")
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Label1 = GUICtrlCreateLabel("Gib eine Fehlerbeschreibung ein!", 36, 98, 191, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
;$Checkbox2 = GUICtrlCreateCheckbox("SMS Benachrichtigung (30 ct/SMS) 18:00 - 8:00 Uhr", 36, 290, 273, 17)
;GUICtrlSetState(-1, $GUI_DISABLE)
;GUICtrlSetFont(-1, 8, 800, 0, "Arial")
$Label4 = GUICtrlCreateLabel("xxxxxxxxxxxxxinfo", 95, 346, 150, 14)
GUICtrlSetFont(-1, 7, 400, 0, "Arial")
;------------------------------ tabsheet 2 ---------------------------------------------------
$TabSheet3 = GUICtrlCreateTabItem("UserAccount Infos")
;GUICtrlCreateLabel($fldname01 & @CRLF & $fldname02 & @CRLF & $fldname03 & @CRLF & $fldname04 & @CRLF & $fldname05 & @CRLF & $fldname06 & @CRLF & $fldname07 & @CRLF & $fldname08 & @CRLF & $fldname09 & @CRLF & $fldname10 & @CRLF & $fldname11, 32, 50, 114, 299)
;GUICtrlSetFont(-1, 10, 400, 0)
$labeldb = GUICtrlCreateLabel("", 152, 50, 130, 299)
;GUICtrlSetFont(-1, 10, 400, 0)
;-------------------------------tabsheet 3 ---------------------------------------------------
$TabSheet2 = GUICtrlCreateTabItem("Admin")
$Label5 = GUICtrlCreateLabel("Bitte Rufnummer aktivieren!", 96, 64, 162, 19)
GUICtrlSetFont(-1, 9, 800, 0, "Arial")
GUICtrlSetState(-1, $GUI_HIDE)
$Radio1 = GUICtrlCreateRadio("user2", 64, 104, 209, 17)
;GUICtrlSetState(-1,$GUI_CHECKED)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
GUICtrlSetState(-1, $GUI_HIDE)
$Radio2 = GUICtrlCreateRadio("user1", 64, 136, 209, 17)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
GUICtrlSetState(-1, $GUI_HIDE)
$Label6 = GUICtrlCreateLabel("Sie haben keine Rechte!", 104, 48, 140, 19)
GUICtrlSetFont(-1, 9, 800, 0, "Arial")
GUICtrlSetState(-1, $GUI_HIDE)
$Button3 = GUICtrlCreateButton("Änderung senden", 80, 200, 83, 33, 0x0200)
GUICtrlSetFont(-1, 7, 400, 0, "Arial")
GUICtrlSetState(-1, $GUI_HIDE)
$Button4 = GUICtrlCreateButton("Exit", 184, 200, 83, 33, 0)
GUICtrlSetFont(-1, 7, 400, 0, "Arial")
GUICtrlSetState(-1, $GUI_HIDE)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
;Rufnummer festlegen
$Ruf1 = "0174xxxxx@vodafone-sms.de"
$Ruf2 = "0174xxxxx@vodafone-sms.de"
; feiertage festlegen
$ft1 ="01.01"
$ft2 ="01.05"
$ft3 ="03.10"
$ft4 ="31.10"
$ft5 ="25.12"
$ft6 ="26.12"
; datum (tag, monat) festlegen
$day = @MDAY & "."& @MON
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
[/autoit] [autoit][/autoit] [autoit]Case $GUI_EVENT_CLOSE
Exit
Case $PageControl1
Switch GUICtrlRead($PageControl1)
Case 0 ;------tabsheet 1 ------
GUIctrlSetState($labeldb,$GUI_HIDE)
Case 1 ;------tabsheet 2 ------
Case 2 ;------tabsheet 3 ------
GUIctrlSetState($labeldb,$GUI_HIDE)
If @UserName = "user1" or @UserName = "user2" Then
GUICtrlSetState($Label5, $GUI_SHOW)
GUICtrlSetState($Radio1, $GUI_SHOW)
GUICtrlSetState($Radio1, $GUI_ENABLE)
GUICtrlSetState($Radio2, $GUI_SHOW)
GUICtrlSetState($Radio2, $GUI_ENABLE)
GUICtrlSetState($Button3, $GUI_SHOW)
GUICtrlSetState($Button3, $GUI_ENABLE)
GUICtrlSetState($Button4, $GUI_SHOW)
GUICtrlSetState($Button4, $GUI_ENABLE)
Else
GUICtrlSetState($Label6, $GUI_SHOW)
EndIf
$strFilePath = ("\\sbserver\NETLOGON\Support\kontakt.txt")
$file = FileOpen($strFilePath, 0)
$line = FileReadLine($file,1)
;MsgBox(0, "Error", $line)
FileClose($file)
If $line = $Rufmonty Then
GUICtrlSetState($Radio1,$GUI_CHECKED)
Else
GUICtrlSetState($Radio2,$GUI_CHECKED)
EndIf
EndSwitch
Case $Button3
[/autoit] [autoit][/autoit] [autoit]; RadioButton auf wert prüfen
If GUICtrlRead($Radio1, $GUI_CHECKED)= $GUI_CHECKED Then
$rb1 = GUICtrlRead($Radio1, $GUI_CHECKED)
Else
$rb1 = GUICtrlRead($Radio1, $GUI_UNCHECKED)= $GUI_UNCHECKED
EndIf
If GUICtrlRead($Radio2, $GUI_CHECKED)= $GUI_CHECKED Then
$rb2 = GUICtrlRead($Radio2, $GUI_CHECKED)
Else
$rb2 = GUICtrlRead($Radio2, $GUI_UNCHECKED)= $GUI_UNCHECKED
EndIf
$strFilePath = ("\\server\NETLOGON\Support\kontakt.txt")
$file = FileOpen($strFilePath, 2)
IF $rb1 = False Then FileWriteLine($file,$Ruf1)
IF $rb2 = False Then FileWriteLine($file,$Ruf2l)
FileClose($file)
[/autoit] [autoit][/autoit] [autoit]Exit
[/autoit] [autoit][/autoit] [autoit]Case $Button4
Exit
Case $Combobox1
GUICtrlSetState($Button1, $GUI_ENABLE)
Case $Checkbox1
[/autoit] [autoit][/autoit] [autoit];checkbox überprüfen und anhand des rückgabewertes sms freischalten oder auch nicht
If GUICtrlRead($Checkbox1, $GUI_CHECKED)= $GUI_CHECKED Then
$cb1 = GUICtrlRead($Checkbox1, $GUI_CHECKED)
Else
$cb1 = GUICtrlRead($Checkbox1, $GUI_UNCHECKED)= $GUI_UNCHECKED
EndIf
Case $Button1
GUICtrlSetState($Button2, $GUI_DISABLE)
;######################################
; combobox1 auf wert prüfen
;######################################
If GUICtrlRead($Combobox1, $GUI_CHECKED)= $GUI_CHECKED Then
$cbo1 = GUICtrlRead($Combobox1, $GUI_CHECKED)
Else
$cbo1 = GUICtrlRead($Combobox1, $GUI_UNCHECKED)= $GUI_UNCHECKED
EndIf
IF $cbo1 = False Then
$cboa1 = GUICtrlRead($Combobox1, $GUI_CHECKED)
Else
$cboa1 = " "
EndIf
;-----------
;MsgBox(0, "gewählt", $cba1)
Global $answer_combo1 = GUICtrlRead($Combobox1)
;MsgBox(0, "gewählt", $answer_combo1)
;######################################
; checkbox1 auf wert prüfen
;######################################
If GUICtrlRead($Checkbox1, $GUI_CHECKED)= $GUI_CHECKED Then
$cb1 = GUICtrlRead($Checkbox1, $GUI_CHECKED)
Else
$cb1 = GUICtrlRead($Checkbox1, $GUI_UNCHECKED)= $GUI_UNCHECKED
EndIf
IF $cb1 = False Then
$cba1 = GUICtrlRead($Checkbox1, $GUI_CHECKED)
Else
$cba1 = " "
EndIf
;MsgBox(0, "gewählt", $cba2)
$answer = GUICtrlRead($Edit1)
; begin file path for contact number
$strFilePath = ("\\server\NETLOGON\Support\kontakt.txt")
$file = FileOpen($strFilePath, 0)
$line = FileReadLine($file,1)
;MsgBox(0, "Error", $line)
FileClose($file)
; end file path
If IsMemberOf("Callcenter",@UserName) = 1 Or IsMemberOf("Callcenter-Flug",@UserName) = 1 Then
Global $CAddress = "steuerung@xxxxx.de"
Else
Global $CAddress = ""
EndIf
If IsMemberOf("team-buchhaltung",@UserName) = 1 Then
Global $sCAddress = "userxy@xxxxxx.de"
Else
Global $CAddress = ""
EndIf
; Frage --> Datei -- Screenshot anhängen
;----------------------------------------
Global $var = (@MyDocumentsDir & "\Printscreen.jpg")
Global $jn = MsgBox(4, "Hinweis!", "Screenshot anhängen JA/NEIN ?" & @CRLF & @CRLF & "Button JA anklicken, Fenster mit Fehlermeldung auswählen" & @CRLF & "und Tastenkombination STRG+F4 drücken!"& @CRLF)
If $jn = 6 Then ;wenn ja gedrückt dann
while 1
Sleep(1)
;HotKeySet("{PRINTSCREEN}", "Capture_start")
;HotKeySet("+!d", "Capture_start") ;Shift-Alt-d
HotKeySet("^{F4}", "Capture_start") ;Strg-F4
WEnd
Func Capture_start()
; Capture full screen
_ScreenCapture_Capture(@MyDocumentsDir & "\Printscreen.jpg")
MsgBox(0,"","Screenshot erstellt!",1)
ExitLoop
EndFunc
; nach aktueller zeit oder wochenende
IF _NowTime() > "18:00:00" or _NowTime() < "08:00:00" or @WDAY = 7 or @WDAY = 1 Then
Global $CAddress = "steuerung@xxxxx.de"
Sendmail()
MsgBox(0,"Info", "Bitte an die Steuerung wenden!",5)
Exit
EndIf
; nach feiertagen
IF $day = $ft1 or $day = $ft2 or $day = $ft3 or $day = $ft4 or $day = $ft5 or $day = $ft6 Then
Global $CAddress = "steuerung@xxxxxx.de"
Sendmail()
MsgBox(0,"Info", "Bitte an die Steuerung wenden!",5)
Exit
EndIf
Sendmail()
Exit
;###################
Else ; nein gedrückt
;MsgBox(0,"","test")
; nach aktueller zeit oder wochenende
IF _NowTime() > "18:00:00" or _NowTime() < "08:00:00" or @WDAY = 7 or @WDAY = 1 Then
Global $CAddress = "steuerung@xxxxx.de"
Sendmail()
MsgBox(0,"Info", "Bitte an die Steuerung wenden!",5)
Exit
EndIf
; nach feiertagen
IF $day = $ft1 or $day = $ft2 or $day = $ft3 or $day = $ft4 or $day = $ft5 or $day = $ft6 Then
Global $CAddress = "steuerung@xxxx.de"
Sendmail()
MsgBox(0,"Info", "Bitte an die Steuerung wenden!",5)
Exit
EndIf
Sendmail()
EndIf
Exit
Case $Button2
Exit
EndSwitch
WEnd
#Region------------------------------------Functions----------------------------
Func Sendmail()
Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc_1")
;##################################
; Variables
;##################################
$s_SmtpServer = "0.0.0.0" ; address for the smtp-server to use - REQUIRED
$s_FromName = $username ; name from who the email was sent
$s_FromAddress = $mail ; address from where the mail should come
$s_ToAddress = "support@xxxxxx.de" ; destination address of the email - REQUIRED
;$s_Subject = "";$sb ; subject from the email - can be anything you want it to be
$s_Subject = "Supportmeldung " & $answer_combo1 & " - " & @ComputerName &" --" & $cba1
$s_Body = ("PC Login: " & @UserName & @CRLF & "IP Addresse: " & @IPAddress1 & @CRLF & "Computername: "& @ComputerName & @CRLF & "System: "& $answer_combo1 & @CRLF & @CRLF & "Fehlerbeschreibung: " & @CRLF & @CRLF & $answer) ; the messagebody from the mail - can be left blank but then you get a blank mail
IF $jn = 6 Then ; the file you want to attach- leave blank if not needed
$s_AttachFiles = $var
Else
$s_AttachFiles = ""
EndIf
;$as_Body = "";$mbody1 ; the messagebody from the mail - can be left blank but then you get a blank mail
;$s_AttachFiles = "" ; the file you want to attach- leave blank if not needed
$s_CcAddress = $CAddress ; address for cc - leave blank if not needed
$s_BccAddress = "" ; address for bcc - leave blank if not needed
$s_Username = "userl" ; username for the account used from where the mail gets sent - Optional (Needed for eg GMail)
$s_Password = "xxxxxxxx" ; password for the account used from where the mail gets sent - Optional (Needed for eg GMail)
$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_1")
$rc = _INetSmtpMailCom_1($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $s_Body, $s_AttachFiles, $s_CcAddress, $s_BccAddress, $s_Username, $s_Password, $IPPort, $ssl)
If @error Then
MsgBox(0, "Error sending message", "Error code:" & @error & " Description:" & $rc)
EndIf
EndFunc ;==>Sendmail
[/autoit] [autoit][/autoit] [autoit];###################################################
[/autoit] [autoit][/autoit] [autoit]Func _INetSmtpMailCom_1($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $s_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Username = "", $s_Password = "",$IPPort=25, $ssl=0)
$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($s_Body,"<") and StringInStr($s_Body,">") Then
$objEmail.HTMLBody = $s_Body
Else
$objEmail.Textbody = $s_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])
If FileExists($S_Files2Attach[$x]) Then
$objEmail.AddAttachment ($S_Files2Attach[$x])
Else
$i_Error_desciption = $i_Error_desciption & @lf & 'File not found to attach: ' & $S_Files2Attach[$x]
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
$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
; Sent the Message
$objEmail.Send
If @error Then
SetError(2)
return $oMyRet[1]
EndIf
EndFunc ;==>_INetSmtpMailCom
;
;
; Com Error Handler
Func MyErrFunc_1()
$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_1
;---------------------------------------------------------
; IsMemberOf
; Takes the groupname (SamAccountName with or without the leading 'CN=', and the SamAccountName of the user
; Returns 1 if the the user is a member of the group, 0 otherwise
Func IsMemberOf($group, $user)
If StringLeft($group, 3) <> "CN=" Then
$group = "CN=" & $group
EndIf
Dim $usergroups[1], $i = 1
Dim $objConnection, $oUsr
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]$objConnection = ObjCreate("ADODB.Connection") ; Create COM object to AD
$objConnection.Provider = "ADsDSOObject"
$objConnection.Open ("Active Directory Provider") ; Open connection to AD
$objRootDSE = ObjGet("LDAP://RootDSE")
Global $strDNSDomain = $objRootDSE.Get ("defaultNamingContext") ; Retrieve the current AD domain name
$strQuery = "<LDAP://" & $strDNSDomain & ">;(sAMAccountName=" & $user & ");ADsPath;subtree"
$objRecordSet = $objConnection.Execute ($strQuery) ; Retrieve the FQDN for the logged on user
$ldap_entry = $objRecordSet.fields (0).value
$oUsr = ObjGet($ldap_entry) ; Retrieve the COM Object for the logged on user
$groups = $oUsr.groups ; Get the list of group objects from the user
For $groupname In $groups
If $groupname.name = $group Then Return 1
Next
Return 0
EndFunc ;==>IsMemberOf
[/autoit] [autoit][/autoit] [autoit]Func _ReadOneFld($_sql, $_dbname, $_field)
Dim $_output
$adoCon = ObjCreate ("ADODB.Connection")
$adoCon.Open ("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & $_dbname)
$adoRs = ObjCreate ("ADODB.Recordset")
$adoRs.CursorType = 1
$adoRs.LockType = 3
$adoRs.Open ($_sql, $adoCon)
With $adoRs
If .RecordCount Then
While Not .EOF
$_output = ": " & $_output & .Fields ($_field).Value & @CR ;(das & @CRKF macht einen zeilenumbruch)
.MoveNext
WEnd
EndIf
EndWith
$adoCon.Close
Return $_output
EndFunc ;==>_ReadOneFld
#EndRegion---------------------------------Endfunctions-------------------------
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit]danke
gruß
gmmg