Danke Raupi
das wars .....
Gruss
Chris
Danke Raupi
das wars .....
Gruss
Chris
Hallo zusammen,
kann es sein, dass nach einem Versionswechsel von Autoit, mein Script nicht mehr funktioniert ?
Denn der folgende Fehler tritt auf ----> ERROR: AdlibEnable(): undefined function. AdlibEnable("_UpdateTime", 1000)
Eine in einer ältere AutoIt Version kompilierte Version dieses - genau diese Scripts läuft mit diesem Code.
Weiss event. jemand wodurch der Fehler erzeugt wird - ?andere/fehlende Includes ? Schreibweise der _Func ....
Danke schon einmal
Chris
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=triathlon.ico
#AutoIt3Wrapper_outfile=TIMER_WI_NEW2.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_File_Add=2009-11-04 15 16 33.jpg
#include <GUIConstantsEx.au3>
#include <GUIStatusBar.au3>
#include <GUIConstants.au3>
#include <StaticConstants.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <Date.au3>
#include <IE.au3>
#include <WindowsConstants.au3>
Local $aParts[3] = [100, 220, 300]
#Region ### START Koda GUI section ### Form=g:\autoit\install\koda\forms\countdownwi3.kxf
$Wi703 = GUICreate("Countdown 70.3 Wiesbaden 2010", 313, 245, 187, 128)
GUISetIcon(@ScriptDir & "\triathlon.ico")
GUISetBkColor(0xF9DBDB)
$IronmenPic = GUICtrlCreatePic(@ScriptDir & "\2009-11-04 15 16 33.jpg", 0,15, 311, 180, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Desc1 = GUICtrlCreateLabel("1.9 k Swim - 90 k Bike - 21.1 k Run", 5, 165, 300, 28, BitOR($SS_CENTER, $SS_CENTERIMAGE))
GUICtrlSetFont(-1, 11, 800, 0, "MS Sans Serif")
GUICtrlSetBKColor(-1,$GUI_BKCOLOR_TRANSPARENT)
$Timer = GUICtrlCreateLabel("TIMER", 5, 10, 300, 25, BitOR($SS_CENTER, $SS_SUNKEN, $SS_CENTERIMAGE))
GUICtrlSetFont(-1, 9.5, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x000000)
GUICtrlSetBkColor(-1, 0xE2E2F9)
$Abbruch = GUICtrlCreateLabel("(Abbrechen: ESC)", 110, 205, 90, 17)
GUICtrlSetBKColor(-1,$GUI_BKCOLOR_TRANSPARENT)
$hStatus = _GUICtrlStatusBar_Create ($Wi703)
_GUICtrlStatusBar_SetParts ($hStatus, $aParts)
$TM = _GUICtrlStatusBar_SetText($hStatus, " - CDE - 2009 -",1)
$Datum = _GUICtrlStatusBar_SetText($hStatus, " " & @MDAY & "." & @MON & "." & @YEAR, 0)
$Zeit = _GUICtrlStatusBar_SetText($hStatus, " " & @HOUR & ":" & @MIN & ":" & @SEC, 3)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
WinSetOnTop("Countdown 70.3 Wiesbaden 2010", "", 1)
$bStop = False
HotKeySet('{ESC}', '_Stop')
HotKeySet('!{F4}', '_Stop')
AdlibEnable("_UpdateTime", 1000)
Do
$nMsg = GUIGetMsg()
If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit
$iDiff = _DateDiff('s', '2010/08/15 08:00:00', _NowCalc())
GUICtrlSetData($Timer, _SecondsToDateTime($iDiff))
Sleep(500)
If $nMsg() = $GUI_EVENT_CLOSE Then Exit
Until GUIGetMsg() = -3 OR $bStop
Exit
Func _UpdateTime()
_GUICtrlStatusBar_SetText($hStatus, " " & @HOUR & ":" & @MIN & ":" & @SEC, 2)
EndFunc ;==>_UpdateTime
Func _Stop()
$bStop = True
EndFunc ;==>_Stop
;===============================================================================
; Function Name..: _SecondsToDateTime($iSeconds[, $iLang])
; Description....: Umwandlung von Sekunden in einen String mit Zeitangaben
; Parameter(s)...: $iSeconds = Wert in Sekunden
; $iLang
; 0 = Ausgabe in deutsch
; 1 = Ausgabe in englisch
; Return Value...: String (Wochen, Tage, Stunden, Minuten, Sekunden)
;===============================================================================
Func _SecondsToDateTime($iSeconds, $iLang = 1)
If $iLang < 0 Or $iLang > 1 Then $iLang = 0
Local $sOut = '', $bCheck = False, $bNegative = False, $aDiv[4] = [86400, 3600, 60, 1]
;~ Local $sOut = '', $bCheck = False, $bNegative = False, $aDiv[5] = [604800, 86400, 3600, 60, 1]
Local $aFormat[4][2] = [['Tage', 'Days'],['Stunden', 'Hours'],['Minuten', 'Minutes'],['Sekunden', 'Seconds']]
;~ Local $aFormat[5][2] = [['Wochen', 'Weeks'],['Tage', 'Days'],['Stunden', 'Hours'],['Minuten', 'Minutes'],['Sekunden', 'Seconds']]
If $iSeconds = 0 Then Return '0 ' & $aFormat[3][$iLang]
;~ If $iSeconds = 0 Then Return '0 ' & $aFormat[4][$iLang]
If $iSeconds < 0 Then
$bNegative = True
$iSeconds = Abs($iSeconds)
EndIf
For $i = 0 To 3
;~ For $i = 0 To 4
If ($iSeconds >= $aDiv[$i]) Or $bCheck Then
$sOut &= Int($iSeconds / $aDiv[$i]) & ' '
If Int($iSeconds / $aDiv[$i]) = 1 Then
$sOut &= StringTrimRight($aFormat[$i][$iLang], 1) & ', '
Else
$sOut &= $aFormat[$i][$iLang] & ', '
EndIf
$bCheck = True
EndIf
$iSeconds = Mod($iSeconds, $aDiv[$i])
Next
;~ If $bNegative Then $sOut = ' - ' & $sOut
If $bNegative Then $sOut = '' & $sOut
Return StringTrimRight($sOut, 2)
EndFunc ;==>_SecondsToDateTime
Hi Chip,
eigentlich wäre es schön direkt mit Autoit auf die ADS zugreifen. Ich verspreche mir eigentlich einen 'Geschwindigkeitsgewinn' für die Abfrage.
Ich habe (leider) noch keine Idee wie ich es realisiere, im Script eine Vorauswahl der verfügbaren Domänen (gerne auch in einer ini Datei) zu hinterlegen
und nach Auswahl einer Domäne das zu untersuchende Userobjekt abzufragen.
Wobei die DomänenAuswahl mein Problem ist.
Zur Zeit behelfe ich mir mit folgendem, indem ich adfind nutze - dabei muss ich aber immer an der jeweiligen Domäne angemeldet sein (und das ist blöde ...)
Es gibt nämlich m.E. keine Möglichkeit dem adfind die jeweilige Domäne als Parameter mitzugeben ![]()
adfind -sc u:%1 >X:\%1.txt
notepad X:\%1.txt
del X:\%1.txt
Any ideas ?
DANKE
Gruss
Chris (ugt100) :pinch:
Hallo an die hier versammelten 'Profis',
ich habe da - mal wieder - ein Problem bzw. eine Frage.
Ist es möglich (analog zu ADSIEdit) erst die zu kontaktierende Domäne auszuwählen und dann z.B. _ADGetGroupMemberOf mit den adfunctions abzufragen.
Hiuntergrund der , vielleicht verwirrenden, Frage ist die Tatsache, dass ich in einem Projekt eine User Migration von DomA nach DomB (inklusive MailMigration) duchführe.
Im Fehlerfall muessen, dann die entsprechenden Infomation gesammelt werden ....
Für jede Idee wäre ich dankbar
mfg
christoph (ugt100)
![]()
Hallo Alina,
Danke - super - mit diesem Script klappt die Sache
LG
Chris
![]()
![]()
![]()
Hallo an die AutoIt Profis,
ich bekomme es einfach nicht hin mit der Funktion _INetSmtpMailAuth() aus einem Script mails zu versenden (Z.Zt. helfe ich mir mit blat - das klappt).
Ich habe schon mehrere Stunden hier im Forum nachgelesen, bringe es aber nicht hin.
#include <INet.au3>
$re = InputBox('Mail send', 'Was willst du senden?')
$s_SmtpServer = "mail.gmx.net"
$s_FromName = "CDE"
$s_FromAddress = "xxx@gmx.de"
$s_ToAddress = "xxx@sp-integration.de"
$s_Subject = "My Test UDF"
$s_UName = "xxx@gmx.de"
$s_PWD = "yyyy"
Dim $as_Body[2]
$as_Body[0] = $re
$as_Body[1] = "Danke CDE"
$Response = _INetSmtpMailAuth($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_UName, $s_PWD, $s_Subject, $as_Body)
$err = @error
If $err Then ConsoleWrite($err & @CRLF)
If $Response = 1 Then
MsgBox(0, "Success!", "Mail sent")
Else
MsgBox(0, "Error!", "Mail failed with error code " & $err)
EndIf
;===============================================================================
;
; Function Name: _INetSmtpMailAuth()
; Description: Sends an email using SMTP over TCP IP.
; Parameter(s): $s_SmtpServer - SMTP server to be used for sending email
; $s_FromName - Name of sender
; $s_FromAddress - eMail address of sender
; $s_ToAddress - Address that email is to be sent to
; $s_Username - Username for Authentication (bernd670)
; $s_Passwd - Password for Authentication (bernd670)
; $s_Subject - Subject of eMail
; $as_Body - Single dimension array containing the body of eMail as strings
; $s_helo - Helo identifier (default @COMPUTERNAME) sometime needed by smtp server
; $s_first - send before Helo identifier (default @CRLF) sometime needed by smtp server
; $b_trace - trace on a splash window (default 0 = no trace)
; Requirement(s): None
; Return Value(s): On Success - Returns 1
; On Failure - 0 and sets
; @ERROR = 1 - Invalid Parameters
; @ERROR = 2 - Unable to start TCP
; @ERROR = 3 - Unable to resolve IP
; @ERROR = 4 - Unable to create socket
; @ERROR = 5x - Cannot open SMTP session
; @ERROR = 50x - Cannot send body
; @ERROR = 5000 - Cannot close SMTP session
; Authors: Original function to send email via TCP - Asimzameer
; Conversion to UDF - Walkabout
; Correction Helo, timeout, trace - Jpm
; Correction send before Helo - Jpm
; Include Authentication - bernd670
;
;===============================================================================
Func _INetSmtpMailAuth($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Username, $s_Passwd, $s_Subject = "", $as_Body = "", $s_helo = "", $s_first = "-1", $b_trace = 0)
Local $v_Socket
Local $s_IPAddress
Local $i_Count
Local $s_Send[9]
Local $s_ReplyCode[9];Return code from SMTP server indicating success
If $s_SmtpServer = "" Or $s_FromAddress = "" Or $s_ToAddress = "" Or $s_Username = "" Or $s_Passwd = "" Or $s_FromName = "" Or StringLen($s_FromName) > 256 Then
SetError(1)
Return 0
EndIf
If $s_helo = "" Then $s_helo = @ComputerName
If TCPStartup() = 0 Then
SetError(2)
Return 0
EndIf
StringRegExp($s_SmtpServer, "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)")
If @extended Then
$s_IPAddress = $s_SmtpServer
Else
$s_IPAddress = TCPNameToIP($s_SmtpServer)
EndIf
If $s_IPAddress = "" Then
TCPShutdown()
SetError(3)
Return 0
EndIf
$v_Socket = TCPConnect($s_IPAddress, 25)
If $v_Socket = -1 Then
TCPShutdown()
SetError(4)
Return (0)
EndIf
$s_Send[0] = "EHLO " & $s_helo & @CRLF
;~ If StringLeft($s_helo,5) <> "EHLO " Then $s_Send[0] = "EHLO " & $s_helo & @CRLF
$s_ReplyCode[0] = "250"
$s_Send[1] = "AUTH LOGIN" & @CRLF
$s_ReplyCode[1] = "334"
$s_Send[2] = _Base64Encoding($s_Username) & @CRLF
$s_ReplyCode[2] = "334"
$s_Send[3] = _Base64Encoding($s_Passwd) & @CRLF
$s_ReplyCode[3] = "235"
$s_Send[4] = "MAIL FROM: <" & $s_FromAddress & ">" & @CRLF
$s_ReplyCode[4] = "250"
$s_Send[5] = "RCPT TO: <" & $s_ToAddress & ">" & @CRLF
$s_ReplyCode[5] = "250"
$s_Send[6] = "DATA" & @CRLF
$s_ReplyCode[6] = "354"
$s_Send[7] = "From: " & $s_FromName & " <" & $s_FromAddress & ">" & @CRLF & _
"To: " & "<" & $s_ToAddress & ">" & @CRLF & _
"Subject: " & $s_Subject & @CRLF & _
"Mime-Version: 1.0" & @CRLF & _
"Content-Type: text/plain; charset=US-ASCII" & @CRLF & _
@CRLF
$s_ReplyCode[7] = ""
$s_Send[8] = @CRLF & "." & @CRLF
$s_ReplyCode[8] = "250"
; open stmp session
If _SmtpSend($v_Socket, $s_Send[0], $s_ReplyCode[0], $b_trace, "220", $s_first) Then
SetError(50)
Return 0
EndIf
; send header
For $i_Count = 0 To UBound($s_Send) - 2
If _SmtpSend($v_Socket, $s_Send[$i_Count], $s_ReplyCode[$i_Count], $b_trace) Then
SetError(50 + $i_Count)
Return 0
EndIf
Next
; send body records (a record can be multiline : take care of a subline beginning with a dot should be ..)
For $i_Count = 0 To UBound($as_Body) - 1
; correct line beginning with a dot
If StringLeft($as_Body[$i_Count], 1) = "." Then $as_Body[$i_Count] = "." & $as_Body[$i_Count]
If _SmtpSend($v_Socket, $as_Body[$i_Count] & @CRLF, "", $b_trace) Then
SetError(500 + $i_Count)
Return 0
EndIf
Next
; close the smtp session
$i_Count = UBound($s_Send) - 1
If _SmtpSend($v_Socket, $s_Send[$i_Count], $s_ReplyCode[$i_Count], $b_trace) Then
SetError(5000)
Return 0
EndIf
TCPCloseSocket($v_Socket)
TCPShutdown()
Return 1
EndFunc ;==>_INetSmtpMailAuth
;===============================================================================
;
; Function Name: _Base64Encoding()
; Description: Kodiert eine Zeichenfolge mit dem Base64-Verfahren
; (http://de.wikipedia.org/wiki/Base64)
; Parameter(s): $String - Zeichenfolge die kodiert werden soll
; Requirement(s): None
; Return Value(s): Kodierte Zeichenfolge
; Authors: bernd670
;
;===============================================================================
Func _Base64Encoding($String)
$strUmsetzung = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
$strRetValue = ""
For $i = 1 To StringLen($String) Step 3
$strTok = StringMid($String, $i, 3)
Switch StringLen($strTok)
Case 3
$iTokVal = (Asc(StringMid($strTok, 1, 1)) * 256 + _
Asc(StringMid($strTok, 2, 1))) * 256 + _
Asc(StringMid($strTok, 3, 1))
$strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1)
$iTokVal = BitShift($iTokVal, 6)
$strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
$iTokVal = BitShift($iTokVal, 6)
$strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
$iTokVal = BitShift($iTokVal, 6)
$strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
$strRetValue &= $strTokCryt
Case 2
$iTokVal = (Asc(StringMid($strTok, 1, 1)) * 256 + _
Asc(StringMid($strTok, 2, 1))) * 256
$iTokVal = BitShift($iTokVal, 6)
$strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1)
$iTokVal = BitShift($iTokVal, 6)
$strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
$iTokVal = BitShift($iTokVal, 6)
$strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
$strRetValue &= $strTokCryt & "="
Case 1
$iTokVal = Asc(StringMid($strTok, 1, 1)) * 65536
$iTokVal = BitShift($iTokVal, 12)
$strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1)
$iTokVal = BitShift($iTokVal, 6)
$strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
$strRetValue &= $strTokCryt & "=="
EndSwitch
Next
Return $strRetValue
EndFunc ;==>_Base64Encoding
Dieser Fehler taucht auf - was ich nachvollziehen kann, denn nirgends ist diese Funktion 'beschrieben'.
ERROR: _SmtpSend(): undefined function.
If _SmtpSend ($v_Socket, $s_Send[0], $s_ReplyCode[0], $b_trace, "220", $s_first)
Was muss ich tun ?????
Danke schon einmal im voraus
Chris ![]()
Hi all,
ich habe da mal wieder eine Frage an die AUTOIT Profis.
Ich ermittle mittels dnsquery und dnsget die jeweilige (Win)Gruppenmitgliedschaften des aktuell angemeldeten Users und schreibe das Ergebnis in eine Datei
(zumindest erst einmal)
Das Ergebnis, die Datei sieht so aus (z.B.)
"CN=Grp_Sec_MSHQSCRIPT01_OITi_Leser,OU=MSHQSCRIPT01,OU=09-SonderGruppen,OU=80-Gruppen,DC=XXX,DC=XXX,DC=net"
"CN=Grp_Mig_VF-DE_Export,OU=OIT-VF-DE-Migrationssteuerung,OU=09-SonderGruppen,OU=80-Gruppen,DC=XXX,DC=XXX,DC=net"
"CN=Grp_Sec_Arcor_Alle,OU=02-FunktionsGruppen,OU=80-Gruppen,DC=XXX,DC=XXX,DC=net"
"CN=Grp_Sec_Anw_Arcor_TTT_read,OU=07-Anwendungsgruppen,OU=80-Gruppen,DC=XXX,DC=XXX,DC=net"
"CN=Grp_LGM_ADM_GNP5630,OU=05-ClientLocalAdminGruppen,OU=80-Gruppen,DC=XXX,DC=XXX,DC=net"
"CN=Grp_LGM_PotLokAdm,OU=05-ClientLocalAdminGruppen,OU=80-Gruppen,DC=XXX,DC=XXX,DC=net"
"CN=Dom„nen-Benutzer,CN=Users,DC=XXX,DC=XXX,DC=net"
Wenn der User Mitglied einer definierten Gruppe XYZ ist dann soll z.B. ein zusätzliches LW gemappt werden oder
wenn der User auch noch Mitglied einer zweiten definierten Gruppe soll z.B. ein DesktopLink erzeuget werden
(die Mimik des Mappens bzw. die Erstellung des DesktopLinks läuft schon)
Wie schaffe ich es diese IF Bedingungen aus der Datei zu ermitteln bzw. gibt es einen eleganteren Weg als den Umweg über eine temp. Datei diese
Bedingungen zu ermitteln
FileInstall(".\dsquery.exe", @TempDir & "\dsquery.exe")
FileInstall(".\dsquery.dll", @TempDir & "\dsquery.dll")
FileInstall(".\dsget.exe", @TempDir & "\dsget.exe")
RunWait(@ComSpec & " /c " & "%TEMP%\dsquery.exe user -samid %Username% | %TEMP%\dsget.exe user -memberof > %TEMP%\%Username%.txt")
![]()
![]()
![]()
Danke schon einmal im voraus
Chris
Hallo an die AutoIT Gemeinde,
ich würde gerne in ein Log File eine Fileliste schreiben die aus bestimmten Gründen verschoben wurde und dabei noch vermerken, ob es sich bei dem verschobenen Objekt um ein Verzeichnis oder eine Datei handelt.
Das Schreiben ins Logfile gelingt (aus einem Array) nur die Zuweisung, ob Dir oder File gelingt mir (noch) nicht.
(ich weiss sehrwohl das es FileGetAttrib gibt)
Code-Snip
....
FileWriteLine($LogFile, "# --- Diese Files/Verzeichnisse wurden verschoben ---")
$FileList=_FileListToArray($PersDataNotes)
$rows = UBound($FileList)
FileWriteLine($LogFile, @CRLF)
FileWrite($LogFile, _ArrayToString($FileList, @CRLF, 1, $rows-1))
FileWriteLine($LogFile, @CRLF)
FileWriteLine($LogFile, @CRLF & "# --- Diese Files/Verzeichnisse wurden nach verschoben ---")
....
das ergibt z.B. im logfile:
"# --- Diese Files/Verzeichnisse wurden nach verschoben ---"
aaa.xy
bbb.xy
3333
zzz.xy
"# --- Diese Files/Verzeichnisse wurden nach verschoben ---"
Jetzt wäre schön, wenn es sich um ein Dir handelt hinter den Namen ein (Dir) gesetzt zu bekommen
bbb.xy
3333 (Dir)
zzz.xy
Danke schon einmal im voraus
Gruss
Chris
Hallo an die Profis,
ich kapier es einfach nicht. Beim Aufruf einer Excel Datei aus einem Script heraus bekomme ich folgenden Fehler:
ERROR: 'Return' not allowed from global scope. If Not FileExists($cdefilenameGTW) Then Return SetError(2, 0, 0)
Das Schlimme ist, dass es schon gefunzt hat - ![]()
Hier das ganze Snip für den Aufruf
(wobei $cdefilenameGTW = @MyDocumentsDir & ("\Maileingang_GTW01_ArcorNet_all.xls")
DIM $cdefilenameGTW, $fVisible = 1, $fReadOnly = False, $sPassword = "", $sWritePassword = ""
Local $oExcel = ObjCreate("Excel.Application")
If Not IsObj($oExcel) Then Return SetError(1, 0, 0)
If Not FileExists($cdefilenameGTW) Then Return SetError(2, 0, 0)
If $fVisible > 1 Then $fVisible = 1
If $fVisible < 0 Then $fVisible = 0
If $fReadOnly > 1 Then $fReadOnly = 1
If $fReadOnly < 0 Then $fReadOnly = 0
With $oExcel
.Visible = $fVisible
If $sPassword <> "" And $sWritePassword <> "" Then .WorkBooks.Open($cdefilenameGTW, Default, $fReadOnly, Default, $sPassword, $sWritePassword)
If $sPassword = "" And $sWritePassword <> "" Then .WorkBooks.Open($cdefilenameGTW, Default, $fReadOnly, Default, Default, $sWritePassword)
If $sPassword <> "" And $sWritePassword = "" Then .WorkBooks.Open($cdefilenameGTW, Default, $fReadOnly, Default, $sPassword, Default)
If $sPassword = "" And $sWritePassword = "" Then .WorkBooks.Open($cdefilenameGTW, Default, $fReadOnly)
.ActiveWorkbook.Sheets(1).Select ()
$x = .Run("Import_GTW") ; MacroName, Parameters1, Parameter2, ...
EndWith
Wahrscheinlich ganz einfach - wenn man es weiss ...
D A N K E
Chris
Hi,
habe heute erst zufällig Dienen Psot entdeckt. Ich habe mir wie folgt geholfen:
(entweder mit einem Symbol in der Symbolleiste oder via Scheduled Agent)
filepath:="Z:\\YY\\XXX\\"; Zielverzeichnis für das Attachment
_attachfiles:=@AttachmentNames; Name des Attachments
_detachfile:=@Subset(_attachfiles;1);_attachfiles; Falls mehrere Attachments
@Command( [EditDetach] ; _detachfile ; filepath + _detachfile ); Abhängen des Attachments
@Command( [Execute]; "C:\\temp\\AutoIt3\\AutoItAnwendung.exe" ) Starte AutoIT Anwendung
(in meinem Fall Datenaufbereitung mit Datentransfer nach Excel)
Vielleicht hilfts ja
Gruss Chris
HI Schnitzel,
danke für den gedanklichen Anstoss.
FYI - noch eine kleine Verbesserung:
ich bearbeite das output file von 7zip noch bevor ich das Ergebnis ins Array einlese (type c:\test.txt | FIND/I "files," > c:\cde.txt)
--> schreibt dann nämlich nur noch die letzte Zeiel des 7zip outputs.
Und meine gesuchte Zahl ist in dieser Zeile dann immer die Erste - was sich aus dem Array finden lassen sollte.
Danke
Gruss
Chris
![]()
Hallo auotit Gemeinde,
ich habe da mal wieder eine Frage an die 'Profis' hier im Forum.
Während einer Installationsroutine (die ich über autoit realisiert habe), die auch schon soweit läuft, muss ich ggf. ein vorhandenes cab-file auspacken und verarbeiten.
Da das Ziel mit einer Quota versehen ist, muss ich vorher prüfen inwieweit die Installationsfiles und das cab-file vom Platz her 'passen' und nicht gegen die Quota laufen.
Für die Installationsfiles kein Problem, für das CAB File schon. Zur Zeit erzeuge ich mittels 7zip -l (list) eine temp. Datei, in der die Grössen gelistet sind.
(Siehe Beispiel unten). Jetzt die Frage wie schaffe ich es, den summierten Wert der 'entpackten Files' auszulesen ?
Vielleicht ist das auch kein geiegneter Weg das Ergebnis zu ermitteln - mir fällt aber nichts besseres ein ....
7-Zip 4.65 Copyright (c) 1999-2009 Igor Pavlov 2009-02-03
Listing archive: c:\Users\DienerC\downloads\O+O_LED_Drives.zip
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------ --------
2009-09-29 13:38:34 ....A 7985934 7780730 OODriveLED3Enu.exe
2009-11-14 10:07:16 ....A 207 129 Serial_LEDDrive.txt
------------------- ----- ------------ ------------ ------------------------ --------
798614 7780859 2 files, 0 folders
Schon einmal DANKE an alle.
Gruss
Chris
Hallo Ihr Profis,
irgendwie stehe ich leider auf dem Schlauch. Trotz Internet Recherche und suchen im Forum, komme ich auf keinen grünen Zweig bei meinem Problem.
Ich muss aus einer bestehenden Zeichenkette Teile fienden und diese wieder in einem neuen String zusammenstellen. Und das will mir einfach nicht gelingen.
Wahrscheinlich ist es ganz einfach .....
Also:
Die zu verarbeitende Zeichenkette sind im Prinzip wie folgt aus:
Location=Netzwerk,A4A,CN=Max Mustermann03/OU=xxx/OU=yyy/O=zzz
daraus soll werden
Max Mustermann03/xxx/yyy/zzz
Sicherlich weiss ich um den Befehl, aber so recht klappts eben nicht:
$str1 = StringSplit("Location=Netzwerk,A4A,CN=Max Mustermann03/OU=xxx/OU=yyy/O=zzz",",")
$str2 = StringTrimLeft($cde_str1[3], 3)
$split2 = StringSplit($str2,"/OU=",1)
MsgBox(0,"as_",$str2)
das ergibt --> Max Mustermann03/OU=xxx/OU=yyy/O=zzz
und wie 'vernichte' ich jetzt die zwei OU= und das O= damit der String Max Mustermann03/xxx/yyy/zzz zusammengebaut werden kann ?
Danke schon einmal im voraus an alle Helfenden
![]()