1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. ugt100

Beiträge von ugt100

  • prüfen ob bestimmte Excel Datei geöffnet ist - wenn ja dann Save and Close / wenn nein im Script weiter

    • ugt100
    • 6. Januar 2015 um 16:34

    OK das kann ich natürlich sowieso mal probieren

    Ich glaube ich bin seinerzeit irgendwo im Forum auf diesen Ansatz gestossen .... das weiss ich aber nicht mehr so genau.

  • prüfen ob bestimmte Excel Datei geöffnet ist - wenn ja dann Save and Close / wenn nein im Script weiter

    • ugt100
    • 6. Januar 2015 um 15:16

    Hallo water,

    danke für die schnelle Antwort. Anbei die Ergebnisse meiner Tests.
    Leider ist das Phänomen so in diesen Test nicht aufgetreten (zumindest nicht auf die Schnelle).
    Ich werde den Debug einfach weiterlaufen lassen, manuell drauf schauen und hoffen das sich die Konstellation wieder ergibt.

    Test 1
    kein Excel geöffnet
    Debug: @@ DEBUG COM Error encountered in cde_robobkpnew20141104_NewProgress.au3 (107) :
    Number = 0x80020006 (-2147352570)
    WinDescription = Unbekannter Name.
    Description =
    Source =
    HelpFile =
    HelpContext =
    LastDllError = 0
    Retcode = 0x00000000
    Aktion: Loop erfolgreich verlassen

    Test 2
    2 Excel Files geöffnet / Fokus auf der 2. Excel Tabelle / das zu sicherende File offen im Hintergrund
    Debug: Keine Meldungen
    Aktion: Save&Close erfolgreich

    Test 3
    2 Excel Files geöffnet / Fokus auf das zu sicherende File / der 2. Excel File offen im Hintergrund
    Debug: Keine Meldungen
    Aktion: Save&Close erfolgreich

    Test 4
    das bestimmte Excel File (exklusiv) geöffnet / Fokus nicht auf Excel File
    Debug: Keine Meldungen
    Aktion: Save&Close erfolgreich

    Test 5
    das bestimmte Excel File (exklusiv) geöffnet / Fokus auf Excel File
    Debug: Keine Meldungen
    Aktion: Save&Close erfolgreich

    Test 6
    Excel Instanz geöffnet / kein File offen
    Debug: Keine Meldungen
    Aktion: Loop erfolgreich verlassen


    melde mich (wenn es recht ist)
    Danke
    mfg
    ugt100

  • prüfen ob bestimmte Excel Datei geöffnet ist - wenn ja dann Save and Close / wenn nein im Script weiter

    • ugt100
    • 6. Januar 2015 um 14:25

    Guten Tag zusammen (und allen einen guten Start ins NEUE JAHR 2015),

    ich habe da (mal wieder ) ein Problem, mit dem ich mich schon etwas länger herumschlage und leider zu keiner Lösung gefunden habe. Daher hier meine Frage an das Forum.


    Ich muss im Rahmen einer Datenübertragung, prüfen ob ein bestimmtes Excel File (Dateiname + -pfad sind definiert) zum Übertragungszeitpunkt offen ist.
    Wenn ja, dann soll das File mit Save and Close gespeichert und geschlossen werden.
    Alle weiteren möglichen offenen Excel Files (in der Regel 1 oder 2 weitere Dateien) müssen weiter geöffnet bleiben (da laufen kontinuierlich Online-Daten auf).

    Mittels des u.a. Script Snips verusche ich das Problem in den Griff zu bekommen. Leider klappt das nicht immer.
    Soll heissen, manchmal funktioniert alles wie gewünscht - manchmal bleibt das File weiter geöffnet und wird nicht mit Save&Close beendet.
    Anmerkung - Es spielt (zumindest in meinen Tests) keine Rolle ob das File im Fokus ist (also auf dem Monitor im Vordergrund mit Fokus im File) oder nicht.


    Ich kapiere es einfach nicht - weiss jemand Rat

    [autoit]


    ;~ Check open Excel File - because open file could not be backuped... (added 21.12.2014)
    cdeXLSX1 = 'd:\Laptop\Daten\work\ABCDEF.xlsx'
    _CheckAndSave($cdeXLSX1)

    [/autoit][autoit][/autoit][autoit]

    Func _CheckAndSave($cdeXLSX1) ; Check if any Excel Instance open
    $oExcel = ObjGet('', 'Excel.Application')
    If IsObj($oExcel) Then ; check/list open Workbooks for ABCDEF.xlsx, if open save & close
    For $i = 1 To $oExcel.Workbooks.Count
    If $oExcel.Workbooks($i).FullName = $cdeXLSX1 Then
    $oExcel.Workbooks($i).Save
    $oExcel.Workbooks($i).Close
    ExitLoop
    EndIf
    Next
    EndIf EndFunc ;==>_CheckAndSave

    [/autoit]

    Danke schon mal im voraus

    mfg
    ugt100

  • Prüfen ob die letzten beiden Zeicheneiner Textdatei ein CRLF ist

    • ugt100
    • 28. Oktober 2014 um 10:49

    Hallo Aspirin Junkie,

    klingt absolut sinnig was Du zu der Methodik sagst und ist bestimmt auch so etwas wie ein 'Königsweg' (werde ich mir merken) - Danke
    Der Ansat zvom BugFix ist halt einfach so naheliegend, da ich das so in den ersten Zügen genauso gemacht habe
    Notepad++ / Suchen&Ersetzen (unter Anzeige aller Zeichen) ...

    Die Funktion schau ichmir gleich mal näher an
    Merci vielmals

    mfg
    ugt100

  • Prüfen ob die letzten beiden Zeicheneiner Textdatei ein CRLF ist

    • ugt100
    • 28. Oktober 2014 um 10:23

    Hi BugFix,

    da bin ich aber geplättet - an den RegEX Ausdruck habe ich überhaupt nicht gedacht,
    obwohl ich die Aufbereitung im notepad++ genauso mache (schön blöd - ich grrrrr)

    DANKE

    Mfg
    ugt100

  • Prüfen ob die letzten beiden Zeicheneiner Textdatei ein CRLF ist

    • ugt100
    • 28. Oktober 2014 um 09:53

    Guten Morgen zusammen,

    danke erstmal für die Tips. Damit ist es mir gelungen mein 'Problem' zu lösen.

    hier die meinige Umsetzung

    Spoiler anzeigen

    $sMessage = "Bitte das Quellfile (zwingend Format Textfile) angeben"
    $sSourceCDE = FileOpenDialog($sMessage,@ScriptDir & "\", "Textfile (*.txt;*.csv)",1,"") ;QuellFile angeben für NRF's
    If @error = 1 Then Exit ;Cancel-Button
    $hSourceCDE = FileOpen($sSourceCDE,0) ;File handle lesend öffnen
    FileSetPos($hSourceCDE, -2, $File_End) ;Pointer auf das vorletzte Zeichen der Datei setzen
    $sTextCDE = FileRead($hSourceCDE) ;die letzten beiden Zeichen der Datei einlesen
    If $sTextCDE == @CRLF Then ;auf CRLF prüfen
    FileClose($hSourceCDE) ;File handle schliessen (enthält ja nur die letzten 2 Zeichen)
    $hSourceCDE = FileOpen($sSourceCDE,0) ;File handle erneut lesend öffnen
    $sReadSourceCDE = FileRead($sSourceCDE) ;und Inhalt in Variable übergeben
    FileClose($SourceCDE) ;File handle schliessen
    $sReadSourceCDE = StringTrimRight($sReadSourceCDE,2) ;CRLF entfernen und wieder in Variable übergeben
    $hSourceCDE = FileOpen($sSourceCDE,2) ;File handle (über)schreibend öffnen
    FileWrite($hSourceCDE,$sReadSourceCDE) ;geänderten Inhalt von Variable in handle übergeben ;Inhalt zurückschreiben
    EndIf
    FileClose($hSourceCDE)

    Jetzt erscheint mir das aber doch nicht so optimal - eher suboptimal - was den Code angeht (das mit dem vielen FileOpen/FileClose ...)
    Gibt es aus der Profisciht etwas Eleganteres ?

    Wie gesagt so wi e beschrieben funktioniert es


    Danke an alle und MERCI :thumbup:

  • Prüfen ob die letzten beiden Zeicheneiner Textdatei ein CRLF ist

    • ugt100
    • 27. Oktober 2014 um 14:28

    Hallo zusammen,

    irgendwie stehe ich auf dem Schlauch mit dem o.g. Problem.
    Für eine Weiterverarbeitung des entsprechenden Files, muss ich sicherstellen,
    dass das Ende der Datei eine Zeile ist ohne abschliesenendes CRLF.
    meistens jedoch ist sind die beiden letzten Zeichen ein CRLF (leider aber nicht immer)

    z,B,
    hans,wurst,1234,ffm CRLF
    angela,mett,4567,ffm CRLF
    blut,wurst,8910,ffm CRLF

    Was ich hinbekomme:
    mittels 'FileGetPos' kann ich auf die Postion des letzten Zeichens schliessen
    wie ich (ohne Prüfung) die beiden letzten Zeichen lösche, bekomme ich auch mittels 'StringTrimRight' hin

    Aber wie kann ich den 'Inhalt' des letzten bzw. vorletzten Zeichens ermitteln, um dann ggf. diese zu löschen


    Spoiler anzeigen


    Example()

    Func Example()
    ; Create a constant variable in Local scope of the filepath that will be read/written to.
    Local Const $sFilePath = "c:\temp\___000\Test_CRLF.csv"

    Local $hFileOpen = FileOpen($sFilePath)
    ; Check file position and try to read contents for current position.
    MsgBox($MB_SYSTEMMODAL, "", "Position: " & FileGetPos($hFileOpen))

    ; Now, adjust the position to the beginning.
    FileSetPos($hFileOpen, 0, $FILE_END)

    ; Check file position and try to read contents for current position.
    MsgBox($MB_SYSTEMMODAL, "", "Position: " & FileGetPos($hFileOpen))
    MsgBox($MB_SYSTEMMODAL, "", "Position: " & FileGetPos($hFileOpen)-1)

    ; Close the handle returned by FileOpen.
    FileClose($hFileOpen)

    EndFunc ;==>Example


    Wäre für den ein oder anderen Tip dankbar


    mfg
    ugt100

  • Einlesen CSV File (bestehend aus 6 Coloums)

    • ugt100
    • 23. Oktober 2014 um 16:04

    Hallo zusammen,

    Danke für die diversen Tips bzw. Anstösse. Die haben mir sehr geholfen - Danke
    Letztlich war es ja ganz offensichtlich mein Problem mit dem Ersetzen der Kommatas durch CRLF zu lösen.
    Manchmal sieht man halt den Wald vor lauter Baum nicht mehr.

    Jedenfalls ersetze ich jetzt die Kommas und gut ist es .

    Herzlichen Dank
    mfg
    ugt100

    :rock::thumbup::rock:

  • Einlesen CSV File (bestehend aus 6 Coloums)

    • ugt100
    • 21. Oktober 2014 um 17:03

    Hallo Chesstiger,

    da hast Du absolut recht.
    Aber da ich diese Art von 'Aufbereitung' verschiedenster CSV Files immer wieder machen muss (Analyse Logffiles ... etc),
    war/ist mein persönlicher Ehrgeiz das auch mit AutoIT lösen/abbilden zu können (da dieses mir eigentlich mehr zusagt als die Powershell).

    Auf Verständnis hoofend

    Danke
    mfg
    ugt100

  • Einlesen CSV File (bestehend aus 6 Coloums)

    • ugt100
    • 21. Oktober 2014 um 16:01

    Ich nochmal ... um die Sache z u vereinfachen.

    Wie bewerkstellige ich es aus dem CSV File (den Zeilen) ---> die Einzeldateien mit den untereinander stehenden Werten (Zeilen) z u erzeugen
    (Im Prinzip könnte man auch sagen wie transponiere ich ich die Zeile(n) in Spalte(n))


    Danke schon mal im voraus

  • Einlesen CSV File (bestehend aus 6 Coloums)

    • ugt100
    • 21. Oktober 2014 um 13:15

    Hallo zusammen,

    da mir irgendwie die zündende Idee fehlt und ich es mit AutoIT nicht gebacken bekomme - wende ich mich hier an die 'Profis' - Danke schon mal im voraus.
    (P.S: mittels Powershell hat das relative einfach funktioniert (Code füge ich unten bei)


    Problem:
    Ich muss (tausende) kleine Textdateien erzeugen, die alle den gleichen Aufbau haben und als Quelle eine csv Datei nutzen (diese werfe ich automatisiert aus).

    Quelle:
    Format der csv Datei wie folgt:
    Header: Redirect,Order, RID, Titel, Ref, Filename
    Data: [NRF], Order=Sequential,RID=1111111111122232321,Titel=Angela Merkel,Ref=CN=XXX/OU=YYY/O=ZZ!!abc\n631.xyz, n6361.xyz
    .....


    Ziel (1 Datei pro Zeile) - wobei der letzte Wert den Dateinamen darstellt

    Also:
    Datei n6361.nrf mit folgendem Inhalt
    [NRF]
    Order=Sequential
    RID=1111111111122232321
    Titel=Angela Merkel
    Ref=CN=XXX/OU=YYY/O=ZZ!!abc\n631.xyz


    Das Ganze gelingt mir schon - wenn ich im Vorfelde aus den Zeilen der CSV Datei jeweils untereinander stehende einzelne Werte in einer Spalte mache
    [NRF]
    Order=Sequential
    RID=1111111111122232321T
    itel=Angela Merkel
    Ref=CN=XXX/OU=YYY/O=ZZ!!abc\n631.xyz
    n6361.nrf


    Daher meine Frage wie gelingt mir das Einlesen der 'Zeilen' und das Umsetzen in untereinander stehende einzelne Werte.
    (Anm.: im Script wird auch noch ein batch fürs Kopieren erzeugt - ist aber nicht Teil der Frage)


    HIer mein Script

    Spoiler anzeigen


    #include <Array.au3>
    #include <File.au3>
    AutoItSetOption('TrayIconDebug', 1)

    Local $acdeNRF

    $cdeMessage = "Bitte das Quellfile (zwingend Format Textfile) angeben"
    $cdeSourceNRF = FileOpenDialog($cdeMessage,@ScriptDir & "\", "Textfile (*.txt;*.csv)",1,"") ;QuellFile angeben für XXX's
    If @error = 1 Then Exit ;Cancel-Button

    $cdeTargetLW = InputBox("Server Ziel-LW","Gemapptes DominoServer Ziel LW angeben:", "Z:\","",250,140) ;Ziel LW der Maschine
    If @error = 1 Then Exit ;Cancel-Button

    If Not _FileReadToArray($cdeSourceNRF, $acdeNRF) Then
    MsgBox(4096, "Fehler", " Fehler beim Einlesen ins Array (Error:" & @error &")") ;Einlesen Sourcefile mit Errorhandling (Öffnen des Datenfiles)
    Exit
    EndIf

    $CdeRuns = $acdeNRF[0]/6 ;Berechnung der Anzahl zu erzeugender Files (1-6 Zeilen = Dateiinhalt / 6.Zeile Filename)
    If Int($CdeRuns) - $CdeRuns <> 0 Then
    MsgBox(16,"In der Quelldatei liegt ein Fehler vor","Wahrscheinlichster Fehler: Ein falsche Anzahl an Datenzeilen" & @LF & @LF & "Richtig sind:" & @LF & "5 Zeilen Daten + 1 Zeile für Dateinamen (6 Zeilen/nrf file).")
    Else ;Errorhandling (Anzahl Zeilen muss aufgehen / durch 6 teilbar)
    $cdeMessage1 = ""
    SplashTextOn("Autom. Dateierstellung - Step 1", $cdeMessage1, 300, 70, -1, -1, 16+2, "", 10, 400) ;Splash
    For $i = 1 To $CdeRuns ;Schleife .... Start
    FileOpen(@ScriptDir & "\nrf_temp.txt",2) ;Temp File erzeugen
    For $x = 1 To 5
    _FileWriteToLine(@ScriptDir & "\nrf_temp.txt", $x, $acdeNRF[$x], 1) ;Schreiben der 5 Zeilen für NRF in das neues Temp File
    If $x = 5 Then
    $cdeTestFilenamePos = StringInStr($acdeNRF[$x], "\", 0, -1)
    $cdeTestFileLen = StringLen($acdeNRF[$x])
    $cdeTestFileonly = $cdeTestFileLen - $cdeTestFilenamePos
    $cdeTestFilename = StringRight($acdeNRF[$x],$cdeTestFileonly)
    $cdeTestFilenameNoExt = StringTrimRight($cdeTestFilename, 3)
    EndIf

    Next
    FileClose(@ScriptDir & "\nrf_temp.txt")
    $cdeFilename = $cdeTestFilenameNoExt & "nrf" ;Dateiname ermitteln (immer die jeweils 6.Zeile)
    FileMove(@ScriptDir & "\nrf_temp.txt",@ScriptDir & "\nrf\" & $cdeFilename,9) ;Neues File benamen und ins Verzeichnis 'NRF' schieben
    $cdeMessage1 = ($i & " / " & $CdeRuns & " - NRF File(s) erzeugt" & @CRLF & @CRLF & $cdeFilename) ;Splash text
    ControlSetText("Autom. Dateierstellung - Step 1", "", "Static1", $cdeMessage1) ;Splash update
    Sleep(200)
    For $y = 1 To 5
    _ArrayDelete($acdeNRF, 1) ;'Abgearbeitete Zeilen' aus dem Array löschen
    Next
    Next ;Schleife .... Ende
    Sleep(500)
    _FileReadToArray($cdeSourceNRF, $acdeNRF) ;SourceFile erneut einlesen
    $x = 5
    SplashTextOn("- @cde/spi (2013) - Step 2", $cdeMessage1, 300, 70, -1, -1, 16+2, "", 10, 400) ;Splash
    For $i = 1 To $CdeRuns ; Schleife .... Start
    $cdeFileNameNew = $cdeTestFilenameNoExt & ".bat" ;Filename neu ->'Filename.bat'
    $z = StringInStr($acdeNRF[$x],"!", 0, -1) ;StringSplit - nach ! -von links- suchen (Ref=CN=XXXXXX/OU=YYYYY/O=ZZZZZ!!123\456\789.xxx)
    $cdePath = StringTrimLeft($acdeNRF[$x],$z) ;StringSplit - Anteil nach dem ! ermitteln (databases\EC\a3m.nsf)
    $cdeLenPath = StringLen($cdePath) ;StringSplit - Länge des 'Path' Strings ermitteln
    $z = StringInStr($cdePath,"\", 0, -1) ;StringSplit - nach \ -von links- suchen
    $z = $cdeLenPath - $z ;StringSplit - Ermitteln der Anzahl zeichen des 'Pfades'
    $cdePath = StringTrimRight($cdePath, $z+1) ;StringSplit - zusammensetzen Pfad (databases\EC)
    $cdeMessage1 = ($i & " / " & $CdeRuns & " - Batch File(s) erzeugt" & @CRLF & @CRLF & $cdeFileNameNew) ;Splash text
    ControlSetText("- @cde/spi (2013) - Step 2", "", "Static1", $cdeMessage1) ;Splash update
    Sleep(200)
    $cdeTemp = FileOpen(@ScriptDir & "\nrf\" & $cdeFileNameNew,2) ;Neues File mit FileNameNew erzeugen
    FileWrite($cdeTemp, "Copy " & ".\" & $cdeFilename & " " & $cdeTargetLW & "Notesdat\" & $cdePath) ;Ins File copy Zeile schreiben (copy Quelle - LW+Pfad)
    FileClose($cdeTemp)
    $x = $x + 6 ;Um 6 Elemente im Array weitergehen (nächster Dateiname)
    Next ;Schleife .... Ende
    EndIf
    Exit


    Wahrscheinlich ganz einfach .... für den 'Profi'


    und hier die Powershell

    Code
    param
    (
        $CSV,
        $OutputDir
    )
    
    
    $OutputDir = Read-Host "Path for Import File - " "Please enter path for output files."
    
    
    If( -not (Test-Path $OutputDir) )
    {
      $Result = [System.Windows.Forms.MessageBox]::Show("Directory does not exists, should this be created ?","Please choice",3,[System.Windows.Forms.MessageBoxIcon]::Exclamation)
        If ($Result -eq "Yes")
        {
            New-Item $OutputDir -type directory | Out-Null
            $a = "Directory created"
            $a
        }
        elseif ($Result -eq "No")
        {
            $a = "Choice 'No' - Script will be cancelled / no action"
            $a
            Exit  
        }   
        else
        {
            $a = "Quit"
            $a
            Exit
        }
    }
        $CSV = ".\*.csv"                #das Importfile MUSS im SricptDir liegen#
        $DataArr = Import-CSV $CSV
        $DataArr | % {
           $Data = $_
           $Filename = "$($Data.Filename).nrf"
           "$($Data.Redirect)" | Out-File -Encoding Default -FilePath "$($OutputDir)\$($Filename)"
           "$($Data.Order)" | Out-File -Encoding Default -FilePath "$($OutputDir)\$($Filename)" -Append
           "$($Data.RepID)" | Out-File -Encoding Default -FilePath "$($OutputDir)\$($Filename)" -Append
           "$($Data.Titel)" | Out-File -Encoding Default -FilePath "$($OutputDir)\$($Filename)" -Append
           "$($Data.Ref)" | Out-File -Encoding Default -FilePath "$($OutputDir)\$($Filename)" -Append
           }
           $a = "NRF files created"
           $a
    Alles anzeigen
  • Problem bei der Kombination --> Auswahl aus einer Combobox --> Wert an RDP Session übergeben und Session starten

    • ugt100
    • 18. September 2014 um 11:17

    Hallo Schnitzel,

    das ist das Script was ich verwende. Ich habe die Stellen an denen 'interne' Daten stehen einfach ersetzt durch 'neutrale' Zeichen.

    Ich habe eine ini Datei in der die Liste der Server hinterlegt ist ---> damit füllt sich die Auswahlbox
    Desweiteren habe ich dort den User und vercrypted dasdazugehörige PW hinterlegt. ---> Das kann ich auch erfolgreich abfragen
    Wenn ich dann mittels MsgBoxen 'debugge' komme ich bis an die Stelle AdlibRegister...
    also ob die Prüfung ob die Verbindung besteht .... und da glaube ich hängt es ...


    DANKE schon einmal

    Spoiler anzeigen


    Msgbox(0,"","waiting ...1")
    _Styles() ; setzen der Styles für die Control's und die GUI
    Msgbox(0,"","waiting ...2")
    AdlibRegister("checkconn", 500) ; checken, ob die Verbindung noch besteht. Ansonsten wird in diesem Fall beendet...
    Msgbox(0,"","waiting ...3")
    While GUIGetMsg() <> -3
    Sleep(10)
    MsgBox(0,"", GUIGetMsg) )
    WEnd
    _Exit()
    EndSwitch

  • Problem bei der Kombination --> Auswahl aus einer Combobox --> Wert an RDP Session übergeben und Session starten

    • ugt100
    • 18. September 2014 um 09:11

    Guten Morgen zusammen,
    sorry - das ich schon wieder mit dem Thema aufschlage ... aber ich verstehe das nicht mehr (inzwischen habe ich gestern 4 Std. geforscht und nichts gefunden)

    Also ...
    Nachdem ich die Auswahlbox und das Starten der RDP Session zusammengeführt hatte (s. Script/Spoiler) hat das bei mehreren Kollegen funktioniert - ebenso bei mir.


    Jetzt auf einmal funzt das Ganze nicht mehr - soll heissen die RDP Session wird nicht mehr aufgebaut.Man landet immer auf dem Screen

    '$oRDP.DisconnectedText = "Die Verbindung wurde getrennt ..."'

    Mache ich das Ganze anstelle mit der Auswahlbox mit einer InputBox funktioniert alles einwandfrei (ich verstehe es nicht :( )

    Vllt hat ja jemand eine Idee / Eingebung - wäre super - DANKE

    Spoiler anzeigen

    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_Outfile_x64=..\EmeaMail10_RDP.exe
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include <GUIConstants.au3>
    #include <WindowsConstants.au3>
    #include <Crypt.au3>
    #include <File.au3>
    #include <String.au3>

    Opt("WinTitleMatchMode", 4)
    Opt("WinSearchChildren", 1)
    Opt("MustDeclareVars", 1)

    Global $msg, $sATLClass
    Global $GuiWidth = @DesktopWidth -25
    Global $GuiHeight = @DesktopHeight -35
    Global $GuiTitle = "Remote Zugang "
    Global $oRDP = ObjCreate("MsTscAx.MsTscAx")
    Global $GUI = GUICreate($GuiTitle, $GuiWidth, $GuiHeight, 5, 0, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
    Global $GUIActiveX = GUICtrlCreateObj($oRDP, 5, 5, $GuiWidth -10, $GuiHeight -10)
    GUISetBkColor(0x6c3C42)

    Global $GuiTitleNew = ""

    ;~ -----------------> Local $sCDETargetServer = InputBox("RDP session", "Verbindung zu welchem Server: ", "EmeaMail", "", 250, 150); <---------DAS FUNKTIONIERT OHNE PROBLEME

    If FileExists(@ScriptDir & "\RDPList.txt") Then
    ;~ If FileExists("c:\temp\0_RDPs\Snips\RDPList.txt") Then
    Local $sCDEPassword = FileReadLine(@ScriptDir & "\RDPList.txt", 2)
    Local $sCDELevel = FileReadLine(@ScriptDir & "\RDPList.txt", 4)
    Local $sCDEPassword1 = _StringEncrypt(0, $sCDEPassword, "yyyyyy", $sCDELevel)
    Else
    MsgBox(64, "Error", "Missing File - RDP cannot be started", 2)
    EndIf

    $oRDP.Server = $sCDETargetServer
    $oRDP.Domain = "XXXX"
    $oRDP.UserName = "aaaaa"
    $oRDP.AdvancedSettings2.ClearTextPassword = $sCDEPassword1 ; das Passwort dazu
    $oRDP.ConnectingText = "Die Verbindung wird hergestellt ..."
    $oRDP.DisconnectedText = "Die Verbindung wurde getrennt ..."
    $oRDP.AdvancedSettings2.RedirectDrives = False
    $oRDP.AdvancedSettings2.RedirectPrinters = True
    $oRDP.AdvancedSettings2.RedirectPorts = False
    $oRDP.AdvancedSettings2.RedirectSmartCards = False
    $oRDP.AdvancedSettings2.EnableAutoReconnect = True
    $oRDP.AdvancedSettings2.AllowBackgroundInput = True
    $oRDP.AdvancedSettings2.ConnectionBarShowRestoreButton = False
    $oRDP.AdvancedSettings2.keepAliveInterval = 500
    $oRDP.AdvancedSettings5.AudioRedirectionMode = 0
    $oRDP.AdvancedSettings7.PerformanceFlags = 0x00000000
    $oRDP.Connect()


    $GuiTitleNew = "Remote Zugang - " & $oRDP.Server
    WinSetTitle($GuiTitle, "", $GuiTitleNew)


    _Styles() ; setzen der Styles für die Control's und die GUI
    AdlibRegister("checkconn", 500) ; checken, ob die Verbindung noch besteht. Ansonsten wird in diesem Fall beendet...
    While GUIGetMsg() <> -3
    Sleep(10)
    WEnd
    _Exit()

    ;====================================================================> ab hier kommen die Funktionen

    Func _Styles()
    Local $aClasses = StringSplit(WinGetClassList($GUI, ""), @LF)
    For $i = 1 To $aClasses[0]
    If StringLeft($aClasses[$i], 4) = "ATL:" Then
    $sATLClass = $aClasses[$i]
    ExitLoop
    EndIf
    Next
    Global $hUIContainerClass = ControlGetHandle($GUI, "", "[CLASS:UIContainerClass]")
    Global $hUIMainClass = ControlGetHandle($GUI, "", "[CLASS:UIMainClass]")
    Global $hATL = ControlGetHandle($GUI, "", "[CLASS:" & $sATLClass & "]")
    _SetStyle($hUIContainerClass, BitOR($WS_CHILD, $WS_CLIPCHILDREN, $WS_CLIPSIBLINGS, $WS_VISIBLE), BitOR(0x100000, 0x4))
    _SetStyle($hUIMainClass, BitOR($WS_CHILD, $WS_CLIPCHILDREN, $WS_CLIPSIBLINGS, $WS_VISIBLE))
    _SetStyle($hATL, BitOR($WS_CHILD, $WS_CLIPCHILDREN, $WS_CLIPSIBLINGS, $WS_VISIBLE))
    _SetStyle($GUI, BitOR($WS_BORDER, $WS_CAPTION, $WS_CLIPCHILDREN, $WS_CLIPSIBLINGS, $WS_DLGFRAME, $WS_GROUP, $WS_SYSMENU,$WS_THICKFRAME, $WS_VISIBLE))
    EndFunc ;==>_Styles

    Func _Exit()
    GUIDelete()
    AdlibUnRegister("checkconn")
    Exit
    EndFunc ;==>_Exit

    Func checkconn()
    If $oRDP.Connected = 0 Then _Exit()
    EndFunc ;==>checkconn

    Func _SetStyle($hwnd, $style, $exstyle = 0x0)
    DllCall("user32.dll", "long", "SetWindowLong", "hwnd", $hwnd, "int", -16, "long", $style)
    DllCall("user32.dll", "long", "SetWindowLong", "hwnd", $hwnd, "int", -20, "long", $exstyle)
    EndFunc ;==>_SetStyle

  • Funktion FileListToArrayWithDate wirft Fehler: Subscript used on non-accessible variable ....

    • ugt100
    • 9. September 2014 um 14:45

    Hallo Aspirin Junkie,

    vielen lieben Dank für die schnelle Antwort - das wäre mir sicherlich nicht so 'schnell' aufgegangen !!!


    :rock:  :rock:  :rock:  :rock:  :rock:

    mfg
    ugt100

  • Funktion FileListToArrayWithDate wirft Fehler: Subscript used on non-accessible variable ....

    • ugt100
    • 9. September 2014 um 14:28

    Hallo zusammen,

    weil ich gerade sehe das auch ASPIRIN JUNKIE online ist .... soweit ich das sehe kommt die Funktion ja von Ihm

    Ich bekomme, wenn ich die u.a. Funktion nutzen will, immer wieder die folgende Fehlermeldung.
    Irgendwie habe ich inzwischen keine Idee mehr ...
    Wahrscheinlich ganz einfach - wenn man es weiss
    Wäre super toll wenn das gelöst würde, denn ich könnte die Funktion sehr gut gebrauchen, um hier im internen Projekt
    die Migration vorranzutreiben .... DANKE schon mal im voraus

    Error Otuput:


    Skipping AU3check: Current version doesn't support the AutoIt3 v 3.3.9.5+ syntax.
    Running:(3.3.10.2):J:\install_AIT\autoit3_x64.exe "C:\temp\new1.au3"
    Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop

    "C:\temp\new1.au3" (35) : ==> Subscript used on non-accessible variable.:
    $sFileList &= $sFile & ";" & _DateToDayValue($a_Time[0], $a_Time[1], $a_Time[2]) & $sDelim
    $sFileList &= $sFile & ";" & _DateToDayValue($a_Time^ ERROR
    AutoIt3.exe ended.rc:1


    Spoiler anzeigen


    #include <Array.au3>
    #include <Date.au3>

    $FileList = FileListToArrayWithDate(@DesktopDir)
    _ArrayDisplay($FileList)


    Func FileListToArrayWithDate($sPath, $sFilter = "*", $iFlag = 0)
    Local $hSearch, $sFile, $sFileList, $sDelim = "|", $a_Time, $a_x
    $sPath = StringRegExpReplace($sPath, "[\\/]+\z", "") & "" ; ensure single trailing backslash
    If Not FileExists($sPath) Then Return SetError(1, 1, "")
    If StringRegExp($sFilter, "[\\/:><\|]|(?s)\A\s*\z") Then Return SetError(2, 2, "")
    If Not ($iFlag = 0 Or $iFlag = 1 Or $iFlag = 2) Then Return SetError(3, 3, "")
    $hSearch = FileFindFirstFile($sPath & $sFilter)
    If @error Then Return SetError(4, 4, "")
    While 1
    $sFile = FileFindNextFile($hSearch)
    If @error Then ExitLoop
    If ($iFlag + @extended = 2) Then ContinueLoop
    $a_Time = FileGetTime($sPath & $sFile)
    $sFileList &= $sFile & ";" & _DateToDayValue($a_Time[0], $a_Time[1], $a_Time[2]) & $sDelim
    WEnd
    FileClose($hSearch)
    If Not $sFileList Then Return SetError(4, 4, "")
    Local $a_Temp = StringSplit(StringTrimRight($sFileList, 1), "|")
    Local $a_Ret[UBound($a_Temp)][2] = [[$a_Temp[0]]]
    For $i = 1 To UBound($a_Temp) - 1
    $a_x = StringSplit($a_Temp[$i], ";", 2)
    $a_Ret[$i][0] = $a_x[0]
    $a_Ret[$i][1] = $a_x[1]
    Next
    _ArraySort($a_Ret, 1, 1, UBound($a_Ret) - 1, 1)
    Return $a_Ret
    EndFunc;==>_FileListToArray


    mfg
    ugt100

  • Problem bei der Kombination --> Auswahl aus einer Combobox --> Wert an RDP Session übergeben und Session starten

    • ugt100
    • 9. September 2014 um 11:58

    Hallo Schnitzel,

    auf Deinem Tip habe ich mich der Sache nochmals angenommen und siehe da ... es funzt jetzt.
    Der entscheidenende 'Clue' war das GUISetState(@SW_Hide bzw. GUISetState(@SW_Show.

    Merci vielmals

    Gruss
    ugt100


    :thumbup:  :thumbup:  :thumbup:

  • Problem bei der Kombination --> Auswahl aus einer Combobox --> Wert an RDP Session übergeben und Session starten

    • ugt100
    • 8. September 2014 um 15:41

    Hallo Schnitzel,

    danke für den Tip. Das werde im Laufe der Woche testen und entsprechend vom Erfolg (hoffentlich) berichten.

    merci

    mfg
    ugt100

  • Problem bei der Kombination --> Auswahl aus einer Combobox --> Wert an RDP Session übergeben und Session starten

    • ugt100
    • 8. September 2014 um 15:08

    HAllo Blubstar,

    das ist j agenau mein Problem. Denn wennich die beiden Scripte zusammenführe, klappt das nicht - denn die GUI mit der Auswahlbox läuft durch und dann öffnet sich sofort die RDP Seesion..
    Da aber keine Auswahl getroffen werden konnte, klappt das nicht.
    Ich denke das Problem, sind die beiden GUI's - die 2. muss warten bis bei der ersten eine Auswahl erfolgt ist.
    Leider gleingt mir das nicht abzubilden

    mfg
    ugt100

  • Problem bei der Kombination --> Auswahl aus einer Combobox --> Wert an RDP Session übergeben und Session starten

    • ugt100
    • 4. September 2014 um 15:35

    Hallo zusammen,
    nachdem ich mich nun mehr immer im Kreis drehe, wende ich mich hier an das Forum und erhoffe mir den ein oder anderen Denkanstoß / Tip.

    Ziel meines Tun ist es:
    - Script starten welches mir eine Combobox mit mehreren Auswahlmöglichkeiten (Server - die per RDP geöffnet werden sollen) anzeigt
    - daraus soll ein Eintrag (= ein Server) ausgewählt werden und als Variable
    - übergeben werden an eine weitere Routine/Script
    - welches dann die RDP Session startet.

    Status aktuell
    - ich habe ein Script, das mir die Auswahlbox anbietet und auch eine Auswahl zu lässt (seperates Script - Conbobox.au3)
    und
    - ich habe auch ein 'übernommenes' Script (mit eigenen Anpassungen), das die RDP Session startet (separates Script - Server_RDP.au3)
    Beide für sich gesehen funktionieren auch.

    Problem
    Mir gelingt es nicht die Combobox mit der Auswahl sozusagen vor den dedizierten (sprich mit dem Wert aus der Combobox) Start der RDP Session zu plazieren.
    Also Combobox - Auswahl Server - Start der RDP Session auf Basis der ComboboxAuswahl.
    (M.E: hat das was mit den zwei GUIs zu tun .... )

    Combobox

    [autoit]


    #include <ButtonConstants.au3>
    #include <ComboConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <GUIComboBox.au3>
    #include <WindowsConstants.au3>
    $Form1 = GUICreate("Evonik - RDP Session - Handler", 250, 500, 192, 124)
    $Combo1 = GUICtrlCreateCombo("Server auswählen:", 8, 25, 137, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
    GUICtrlSetData(-1, "01...|02...|03...")

    [/autoit][autoit][/autoit][autoit]

    _GUICtrlComboBox_ShowDropDown($Combo1, True)

    [/autoit][autoit][/autoit][autoit]

    $Auslesen = GUICtrlCreateButton("Connect ...", 165, 23, 75, 25)
    GUISetState(@SW_SHOW)

    [/autoit][autoit][/autoit][autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Auslesen
    $Wert = GUICtrlRead($Combo1) ; Ausgewählte Wort wird ausgelesen und in einer Variable gespeichert
    ;~ Send($Wert) ; Variable wird aufgerufen wiedergegeben
    MsgBox(0,"",$Wert) ;<----------- hier sollte jetzt die Remote Session mit dem ausgewählten Server starten
    EndSwitch
    WEnd

    [/autoit]

    Server_RDP

    [autoit]


    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_Outfile_x64=..\EmeaMail10_RDP.exe
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include <GUIConstants.au3>
    #include <WindowsConstants.au3>
    #include <Crypt.au3>
    #include <File.au3>
    #include <String.au3>

    [/autoit][autoit][/autoit][autoit]

    Opt("WinTitleMatchMode", 4)
    Opt("WinSearchChildren", 1)
    Opt("MustDeclareVars", 1)

    [/autoit][autoit][/autoit][autoit]

    Global $msg, $sATLClass
    Global $GuiWidth = @DesktopWidth -25
    Global $GuiHeight = @DesktopHeight -35
    Global $GuiTitle = "Remote Zugang "
    Global $oRDP = ObjCreate("MsTscAx.MsTscAx")
    Global $GUI = GUICreate($GuiTitle, $GuiWidth, $GuiHeight, 5, 0, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
    Global $GUIActiveX = GUICtrlCreateObj($oRDP, 5, 5, $GuiWidth -10, $GuiHeight -10)
    GUISetBkColor(0x6c3C42)

    [/autoit][autoit][/autoit][autoit]

    Global $GuiTitleNew = ""

    [/autoit][autoit][/autoit][autoit]

    ;~ Local $sCDETargetServer = InputBox("RDP session", "Verbindung zu welchem Server: ", "EmeaMail", "", 250, 150)

    [/autoit][autoit][/autoit][autoit]

    If FileExists(@ScriptDir & "\RDPList.txt") Then
    ;~ If FileExists("c:\temp\0_RDPs\Snips\RDPList.txt") Then
    Local $sCDEPassword = FileReadLine(@ScriptDir & "\RDPList.txt", 2)
    Local $sCDELevel = FileReadLine(@ScriptDir & "\RDPList.txt", 4)
    Local $sCDEPassword1 = _StringEncrypt(0, $sCDEPassword, "sstrad", $sCDELevel)
    Else
    MsgBox(64, "Error", "Missing File - RDP cannot be started", 2)
    EndIf

    [/autoit][autoit][/autoit][autoit]

    $oRDP.Server = $sCDETargetServer
    $oRDP.Domain = "XXXX"
    $oRDP.UserName = "aaaaa"
    $oRDP.AdvancedSettings2.ClearTextPassword = $sCDEPassword1 ; das Passwort dazu
    $oRDP.ConnectingText = "Die Verbindung wird hergestellt ..."
    $oRDP.DisconnectedText = "Die Verbindung wurde getrennt ..."
    $oRDP.AdvancedSettings2.RedirectDrives = False
    $oRDP.AdvancedSettings2.RedirectPrinters = True
    $oRDP.AdvancedSettings2.RedirectPorts = False
    $oRDP.AdvancedSettings2.RedirectSmartCards = False
    $oRDP.AdvancedSettings2.EnableAutoReconnect = True
    $oRDP.AdvancedSettings2.AllowBackgroundInput = True
    $oRDP.AdvancedSettings2.ConnectionBarShowRestoreButton = False
    $oRDP.AdvancedSettings2.keepAliveInterval = 500
    $oRDP.AdvancedSettings5.AudioRedirectionMode = 0
    $oRDP.AdvancedSettings7.PerformanceFlags = 0x00000000
    $oRDP.Connect()

    [/autoit][autoit][/autoit][autoit][/autoit][autoit]

    $GuiTitleNew = "Remote Zugang - " & $oRDP.Server
    WinSetTitle($GuiTitle, "", $GuiTitleNew)

    [/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit][autoit]

    _Styles() ; setzen der Styles für die Control's und die GUI
    AdlibRegister("checkconn", 500) ; checken, ob die Verbindung noch besteht. Ansonsten wird in diesem Fall beendet...
    While GUIGetMsg() <> -3
    Sleep(10)
    WEnd
    _Exit()

    [/autoit][autoit][/autoit][autoit]

    ;====================================================================> ab hier kommen die Funktionen

    [/autoit][autoit][/autoit][autoit]

    Func _Styles()
    Local $aClasses = StringSplit(WinGetClassList($GUI, ""), @LF)
    For $i = 1 To $aClasses[0]
    If StringLeft($aClasses[$i], 4) = "ATL:" Then
    $sATLClass = $aClasses[$i]
    ExitLoop
    EndIf
    Next
    Global $hUIContainerClass = ControlGetHandle($GUI, "", "[CLASS:UIContainerClass]")
    Global $hUIMainClass = ControlGetHandle($GUI, "", "[CLASS:UIMainClass]")
    Global $hATL = ControlGetHandle($GUI, "", "[CLASS:" & $sATLClass & "]")
    _SetStyle($hUIContainerClass, BitOR($WS_CHILD, $WS_CLIPCHILDREN, $WS_CLIPSIBLINGS, $WS_VISIBLE), BitOR(0x100000, 0x4))
    _SetStyle($hUIMainClass, BitOR($WS_CHILD, $WS_CLIPCHILDREN, $WS_CLIPSIBLINGS, $WS_VISIBLE))
    _SetStyle($hATL, BitOR($WS_CHILD, $WS_CLIPCHILDREN, $WS_CLIPSIBLINGS, $WS_VISIBLE))
    _SetStyle($GUI, BitOR($WS_BORDER, $WS_CAPTION, $WS_CLIPCHILDREN, $WS_CLIPSIBLINGS, $WS_DLGFRAME, $WS_GROUP, $WS_SYSMENU,$WS_THICKFRAME, $WS_VISIBLE))
    EndFunc ;==>_Styles

    [/autoit][autoit][/autoit][autoit]

    Func _Exit()
    GUIDelete()
    AdlibUnRegister("checkconn")
    Exit
    EndFunc ;==>_Exit

    [/autoit][autoit][/autoit][autoit]

    Func checkconn()
    If $oRDP.Connected = 0 Then _Exit()
    EndFunc ;==>checkconn

    [/autoit][autoit][/autoit][autoit]

    Func _SetStyle($hwnd, $style, $exstyle = 0x0)
    DllCall("user32.dll", "long", "SetWindowLong", "hwnd", $hwnd, "int", -16, "long", $style)
    DllCall("user32.dll", "long", "SetWindowLong", "hwnd", $hwnd, "int", -20, "long", $exstyle)
    EndFunc ;==>_SetStyle

    [/autoit][autoit][/autoit][autoit]

    ;Hier noch mal alle Parameter bis RDP Version 7
    ;Das "AdvancedSettings2" <- die Zahl am Ende Symbolisiert ab welcher RDP Version dieser Parameter verfügbar ist

    [/autoit][autoit][/autoit][autoit]

    ;CipherStrength Read-only The maximum encryption strength of the current control.
    ;Connected Read-only The connection state of the current control.
    ;ConnectingText Read/write The text that appears centered in the control while the control is connecting.
    ;DesktopHeight Read/write The current control's height, in pixels, on the initial remote desktop.
    ;DesktopWidth Read/write The current control's width, in pixels, on the initial remote desktop.
    ;DisconnectedText Read/write The text that appears centered in the control before a connection is terminated.
    ;Domain Read/write The domain to which the current user logs on.
    ;FullScreenTitle Write-only The window title displayed when the control is in full-screen mode.
    ;HorizontalScrollBarVisible Read-only Indicates whether the control has displayed a horizontal scroll bar.
    ;SecuredSettings Read-only A IMsTscSecuredSettings interface pointer.
    ;SecuredSettingsEnabled Read-only Indicates whether the IMsTscSecuredSettings interface is available.
    ;Server Read/write The name of the server to which the current control is connected.
    ;StartConnected Read/write Indicates whether the control will establish the RD Session Host server connection immediately upon startup.
    ;UserName Read/write The user name logon credential.
    ;Version Read-only The version number of the current control.
    ;VerticalScrollBarVisible Read-only Indicates whether the control displays a vertical scroll bar.
    ;AdvancedSettings2.AcceleratorPassthrough Read/write Specifies if keyboard accelerators should be passed to the server.
    ;AdvancedSettings2.BitmapCacheSize Read/write The size, in kilobytes, of the bitmap cache file used for 8-bits-per-pixel bitmaps. Valid numeric values of this property are 1 to 32 inclusive.
    ;AdvancedSettings2.BitmapPersistence Read/write Specifies if persistent bitmap caching should be used. Persistent caching can improve performance but requires additional disk space.
    ;AdvancedSettings2.BitmapVirtualCache16BppSize Read/write Specifies the size, in megabytes, of the persistent bitmap cache file to use for the 15 and 16 bits-per-pixel high-color settings.
    ;AdvancedSettings2.BitmapVirtualCache24BppSize Read/write Specifies the size, in megabytes, of the persistent bitmap cache file to use for the 24 bits-per-pixel high-color setting.
    ;AdvancedSettings2.BitmapVirtualCacheSize Read/write Specifies the size, in megabytes, of the persistent bitmap cache file to use for 8-bits-per-pixel color. Valid numeric values of this property are 1 to 32 inclusive. Note that the maximum size for all virtual cache files is 128 MB. Related properties include the BitmapVirtualCache16BppSize and BitmapVirtualCache24BppSize properties.
    ;AdvancedSettings2.brushSupportLevel Read/write This property is not supported.
    ;AdvancedSettings2.CachePersistenceActive Read/write Specifies whether persistent bitmap caching should be used.
    ;AdvancedSettings2.ClearTextPassword Write-only Specifies the password with which to connect. For more information, see the IMsTscNonScriptable interface.
    ;AdvancedSettings2.ConnectToServerConsole Read/write Windows Server 2003, Windows XP with SP2, Windows XP with SP1, and Windows XP: Specifies if the control should attempt to connect to the console session of a server.
    ;AdvancedSettings2.ConnectWithEndpoint Write-only This property is not supported.
    ;AdvancedSettings2.DedicatedTerminal Read/write Windows XP with SP1 and Windows XP: Specifies if the client should run in dedicated-terminal mode.
    ;AdvancedSettings2.DisableCtrlAltDel Read/write Specifies if the initial explanatory screen in Winlogon should display.
    ;AdvancedSettings2.DisplayConnectionBar Read/write Specifies whether to use the connection bar. The default value is VARIANT_TRUE, which enables the property.
    ;AdvancedSettings2.DoubleClickDetect Read/write Specifies if the client identifies double-clicks for the server.
    ;AdvancedSettings2.EnableMouse Read/write Windows XP with SP1 and Windows XP: Specifies if the client sends mouse-button messages to the server.
    ;AdvancedSettings2.EnableWindowsKey Read/write Specifies if the Windows key can be used in the remote session.
    ;AdvancedSettings2.EncryptionEnabled Read/write This property is not supported. Encryption cannot be disabled.
    ;AdvancedSettings2.GrabFocusOnConnect Read/write Specifies if the client control should have the focus while connecting.
    ;AdvancedSettings2.HotKeyAltEsc Read/write Specifies the virtual-key code to add to ALT to determine the hotkey replacement for ALT+ESC. VK_INSERT is the default value, with ALT+INSERT as the resulting sequence. This property is valid only when the KeyboardHookMode property is not enabled.
    ;AdvancedSettings2.HotKeyAltShiftTab Read/write Specifies the virtual-key code to add to ALT to determine the hotkey replacement for ALT+SHIFT+TAB. VK_NEXT is the default value, with ALT+PAGE DOWN as the resulting sequence. This property is valid only when the KeyboardHookMode property is not enabled.
    ;AdvancedSettings2.HotKeyAltSpace Read/write Specifies the virtual-key code to add to ALT to determine the hotkey replacement for ALT+SPACE. VK_DELETE is the default, with ALT+DELETE as the resulting sequence. This property is valid only when the KeyboardHookMode property is not enabled.
    ;AdvancedSettings2.HotKeyAltTab Read/write Specifies the virtual-key code to add to ALT to determine the hotkey replacement for ALT+TAB. VK_PRIOR is the default value, with ALT+PAGE UP as the resulting sequence. This property is valid only when the KeyboardHookMode property is not enabled.
    ;AdvancedSettings2.HotKeyCtrlAltDel Read/write Specifies the virtual-key code to add to CTRL+ALT to determine the hotkey replacement for CTRL+ALT+DELETE, also called the secure attention sequence (SAS). VK_END is the default. Note that even when the KeyboardHookMode property is enabled, CTRL+ALT+DELETE is never redirected to the remote server; CTRL+ALT+DELETE is the local SAS sequence.
    ;AdvancedSettings2.HotKeyCtrlEsc Read/write Specifies the virtual-key code to add to ALT to determine the hotkey replacement for CTRL+ESC. VK_HOME is the default value, with ALT+HOME as the resulting sequence. This property is valid only when the KeyboardHookMode property is not enabled.
    ;AdvancedSettings2.HotKeyFullScreen Read/write Specifies the virtual-key code to add to CTRL+ALT to determine the hotkey replacement for switching to full-screen mode. VK_CANCEL is the default value.
    ;AdvancedSettings2.InputEventsAtOnce Read/write This property is not supported. Windows XP with SP1 and Windows XP: Specifies the typical number of input events to batch together.
    ;AdvancedSettings2.keepAliveInterval Read/write Specifies an interval, in milliseconds, at which the client sends keep-alive messages to the server. The default value of the property is zero, which disables keep-alive messages. The minimum valid value of this property is 10,000, which represents 10 seconds. Note that a group policy setting that specifies whether persistent client connections to the server are allowed can override this property setting.
    ;AdvancedSettings2.KeyboardFunctionKey Read/write Valid for Windows CE only.
    ;AdvancedSettings2.KeyboardSubType Read/write Valid for Windows CE only.
    ;AdvancedSettings2.KeyboardType Read/write Valid for Windows CE only.
    ;AdvancedSettings2.LoadBalanceInfo Read/write Specifies the load balancing cookie that will be placed in the X.224 Connection Request packet in the RD Session Host server protocol connection sequence.
    ;AdvancedSettings2.maxEventCount Read/write This property is not supported. Windows XP with SP1 and Windows XP: Specifies the maximum number of input events to batch together.
    ;AdvancedSettings2.MaximizeShell Read/write Specifies if programs launched with the StartProgram property should be maximized.
    ;AdvancedSettings2.minInputSendInterval Read/write Specifies the minimum interval, in milliseconds, between the sending of mouse events.
    ;AdvancedSettings2.MinutesToIdleTimeout Read/write Specifies the maximum length of time, in minutes, that the client should remain connected without user input. If the specified time elapses, the control calls the IMsTscAxEvents::OnIdleTimeoutNotification method.
    ;AdvancedSettings2.NotifyTSPublicKey Read/write This property is not supported.
    ;AdvancedSettings2.NumBitmapCaches Read/write This property is not supported. Windows XP with SP1 and Windows XP: Specifies the number of bitmap caches to use.
    ;AdvancedSettings2.orderDrawThreshold Read/write This property is not supported. Windows XP with SP1 and Windows XP: Specifies the maximum number of drawing operations to batch together for rendering.
    ;AdvancedSettings2.overallConnectionTimeout Read/write Specifies the total length of time, in seconds, that the client control waits for a connection to complete. The maximum valid value of this property is 600, which represents 10 minutes. If the specified time elapses before connection completes, the control disconnects and calls the IMsTscAxEvents::OnDisconnected method. A related property is singleConnectionTimeout.
    ;AdvancedSettings2.PerformanceFlags Read/write Specifies a set of features that can be set at the server to improve performance.
    ;AdvancedSettings2.PersistCacheDirectory Write-only This property is not supported. Windows XP with SP1 and Windows XP: Specifies the path to the directory for storage of bitmap cache files.
    ;AdvancedSettings2.PinConnectionBar Read/write Specifies the state of the UI connection bar. Setting this property to VARIANT_TRUE sets the state to "lowered", that is, invisible to the user and unavailable for input. VARIANT_FALSE sets the state to "raised" and available for user input.
    ;AdvancedSettings2.RdpdrClipCleanTempDirString Read/write Windows XP with SP1 and Windows XP: Specifies the message to be displayed before exiting while the client control is deleting files in a temporary directory; for example, "Cleaning up temporary directory"
    ;AdvancedSettings2.RdpdrClipPasteInfoString Read/write Windows XP with SP1 and Windows XP: Specifies the message to be displayed while the client control processes clipboard information in preparation for pasting the data; for example, "Preparing to paste information".
    ;AdvancedSettings2.RdpdrLocalPrintingDocName Read/write Windows XP with SP1 and Windows XP: Specifies the name to be used for printer documents that are redirected; for example, "Remote Desktop Redirected Printer Document".
    ;AdvancedSettings2.RDPPort Read/write Specifies the connection port. The default value is 3389.
    ;AdvancedSettings2.RedirectDrives Read/write Specifies if redirection of disk drives is allowed.
    ;AdvancedSettings2.RedirectPorts Read/write Specifies if redirection of local ports (for example, COM and LPT) is allowed.
    ;AdvancedSettings2.RedirectPrinters Read/write Specifies if redirection of printers is allowed.
    ;AdvancedSettings2.RedirectSmartCards Read/write Specifies if redirection of smart cards is allowed.
    ;AdvancedSettings2.SasSequence Read/write Specifies the secure access sequence the client will use to access the login screen on the server.
    ;AdvancedSettings2.ScaleBitmapCachesByBPP Read/write Windows XP with SP1 and Windows XP: Specifies if the size of bitmap caches should be scaled by bit depth (bits per pixel). The default value, enabled or nonzero, is recommended.
    ;AdvancedSettings2.ShadowBitmap Read/write Windows Vista, Windows Server 2003, and Windows XP: Specifies if shadow bitmaps should be used.
    ;AdvancedSettings2.shutdownTimeout Read/write Specifies the length of time, in seconds, to wait for the server to respond to a disconnection request. The default value of the property is 10. The maximum valid value of the property is 600, which represents 10 minutes. If the server does not reply within the specified time, the client control disconnects.
    ;AdvancedSettings2.singleConnectionTimeout Read/write Specifies the maximum length of time, in seconds, that the client control waits for a connection to an IP address. During connection the control may attempt to connect to multiple IP addresses. The maximum valid value of this property is 600. A related property is overallConnectionTimeout.
    ;AdvancedSettings2.SmartSizing Read/write Specifies if the display should be scaled to fit the client area of the control. VARIANT_TRUE enables scaling. Note that scroll bars do not appear when the SmartSizing property is enabled.
    ;AdvancedSettings2.SmoothScroll Read/write Windows XP with SP1 and Windows XP: Specifies if the Remote Desktop window should scroll smoothly when scroll bars are used. The default is a nonzero value, which enables smooth scrolling and increases the scrolling response on slower computers. The property has no effect on scrolling in the actual remote session.
    ;AdvancedSettings2.TransportType Read/write Specifies the transport type used by the client. This property is not used by the Remote Desktop ActiveX control.
    ;AdvancedSettings2.WinCEFixedPalette Read/write Valid for Windows CE only.
    ;AdvancedSettings2.CanAutoReconnect Read-only Specifies whether the client control is able to reconnect automatically to the current session in the event of a network disconnection.
    ;AdvancedSettings2.EnableAutoReconnect Read/write Specifies whether to enable the client control to reconnect automatically to a session in the event of a network disconnection.
    ;AdvancedSettings2.MaxReconnectAttempts Read/write Specifies the number of times to try to reconnect during automatic reconnection. The valid values of this property are 0 to 200 inclusive.
    ;AdvancedSettings2.allowBackgroundInput Read/write Specifies whether background input mode is enabled.
    ;AdvancedSettings2.BitmapPeristence Read/write Specifies whether bitmap caching is enabled. Note The spelling error in the name of the property is in the released version of the control.
    ;AdvancedSettings2.Compress Read/write Specifies whether compression is enabled.
    ;AdvancedSettings2.ContainerHandledFullScreen Read/write Specifies whether the container-handled full-screen mode is enabled.
    ;AdvancedSettings2.DisableRdpdr Read/write Specifies whether printer and clipboard redirection is enabled.
    ;AdvancedSettings2.IconFile Write-only Specifies the name of the file containing icon data that will be accessed when displaying the client in full-screen mode.
    ;AdvancedSettings2.IconIndex Write-only Specifies the index of the icon within the current icon file.
    ;AdvancedSettings2.KeyBoardLayoutStr Write-only Specifies the name of the active input locale identifier (formerly called the keyboard layout) to use for the connection.
    ;AdvancedSettings2.PluginDlls Write-only Specifies the names of virtual channel client DLLs to be loaded.
    ;AdvancedSettings4.AuthenticationLevel Read/write Specifies the authentication level to use for the connection.;AdvancedSettings3.ConnectionBarShowMinimizeButton Read/write Specifies whether to display the Minimize button on the connection bar.
    ;AdvancedSettings3.ConnectionBarShowRestoreButton Read/write Specifies whether to display the Restore button on the connection bar.
    ;AdvancedSettings5.AudioRedirectionMode Read/write The audio redirection mode. The AudioRedirectionMode property has the following possible values.
    ; AUDIO_MODE_REDIRECT 0 (Audio redirection is enabled and the option for redirection is "Bring to this computer". This is the default mode.)
    ; AUDIO_MODE_PLAY_ON_SERVER 1 (Audio redirection is enabled and the option is "Leave at remote computer". The "Leave at remote computer" option is supported only when connecting remotely to a host computer that is running Windows Vista. If the connection is to a host computer that is running Windows Server 2008, the option "Leave at remote computer" is changed to "Do not play". )
    ; AUDIO_MODE_NONE 2 (Audio redirection is enabled and the mode is "Do not play".)
    ;AdvancedSettings5.BitmapVirtualCache32BppSize Read/write Specifies the virtual cache file size for 32 bits per pixel (bpp) bitmaps. The maximum value is 48 megabytes (MB).
    ;AdvancedSettings5.ConnectionBarShowPinButton Read/write Specifies whether the pin button should be shown on the connection bar. By default, the value is TRUE.
    ;AdvancedSettings5.PublicMode Read/write Specifies whether public mode should be enabled or disabled. By default, public mode is set to FALSE.
    ;AdvancedSettings5.RedirectClipboard Read/write Specifies whether clipboard redirection should be enabled or disabled. By default, clipboard redirection mode is set to TRUE (enabled).
    ;AdvancedSettings5.RedirectDevices Read/write Specifies whether redirected devices should be enabled or disabled. By default, redirected devices mode is set to FALSE.
    ;AdvancedSettings5.RedirectPOSDevices Read/write Specifies whether Point of Service redirected devices should be enabled or disabled. By default, Point of Service redirected devices mode is set to FALSE.
    ;AdvancedSettings6.AuthenticationServiceClass Read/write Specifies the service principal name (SPN) to use for authentication to the server.
    ;AdvancedSettings6.AuthenticationType Read-only Specifies the type of authentication used for this connection.
    ;AdvancedSettings6.ConnectToAdministerServer Read/write Retrieves or specifies whether the ActiveX control should attempt to connect to the server for administrative purposes.
    ;AdvancedSettings6.EnableCredSspSupport Read/write Specifies whether the Credential Security Service Provider (CredSSP) is enabled for this connection.
    ;AdvancedSettings6.HotKeyFocusReleaseLeft Read/write Specifies the virtual-key code to add to CTRL+ALT to determine the hotkey replacement for CTRL+ALT+LEFT ARROW.
    ;AdvancedSettings6.HotKeyFocusReleaseRight Read/write Specifies the virtual-key code to add to CTRL+ALT to determine the hotkey replacement for CTRL+ALT+RIGHT ARROW.
    ;AdvancedSettings6.PCB Read/write Specifies the preconnection BLOB (PCB) setting to use prior to connecting for transmission to the server.
    ;AdvancedSettings6.RelativeMouseMode Read/write Specifies whether the mouse should use relative mode.
    ;AdvancedSettings7.AudioCaptureRedirectionMode Read/write Specifies or retrieves a value that indicates whether the default audio input device is redirected from the client to the remote session.
    ;AdvancedSettings7.AudioQualityMode Read/write Specifies or retrieves a value that indicates the audio quality mode setting for redirected audio.
    ;AdvancedSettings7.EnableSuperPan Read/write Specifies or retrieves a value that indicates whether SuperPan is enabled or disabled.
    ;AdvancedSettings7.NetworkConnectionType Read/write Specifies or retrieves a value that indicates the network connection type.
    ;AdvancedSettings7.RedirectDirectX Read/write This property is not used.
    ;AdvancedSettings7.SuperPanAccelerationFactor Read/write Specifies or retrieves a value that indicates the SuperPan acceleration factor.
    ;AdvancedSettings7.VideoPlaybackMode Read/write Specifies or retrieves a value that indicates the video playback mode.

    [/autoit]

    Ich hoffe ich habe mich verständlich ausdrücken - Danke schon mal im voraus.

    mfg
    ugt100

  • Frage zur Verwendung von _FileDeleteAfterXDays

    • ugt100
    • 22. August 2014 um 13:09

    Supi genau das wars ....

    DANKE Ahnungslos

    :rock::rock::rock:


    (so einfach .... hm hmm)

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™