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. funkey

Beiträge von funkey

  • Desktop Radio 3.9

    • funkey
    • 22. Dezember 2008 um 15:07

    Jam00 :

    [autoit]

    $URL ="http://www.criterionmud.net/sounds/Beethoven's%205th%20Symphony.mid"
    $oWMP = _wmpcreate(0, 5, 5)
    _wmploadmedia($oWMP, $URL)

    [/autoit]
  • MP3 rein, Netzwerk aus, hat jemand eine Ahnung? (Titel editiert)

    • funkey
    • 22. Dezember 2008 um 14:26

    Hab mal ein paar Skripte kombiniert und das ist dabei herausgekommen:

    Quellen: Desktopsperre - USB-Stick zum ent-/sperren des Desktop
    NetworkConnection ---> http://www.autoitscript.com/forum/index.php?showtopic=71925&view=findpost&p=525659


    Spoiler anzeigen
    [autoit]

    ;~ _RegID()
    ;~ Exit

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

    Global Const $WM_DEVICECHANGE = 0x0219
    Global $USB_ID = 'USB\Vid_0d7d&Pid_1400\07450E6000DD' ;hier die ID eintragen, die RegID ausgibt!

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

    GUICreate("USB-Netzwerk-Deaktivierer")
    GUIRegisterMsg($WM_DEVICECHANGE, 'MY_WM_DEVICECHANGE')

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

    HotKeySet('!q', '_Ende')

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

    While 1
    Sleep(500)
    WEnd

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

    Func MY_WM_DEVICECHANGE($hWnd, $Msg, $wParam, $lParam)
    If _USB_mounted($USB_ID) Then
    _LAN_Connection(0)
    Else
    _LAN_Connection(1)
    EndIf
    EndFunc ;==>MY_WM_DEVICECHANGE

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

    Func _USB_mounted($Serial)
    For $count = 0 To RegRead('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbstor\Enum', 'count') -1
    If $Serial = RegRead('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbstor\Enum', $count) Then Return 1
    Next
    Return 0
    EndFunc ;==>_USB_mounted

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

    ; From: http://www.autoitscript.com/forum/index.ph…ndpost&p=525659
    ; Modifiziert: funkey
    Func _LAN_Connection($Toggle, $sConnectionName = "LAN-Verbindung", $sNetworkFolder = "Netzwerkverbindungen")
    $ssfCONTROLS = 3
    $sEnableVerb = "&Aktivieren"
    $sDisableVerb = "&Deaktivieren"
    $shellApp = ObjCreate("shell.application")
    $oControlPanel = $shellApp.Namespace($ssfCONTROLS)
    $oNetConnections = "nothing"

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

    For $folderitem In $oControlPanel.items
    If $folderitem.name = $sNetworkFolder Then
    $oNetConnections = $folderitem.getfolder
    ExitLoop
    EndIf
    Next
    If $oNetConnections = "nothing" Then
    ;~ MsgBox(48, "Error", "Couldn't find " & $sNetworkFolder & " folder")
    Return SetError(1, 0, 0)
    EndIf

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

    $oLanConnection = "nothing"
    For $folderitem In $oNetConnections.items
    If StringLower($folderitem.name) = StringLower($sConnectionName) Then
    $oLanConnection = $folderitem
    ExitLoop
    EndIf
    Next
    If $oLanConnection = "nothing" Then
    ;~ MsgBox(48, "Error", "Couldn't find '" & $sConnectionName & "' item")
    Return SetError(2, 0, 0)
    EndIf

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

    $bEnabled = True
    $oEnableVerb = "nothing"
    $oDisableVerb = "nothing"
    $s = "Verbs: " & @CRLF
    For $verb In $oLanConnection.verbs
    $s = $s & @CRLF & $verb.name

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

    ;enables
    If $verb.name = $sEnableVerb And $Toggle = 1 Then
    $oEnableVerb = $verb
    $oEnableVerb.DoIt
    ExitLoop

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

    ;disables
    ElseIf $verb.name = $sDisableVerb And $Toggle = 0 Then
    $oDisableVerb = $verb
    $oDisableVerb.DoIt
    ExitLoop
    Else
    ;~ MsgBox(48, "Error", "Tried to disable when already disabled" & @CRLF & "or enable when already enabled")
    Return SetError(3, 0, 0)
    EndIf
    Next
    Sleep(1000)
    EndFunc ;==>_LAN_Connection

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

    Func _RegID()
    MsgBox(0, "", 'Falls der USB-Stick momentan eingesteckt ist,' & @CRLF & 'bitte entfernen und dann auf [Ok] klicken!')
    $count = RegRead('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbstor\Enum', 'count')
    MsgBox(0, "", 'Bitte jetzt den USB-Stick einstecken!' & @CRLF & 'Er wird automatisch erkannt.', 5)
    While RegRead('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbstor\Enum', 'count') = $count
    Sleep(100)
    WEnd
    $count = RegRead('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbstor\Enum', 'count')
    $sID = RegRead('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbstor\Enum', $count - 1)
    ConsoleWrite(@CRLF & $sID & @CRLF)
    MsgBox(0, "", 'Dieser USB-Stick ist nun zum ent-/sperren des Desktop registriert!', 5)
    EndFunc ;==>_RegID

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

    Func _Ende()
    Exit
    EndFunc ;==>_Ende

    [/autoit]

    Edit: Registry-Schlüssel von ControlSet001 auf CurrentControlSet geändert.

  • Seriennr. & Bezeichnung des USB-Stick auslesen

    • funkey
    • 22. Dezember 2008 um 12:47

    Schau dir folgende Befehle an:

    [autoit]

    DriveGetLabel
    DriveGetSerial

    [/autoit]
  • "Spezial Effekt" will nicht richtig funtzen

    • funkey
    • 20. Dezember 2008 um 10:24

    @ r1fLeX: Ich wollte dir anfangs gar nicht helfen. Dann habe ich gesehen, dass dir auch kein anderer helfen wollte, also habe ich mich kurzerhand entschieden, es doch zu tun.
    Diesen Fehler werde ich nicht noch einmal machen! Mehr werde ich dazu nicht sagen.

  • "Spezial Effekt" will nicht richtig funtzen

    • funkey
    • 19. Dezember 2008 um 20:22

    In meiner Version nicht mehr ;)

  • Maus bewegen

    • funkey
    • 19. Dezember 2008 um 19:59
    [autoit]

    $PixelSearch[1] + 100

    [/autoit]
  • Kleines Spiel : SNAKE

    • funkey
    • 19. Dezember 2008 um 19:40

    Toll gemacht eukalyptus!! :thumbup:
    Leider habe ich es jetzt schon durchgespielt. Wo kann ich denn da die Geschwindigkeit hochdrehen? :D
    Hab die $iDirectionOld-werte auf 10 erhöht, da geht die Post ab, nur leider zeichnet er dann nicht mehr richtig.

  • "Spezial Effekt" will nicht richtig funtzen

    • funkey
    • 19. Dezember 2008 um 19:06

    In Zeile 38 schaltest du die Gui auf sichtbar und in Zeile 56 beginnst du mit Sichtbarkeit 0 bis 260. Also mir ist klar wieso es so komisch geht :P

    Hilfe für einen der keine Autoit-Projekte mehr macht
    [autoit]

    #NoTrayIcon
    #region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_icon=globe.ico
    #endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include <GUIConstants.au3>
    #include <Array.au3>

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

    Global $progress2, $name2, $iMsgBoxAnswer, $speicher, $name
    InetGet("http://r1flex.kilu.de/Ini's/your.ini", @TempDir & "\your.ini")
    InetGet("http://r1flex.kilu.de/Ini's/FTP-Checker2.ini", @TempDir & "\FTP-Checker2.ini")
    InetGet("http://r1flex.kilu.de/Ini's/FTP.ini", @TempDir & "\FTP.ini")
    If IniRead(@TempDir & "\FTP-Checker.ini", "Version", "Aktuell", "0") <> IniRead(@TempDir & "\FTP-Checker2.ini", "Version", "Aktuell", "0") Then
    $iMsgBoxAnswer = MsgBox(68, "Version", "Es ist eine neuere Version online!" & @CRLF & "Möchtest du diese jetzt herunterladen und die alte Version überschreiben?")
    EndIf
    If $iMsgBoxAnswer = 6 Then
    InetGet("http://r1flex.kilu.de/Meine Tools/FTP-Checker.exe", @ScriptDir & "\FTP-Checker.exe",1,1)
    Exit
    Else
    EndIf
    InetGet("http://r1flex.kilu.de/Ini's/pfade.ini", @TempDir & "\Pfade.ini")
    WinSetTrans ("r1fleX's FTP Checker","",0)

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

    #region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("r1fLeX's FTP Checker", 415, 225, @DesktopWidth / 2 - 200, @DesktopHeight / 2 - 100)
    GUISetBkColor(0x808080)
    $input1 = GUICtrlCreateInput("", 5, 202, 350, 20)
    $pfad = GUICtrlCreateButton("Pfad", 355, 202, 60, 20)
    $Group1 = GUICtrlCreateGroup("Download", 0, 0, 205, 199)
    $Label1 = GUICtrlCreateLabel("Wähle eine Datei aus!", 42, 18, 109, 17)
    $Button1 = GUICtrlCreateButton("Download", 55, 164, 97, 27, 0)
    GUICtrlSetState($Button1, $GUI_DISABLE)
    $Group2 = GUICtrlCreateGroup("Verzeichnis", 208, 0, 205, 199)
    $Label2 = GUICtrlCreateLabel("Wähle ein Serververzeichnis!", 275, 10, 96, 25)
    $List2 = GUICtrlCreateList("", 210, 36, 199, 123)
    $List1 = GUICtrlCreateList("", 3, 36, 199, 123)
    $Button2 = GUICtrlCreateButton("Wechseln", 264, 164, 97, 27, 0)
    GUICtrlCreateGroup("", -99, -99, 1, 1)

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

    #endregion ### START Koda GUI section ### Form=
    If FileExists (@TempDir & "\pfad.ini") Then
    GUICtrlSetData ($input1, IniRead ( @TempDir & "\pfad.ini","Einstellungen","Pfad"," Bitte wählen einen Speicherort --->"))
    EndIf
    Func OnAutoItExit()
    FileDelete(@TempDir & "\FTP-Checker2.ini")
    FileDelete(@TempDir & "\Pfade.ini")
    EndFunc ;==>OnAutoItExit

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

    $var2 = IniReadSection(@TempDir & "\Pfade.ini", "Pfade")
    If Not @error Then
    For $i = 1 To $var2[0][0]
    GUICtrlSetData($List2, $var2[$i][1])
    Next
    Else
    MsgBox(0, "Error", "Eine wichtige Datei konnte nicht eingelesen werden!")
    EndIf

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

    GUI_SHOW()

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

    While 1
    If @InetGetActive = 1 Then
    $internet = @InetGetBytesRead
    $rechnung = @InetGetBytesRead / $progress2 * 100
    ToolTip(Round(@InetGetBytesRead / 1024 / 1024, 1) & "MB" & "/" & Round($progress2 / 1024 / 1024, 1) & "MB" & " (" & Round($rechnung, 0) & "%)", @DesktopWidth / 2 - 90, 0, $name)
    Else
    ToolTip("")
    EndIf
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $pfad
    $speicherpfad = FileSelectFolder("Pfad wählen", "::{00020D75-0000-0000-C000-000000000046}")
    GUICtrlSetData($input1, $speicherpfad)
    Case $Button1
    If GUICtrlRead($input1) = "" Then
    MsgBox(48, "Achtung", "Bitte wähle einen Speicherort")
    Else
    If @InetGetActive = 1 Then
    TrayTip ( "Abwarten und Tee trinken...","Es ist immer nur ein Download zur gleichen Zeit erlaubt!", 10)
    Else
    $speicherpfad = GUICtrlRead ($input1)
    IniWrite ( @TempDir & "\pfad.ini","Einstellungen","Pfad",$speicherpfad)
    $name2 = GUICtrlRead($List2)
    $name = GUICtrlRead($List1)
    $progress2 = InetGetSize("http://r1flex.kilu.de/" & $name2 & "/" & $name)
    InetGet("http://r1flex.kilu.de/" & $name2 & "/" & $name, $speicherpfad & "\" & $name, 0, 1)
    EndIf
    EndIf
    Case $Button2
    GUICtrlSetData($List1, "")
    $wechseln = GUICtrlRead($List2)
    InetGet("http://r1flex.kilu.de/Ini's/FTP.ini", @TempDir & "\FTP.ini")
    $iniread = IniReadSection(@TempDir & "\FTP.ini", $wechseln)
    If Not @error Then
    GUICtrlSetState($Button1, $GUI_ENABLE)
    For $i = 1 To $iniread[0][0]
    GUICtrlSetData($List1, $iniread[$i][1])
    If Not @error Then
    GUICtrlSetState($Button1, $GUI_ENABLE)
    For $i = 1 To $iniread[0][0]
    GUICtrlSetData($List1, $iniread[$i][1])
    Next
    Else
    GUICtrlSetState($Button1, $GUI_DISABLE)
    MsgBox(48, "Achtung", "Bitte wähle einen Ort aus!")
    EndIf
    Next
    Else
    GUICtrlSetState($Button1, $GUI_DISABLE)
    MsgBox(48, "Achtung", "Bitte wähle einen Ort aus!")
    EndIf
    EndSwitch
    WEnd

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

    Func GUI_SHOW()
    GUISetState(@SW_HIDE, $Form1)
    WinSetTrans($Form1, "", 0)
    GUISetState(@SW_SHOW, $Form1)
    For $i = 5 To 255 Step 5
    WinSetTrans($Form1, "", $i)
    Next
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit]
  • Multi Core CPU Auslast

    • funkey
    • 19. Dezember 2008 um 17:18

    Funktioniert das bei dir? Kann's nicht wirklich testen, da ich nur einen Kern habe.

    [autoit]

    $Dll = DllOpen('CPUusage.dll')
    $Cores = DllCall($Dll, 'float', 'hobbl_com_init')
    MsgBox(0,"Prozessoren",$Cores[0])
    DllClose($Dll)

    [/autoit]
    Spoiler anzeigen
    Code
    #define CPU_Init
    /*
        Hobbel CPU Usage DLL
        More info: http://gm.hobbl.com/dll.php?name=cpuusage
    
        This function initializes the DLL and returns the number of processors.
    */
    
    
        global.external_cpu_init = external_define ('CPUusage.dll','hobbl_com_init',dll_stdcall,ty_real,0);
        global.external_cpu_getusage = external_define ('CPUusage.dll','hobbl_com_getusage',dll_stdcall,ty_real,1,ty_real);
    
        return external_call (global.external_cpu_init);
    #define CPU_GetUsage
    /*
        This function returns the usage of a processor in percents (%).
    
        0 identifies the first processor, 1 the second and go on ...
    */
        return external_call (global.external_cpu_getusage,argument0);
    Alles anzeigen

    CPU-Auslastung hab ich noch nicht geschafft.

  • Thats me

    • funkey
    • 19. Dezember 2008 um 08:25

    Auch von mir noch ein herzliches Willkommen hier im Forum!
    Hoffentlich können wir all deine Probleme lösen!

  • elemente ausm quelltext rausfischen

    • funkey
    • 19. Dezember 2008 um 07:49

    Ich gehe davon aus, dass du den IE benutzt!
    Folgendes Skript kann z.B. bei Autoit.de die Uhrzeit rechts oben aus dem Quelltext auslesen.

    Spoiler anzeigen
    [autoit]

    #include <File.au3>
    #include <IE.au3>
    #Include <String.au3>

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

    Opt("WinTitleMatchMode",2)
    Opt("TrayIconDebug", 1)

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

    Local $Begriff1 = '<span>'
    Local $Begriff2 = '</span>'
    Local $Dateiname = @ScriptDir & '\IE.log'

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

    $Start = TimerInit()
    Local $handle = WinGetHandle("Internet Explorer")
    Local $oIE = _IEAttach ($handle, "hwnd")
    Local $adresse = _IEPropertyGet ($oIE, "locationurl")
    Local $quellcode = _IEBodyReadHTML($oIE)

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

    $Suchergebnis = _StringBetween($quellcode, $Begriff1, $Begriff2)
    If @error Then
    MsgBox(16, "Fehler", "Begriffe nicht gefunden!")
    Else
    _FileWriteLog($Dateiname, StringFormat('%.2f', TimerDiff($Start))&' msec : '&$Suchergebnis[0])
    MsgBox(64, "Ergebnis", $Suchergebnis[0])
    EndIf

    [/autoit]
  • XML Dateien nutzen / lesen

    • funkey
    • 18. Dezember 2008 um 17:01

    Am einfachsten so:

    Spoiler anzeigen
    [autoit]

    #include <Array.au3>
    #include <File.au3>

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

    Local $array
    _FileReadToArray('Test.xml', $array)
    $aDisplayName = _getAllXML($array, 'DisplayName')
    $aDisplayVersion = _getAllXML($array, 'DisplayVersion')
    If UBound($aDisplayName) <> UBound($aDisplayVersion) Then
    MsgBox(16,"Fehler","Nicht gleich viele Attribute pro Programm gefunden!")
    Exit
    EndIf

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

    Local $aInfos[UBound($aDisplayName)][2]

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

    For $i=0 To UBound($aInfos,1) -1
    $aInfos[$i][0] = $aDisplayName[$i]
    $aInfos[$i][1] = $aDisplayVersion[$i]
    Next

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

    _ArrayDisplay($aInfos)

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

    Func _getAllXML($array, $Name)
    $Index = _ArrayFindAll($array, '<' & $Name & '>',0,0,0,1)
    If @error Then Return 0
    For $i = 0 To UBound($Index) -1
    $Index[$i] = StringRegExpReplace($array[$Index[$i]], "(<.+?>)", "")
    Next
    Return $Index
    EndFunc ;==>_getAllXML

    [/autoit]
  • Citrix-Session öffnen und IE starten

    • funkey
    • 18. Dezember 2008 um 16:41

    Aha, Citrix ist sowas wie Remote-Desktop, oder?
    Da funktioniert das auch nicht immer so mit der Mause. _MouseTrap funktioniert z.B. überhaupt nicht.

    Und der IE soll auf dem Remote-Rechner gestartet werden? Dann geht das so sowieso nicht. Da brauchst du ein Autoit-Skript direkt auf dem Citrix-Rechner.

  • Citrix-Session öffnen und IE starten

    • funkey
    • 18. Dezember 2008 um 16:13

    Hab dein Skript mal gekürzt. Sollte genauso funktionieren. Die erste 2 WinWait werden wahrscheinlich doch auch nicht benötigt, oder?
    Ein MouseClick funktioniert immer auf das Fenster, dass gerade oben ist. Entweder du nimmst ControlClick oder je nachdem wo du da draufklickst vllt sogar Run.

    Spoiler anzeigen
    [autoit]

    #include <IE.au3>

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

    MouseClick ("left", 45, 400, 2) ;Worauf wird geklickt?? Geht das vllt mit Run('Befehl.exe')

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

    WinWait ("Verbindungsaufbau")
    WinWait ("CC-Desktop")
    WinWait ("Anmeldeskript")
    WinWaitClose ("Anmeldeskript")

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

    Sleep (1000)
    $oIE = _IECreate ("http://mitarbeiterportal-np.intranet.kkh.de/",1,1,1)
    $oHWND = _IEPropertyGet($oIE, "hwnd") ;wichtig ;)
    WinSetState ($oHWND, "", @SW_MAXIMIZE )

    [/autoit]
  • Einem Bild Dateiinformationen hinzufügen

    • funkey
    • 18. Dezember 2008 um 15:45

    Schreiben und lesen ist bei Datei-Zusatzinformationen leider was vollkommen anderes. Habe nichts gefunden, womit das Schreiben solcher Infos zu bewerkstelligen ist.
    Aber vllt werde ich ja hier eines besseren belehrt.

  • _GUICtrlListView_FindItem Problem

    • funkey
    • 18. Dezember 2008 um 14:22

    Du brauchst vllt _GUICtrlListView_FindInText und _GUICtrlListView_SetItemSelected.
    Oder was meinst du?

  • XML Dateien nutzen / lesen

    • funkey
    • 18. Dezember 2008 um 13:56

    Folgendes Skript listet alle Einträge von <DisplayName>

    Spoiler anzeigen
    [autoit]

    #include <Array.au3>
    #include <File.au3>

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

    Local $array
    _FileReadToArray('Test.xml', $array)
    $aResult = _getAllXML($array, 'DisplayName')
    _ArrayDisplay($aResult)

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

    Func _getAllXML($array, $Name)
    $Index = _ArrayFindAll($array, '<' & $Name & '>',0,0,0,1)
    If @error Then Return 0
    For $i = 0 To UBound($Index) -1
    $Index[$i] = StringRegExpReplace($array[$Index[$i]], "(<.+?>)", "")
    Next
    Return $Index
    EndFunc ;==>_getAllXML

    [/autoit]

    Edit: Überflüssige Variable entfernt

  • Übelste Langeweile

    • funkey
    • 18. Dezember 2008 um 13:14

    Hört sich nicht sehr nach 'Alle meine Entchen' an! ;) Bist du sicher, dass du musikalisch bist? :P

  • Windows XP Firewall

    • funkey
    • 18. Dezember 2008 um 12:44

    Diese Zeile auf jedem Client laufen lassen

    Code
    netsh firewall set service REMOTEADMIN ENABLE SUBNET

    Danach kannst du mit diesem Skript bei jedem Client die Firewall ein und ausschalten.

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #NoTrayIcon

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

    ;$vTarget is who we are getting so lets declare him as ourselfs for presentation sake
    $vTarget = "Working As "&@IPAddress1

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

    ;The GUI is created here.
    GUICreate("DFW-IR - " &$vTarget, 300, 140)

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

    ; Show the GUI
    GUISetState()

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

    ;INPUTBOXES of IP Address for the Target and action button along with a status label
    $Target = GuiCtrlCreateInput(@IPAddress1, 5, 20, 0, 0)
    $button_1 = GUICtrlCreateButton("Execute", "5", "60", "80", "20", $BS_DEFPUSHBUTTON)
    $Status = GUICtrlCreateLabel ("Ready", "90", "60", "100", "25")

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

    ;Enable and Disable options options for the firewall
    $Radio1 = GUICtrlCreateRadio ("Disable", 205, 50, 120, 20)
    $Radio2 = GUICtrlCreateRadio ("Enable", 205, 70, 120, 20)
    GUICtrlSetState($Radio1,$GUI_CHECKED)
    GUICtrlSetState($Target,$GUI_FOCUS)

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

    ;Creating ProgressBar
    $ProgressBar = GUICtrlCreateProgress("5","100","180","0")

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

    ;This script is to bring down the RI Firewall on the Windows XP Images
    Dim $aReg[6]

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

    ;Now the arrays are created
    $aReg[0] = "\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile /v EnableFirewall /t reg_dword "
    $aReg[1] = "\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile /v EnableFirewall /t reg_dword "
    $aReg[2] = "/d 00000000 /F"
    $aReg[3] = "/d 00000001 /F"
    $aReg[4] = "on"
    $aReg[5] = "off"

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

    ;While 1 keeps the application from stoping
    While 1
    $msg = GUIGetMsg()
    $i = 0 ;$i is defined as 0 so the while loop that is later called, for DFW-IR, can be broken
    GUICtrlSetData($ProgressBar,0) ;Setting the progressbar to 0

    Select
    Case $msg = $GUI_EVENT_CLOSE
    Exit
    Case $msg = $GUI_EVENT_MINIMIZE

    Case $msg = $GUI_EVENT_MAXIMIZE

    Case $msg = $button_1
    $i = $i + 1
    While $i = 1

    ;Here is we get the state of the radio buttons
    If GUICtrlRead($Radio1) = $GUI_CHECKED Then $x = $aReg[2]
    If GUICtrlRead($Radio2) = $GUI_CHECKED Then $x = $aReg[3]
    If GUICtrlRead($Radio1) = $GUI_CHECKED Then $q = $aReg[5]
    If GUICtrlRead($Radio2) = $GUI_CHECKED Then $q = $aReg[4]

    ;Now the games begin
    $vTarget = GUICtrlRead($Target)
    GUICtrlSetData($ProgressBar,18)
    GUICtrlSetData($Status, "Enabling Remote Registry")
    RunWait(@ComSpec & " /c sc \\" & $vTarget&" config RemoteRegistry start= auto", "C:\", @SW_HIDE)
    GUICtrlSetData($ProgressBar,38)
    GUICtrlSetData($Status, "Starting Remote Registry")
    RunWait(@ComSpec & " /c sc \\" & $vTarget&" start RemoteRegistry", "C:\", @SW_HIDE)
    GUICtrlSetData($ProgressBar,42)
    GUICtrlSetData($Status, "Turning "& $q&" firewall for the user")
    RunWait(@ComSpec & " /c reg add \\" & $vTarget&$aReg[0]&$x, "C:\", @SW_HIDE)
    GUICtrlSetData($ProgressBar,64)
    GUICtrlSetData($Status, "Turning "& $q&" firewall for the computer")
    RunWait(@ComSpec & " /c reg add \\" & $vTarget&$aReg[1]&$x, "C:\", @SW_HIDE)
    GUICtrlSetData($ProgressBar,79)
    GUICtrlSetData($Status, "Stoping Remote Registry")
    RunWait(@ComSpec & " /c sc \\" & $vTarget&" start RemoteRegistry", "C:\", @SW_HIDE)
    GUICtrlSetData($ProgressBar,95)
    GUICtrlSetData($Status, "Disabling Remote Registry")
    RunWait(@ComSpec & " /c sc \\" & $vTarget&" config RemoteRegistry start= auto", "C:\", @SW_HIDE)
    GUICtrlSetData($ProgressBar,100)
    GUICtrlSetData($Status, "Process Complete on "&$vTarget)
    $i = $i + 1
    WEnd

    EndSelect
    WEnd

    [/autoit]


    Quelle: http://www.autoitscript.com/forum/index.php?showtopic=42707

  • W-LAN Einstellungen importieren

    • funkey
    • 18. Dezember 2008 um 11:33

    Nichts zu danken, hab ja gesagt, dass mir das Tool gefällt. Überhaupt, weil ich gerade mit WLAN am basteln bin

    Das Thema, wenn du keine fragen mehr hast, am besten auf gelöst stellen ---> ersten Beitrag editieren und umstellen!

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™