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

  • checken ob windows vista computer im netzwerk läuft?

    • funkey
    • 28. Oktober 2008 um 23:26

    Ich denke du wirst beim Rechner deiner Mitbewohnerin doch etwas umstellen müssen, damit der Ping funktioniert. Sollte eigentlich kein Problem sein. Hier eine Anleitung:
    http://www.win-tipps-tweaks.de/cms/vista-tipp…m-netzwerk.html

  • MultiColor

    • funkey
    • 28. Oktober 2008 um 22:51

    Bei mir gibt's das Problem auch, nach einigen Minuten ändern sich die Farben nicht mehr richtig. Außerdem wurde mein PC ziemlich langsam, sodass ich das Skript beenden musste, da ich befürchtete, dass bald ein Bluescreen kommt. :rolleyes:

  • gui hintergrund halbwegs transparent

    • funkey
    • 28. Oktober 2008 um 19:20

    WinSetTrans

  • Name convert für Windows Server 2003

    • funkey
    • 28. Oktober 2008 um 08:19
    [autoit]

    $Voller_Name = "Jörg Müller"
    $Name_conv = StringLower(StringReplace(StringReplace(StringReplace($Voller_Name,"ü","ue"),"ö","oe"),"ä","ae"))
    $Name_split = StringSplit($Name_conv, " ")
    $Name = StringLeft($Name_split[1], 1) & "." & $Name_split[2]

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

    MsgBox(0,"Benutzername",$Name)

    [/autoit]
  • funktion durch drücken einer beliebigen taste/mausaktion aufrufen?

    • funkey
    • 28. Oktober 2008 um 01:10

    Da gibt's ja die super Funktion AdLibEnable, hatte ich ja ganz vergessen, damit kann das Programm normal ablaufen und zyklisch überprüft werden, ob ein Key gedrückt wurde.

    [autoit]

    #include <misc.au3>
    Global $dll = DllOpen("user32.dll")

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

    AdlibEnable("_IsAnyKeyPressed",100)

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

    $j = 99
    While 1
    ToolTip("In "&$j&" Sekunden ist das Skript aus!")
    Sleep(1000)
    $j -= 1
    ;Also alles hier rein was noch zu erledigen ist!
    WEnd

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

    AdlibDisable()
    DllClose($dll)

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

    Func _IsAnyKeyPressed()
    For $i = 0 to 255
    if (_IsPressed(Hex($i), $dll)) Then Do_something()
    Next
    EndFunc

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

    Func Do_something()
    MsgBox(0,"","Irgendetwas wurde gedrückt, sonst wäre dieses Fenster nicht zu sehen!")
    EndFunc

    [/autoit]
  • funktion durch drücken einer beliebigen taste/mausaktion aufrufen?

    • funkey
    • 28. Oktober 2008 um 00:33

    Aha, jetzt hab ich dich verstanden. Mein Beispiel führt das Skript aus, dann wartet es auf eine Eingabe, dann macht es weiter.

    Noch ein Beispiel:

    [autoit]

    #include <misc.au3>
    $dll = DllOpen("user32.dll")

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

    For $i = 5 To 1 Step -1
    ToolTip("In "&$i&" Sekunden geht's weiter")
    Sleep(1000)
    Next
    ToolTip("Ich, das Skript, warte bis du irgendetwas drückst, bevor ich weitermache")

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

    While 1
    Local $val
    $val = _IsAnyKeyPressed()
    if ( $val > -1 ) Then
    Do_something()
    EndIf
    WEnd

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

    Func Do_something()
    ToolTip("So hier geht das Skript weiter!")
    MsgBox(0,"","Irgendetwas wurde gedrückt, sonst wäre dieses Fenster nicht zu sehen!")
    ;Also alles hier rein was noch zu erledigen ist!
    Exit
    EndFunc

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

    Func _IsAnyKeyPressed($start = 0, $end = 255)
    For $i = $start to $end
    if (_IsPressed(Hex($i), $dll)) Then return $i
    Next
    return -1
    EndFunc

    [/autoit]


    Du musst aber etwas mit Hotkeyset basteln und zyklisch die Mausposition abfragen. Das ist jetzt ein klein wenig schwieriger, aber auch zu schaffen. Ich habe jetzt leider keine Zeit, dir ein solches Beispiel zu basteln, vllt später oder jemand anderes!?

    mfg funkey

  • funktion durch drücken einer beliebigen taste/mausaktion aufrufen?

    • funkey
    • 28. Oktober 2008 um 00:08

    Wo ist da das Problem?

    [autoit]

    #include <misc.au3>
    $dll = DllOpen("user32.dll")
    Sleep(1000)

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

    Func _IsAnyKeyPressed($start = 0, $end = 255)
    For $i = $start to $end
    if (_IsPressed(Hex($i), $dll)) Then return $i
    Next
    return -1
    EndFunc

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

    while(true)
    Local $val
    $val = _IsAnyKeyPressed()
    if ( $val > -1 ) Then
    Do_something()
    EndIf
    WEnd

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

    Func Do_something()
    MsgBox(0,"","Irgendetwas wurde gedrückt, sonst wäre dieses Fenster nicht zu sehen!")
    ;Installiere 20 Programme
    Exit
    EndFunc

    [/autoit]
  • funktion durch drücken einer beliebigen taste/mausaktion aufrufen?

    • funkey
    • 27. Oktober 2008 um 23:38

    Aus dem englischen Forum:

    [autoit]

    #include <misc.au3>
    $dll = DllOpen("user32.dll")

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

    Func _IsAnyKeyPressed($start = 0, $end = 255)
    For $i = $start to $end
    if (_IsPressed(Hex($i), $dll)) Then return $i
    Next
    return -1
    EndFunc

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

    while(true)
    Local $val
    $val = _IsAnyKeyPressed()
    if ( $val > -1 ) Then
    MsgBox(0, "", "You press the " & Chr($val) & " key.")
    EndIf
    WEnd

    [/autoit]
  • Browser-Interaktion (Adresszeile auslesen)

    • funkey
    • 27. Oktober 2008 um 17:25

    Keine Ahnung welche ControlID die Adresszeile des Firefox hat, aber dafür ist ja das Tool 'AutoIt Window Info' zustandig, das mit der Autoit-Installation mitgeliefert wird. Damit kannst du alles Wissenswerte über das gewünschte Fenster erfahren.

  • Browser-Interaktion (Adresszeile auslesen)

    • funkey
    • 27. Oktober 2008 um 17:11

    Nichts zu danken! Ich persönlich hätte es aber doch mit ControlGetText gelöst. Ist mir einfach sympathischer. 'Edit1' getestet auf IE 7.

    [autoit]

    Opt("WinTitleMatchMode",2)
    MsgBox(0,"Adresszeile", ControlGetText(WinGetTitle("Internet Explorer"),"","Edit1"))

    [/autoit]
  • Browser-Interaktion (Adresszeile auslesen)

    • funkey
    • 27. Oktober 2008 um 16:19

    Ich weiß jetzt nicht wieso es anders nicht geht, aber so geht es:

    [autoit]

    #include <IE.au3>
    Opt("WinTitleMatchMode",2)
    $fensterhandle = WinGetHandle(WinGetTitle("Internet Explorer"))
    $oIE = _IEAttach ($fensterhandle,"hwnd")
    $addr = _IEPropertyGet ($oIE, "LocationURL")
    Msgbox(0, "Adresszeile", $addr)

    [/autoit]
  • Browser-Interaktion (Adresszeile auslesen)

    • funkey
    • 27. Oktober 2008 um 16:00

    Lass dir mal $fenstername in einer MsgBox darstellen, vllt kannst du dann einen Fehler erkennen. Normalerweise sollte es so funktionieren. ?(

  • Problem bei WIN 2003 X64

    • funkey
    • 27. Oktober 2008 um 15:53

    Hm, probier mal das

    [autoit]

    Run(@SystemDir&"\mmc.exe "&@SystemDir&"\services.msc")

    [/autoit]
  • Platzhalter bei Fenstertitel?

    • funkey
    • 27. Oktober 2008 um 15:07

    Es gibt die Option WinTitleMatchMode. Schau sie dir in der Hilfe an.

    [autoit]

    Opt("WinTitleMatchMode",2)
    $Fenstertitel = "\jre\bin\"

    [/autoit]
  • Browser-Interaktion (Adresszeile auslesen)

    • funkey
    • 27. Oktober 2008 um 14:53

    Dafür gibt's _IEAttach

    [autoit]

    #include <IE.au3>
    $oIE = _IEAttach ($Fenstertitel)
    $addr = _IEPropertyGet ($oIE, "LocationURL")
    Msgbox(0, "", $addr)

    [/autoit]
  • Browser-Interaktion (Adresszeile auslesen)

    • funkey
    • 27. Oktober 2008 um 14:23

    Am besten schaust du dir den Befehl ControlGetText an.

    [autoit]

    ControlGetText($Fenstertitel,"","Edit1")

    [/autoit]
  • Process-CPU-Last in %

    • funkey
    • 27. Oktober 2008 um 08:19

    Im englischen Forum habe ich noch was gefunden: _ProcessListProperties

    Spoiler anzeigen
    [autoit]

    #include <array.au3> ; for _ArrayDisplay()

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

    $avRET = _ProcessListProperties()
    _ArrayDisplay($avRET, "Debug: $avProcs, @error = " & @error)

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

    ;===============================================================================
    ; Function Name: _ProcessListProperties()
    ; Description: Get various properties of a process, or all processes
    ; Call With: _ProcessListProperties( [$Process [, $sComputer]] )
    ; Parameter(s): (optional) $Process - PID or name of a process, default is all
    ; (optional) $sComputer - remote computer to get list from, default is local
    ; Requirement(s): AutoIt v3.2.4.9+
    ; Return Value(s): On Success - Returns a 2D array of processes, as in ProcessList()
    ; with additional columns added:
    ; [0][0] - Number of processes listed (can be 0 if no matches found)
    ; [1][0] - 1st process name
    ; [1][1] - 1st process PID
    ; [1][2] - 1st process Parent PID
    ; [1][3] - 1st process owner
    ; [1][4] - 1st process priority (0 = low, 31 = high)
    ; [1][5] - 1st process executable path
    ; [1][6] - 1st process CPU usage
    ; [1][7] - 1st process memory usage
    ; ...
    ; [n][0] thru [n][7] - last process properties
    ; On Failure: Returns array with [0][0] = 0 and sets @Error to non-zero (see code below)
    ; Author(s): PsaltyDS at http://www.autoitscript.com/forum
    ; Notes: If a numeric PID or string process name is provided and no match is found,
    ; then [0][0] = 0 and @error = 0 (not treated as an error, same as ProcessList)
    ; This function requires admin permissions to the target computer.
    ; All properties come from the Win32_Process class in WMI.
    ;===============================================================================
    Func _ProcessListProperties($Process = "", $sComputer = ".")
    Local $sUserName, $sMsg, $sUserDomain, $avProcs
    If $Process = "" Then
    $avProcs = ProcessList()
    Else
    $avProcs = ProcessList($Process)
    EndIf

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

    ; Return for no matches
    If $avProcs[0][0] = 0 Then Return $avProcs

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

    ; ReDim array for additional property columns
    ReDim $avProcs[$avProcs[0][0] + 1][8]

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

    ; Connect to WMI and get process objects
    $oWMI = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & $sComputer & "\root\cimv2")
    If IsObj($oWMI) Then
    ; Get collection of all processes from Win32_Process
    $colProcs = $oWMI.ExecQuery ("select * from win32_process")
    If IsObj($colProcs) Then
    ; For each process...
    For $oProc In $colProcs
    ; Find it in the array
    For $n = 1 To $avProcs[0][0]
    If $avProcs[$n][1] = $oProc.ProcessId Then

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

    ; [n][2] = Parent PID
    $avProcs[$n][2] = $oProc.ParentProcessId
    ; [n][3] = Owner
    If $oProc.GetOwner ($sUserName, $sUserDomain) = 0 Then $avProcs[$n][3] = $sUserDomain & "\" & $sUserName
    ; [n][4] = Priority
    $avProcs[$n][4] = $oProc.Priority
    ; [n][5] = Executable path
    $avProcs[$n][5] = $oProc.ExecutablePath

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

    ExitLoop
    EndIf
    Next
    Next
    Else
    SetError(2) ; Error getting process collection from WMI
    EndIf

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

    ; Get collection of all processes from Win32_PerfFormattedData_PerfProc_Process
    ; Have to use an SWbemRefresher to pull the collection, or all Perf data will be zeros
    Local $oRefresher = ObjCreate("WbemScripting.SWbemRefresher")
    $colProcs = $oRefresher.AddEnum ($oWMI, "Win32_PerfFormattedData_PerfProc_Process" ).objectSet
    $oRefresher.Refresh

    ; Time delay before calling refresher
    Local $iTime = TimerInit()
    Do
    Sleep(10)
    Until TimerDiff($iTime) > 100
    $oRefresher.Refresh

    ; Get PerfProc data
    For $oProc In $colProcs
    ; Find it in the array
    For $n = 1 To $avProcs[0][0]
    If $avProcs[$n][1] = $oProc.IDProcess Then
    $avProcs[$n][6] = $oProc.PercentProcessorTime
    $avProcs[$n][7] = $oProc.WorkingSet
    ExitLoop
    EndIf
    Next
    Next
    Else
    SetError(1) ; Error connecting to WMI
    EndIf

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

    ; Return array
    Return $avProcs
    EndFunc ;==>_ProcessListProperties

    [/autoit]
  • Process-CPU-Last in %

    • funkey
    • 27. Oktober 2008 um 08:04

    Die einfachste Lösung wird sein, wenn du den Taskmanager startest und dort die CPU-Auslastung ausliest. Am besten ist es, wenn du beim Taskmanager die Option 'Ausblenden, wenn minimiert' aktivierst.

    [autoit]

    If Not ProcessExists("taskmgr.exe") Then Run("taskmgr.exe","",@SW_MINIMIZE)
    WinSetState("Windows Task-Manager","",@SW_MINIMIZE)

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

    While 1
    $CPULoad = StringTrimLeft(StatusBarGetText("Windows Task-Manager","",2),16)
    msgbox(0,'CPU-Auslastung',$CPULoad)
    WEnd

    [/autoit]

    EDIt: Sorry, hab überlesen, dass du nur die Prozessorauslastung von einem Prozess willst.

  • Icons

    • funkey
    • 26. Oktober 2008 um 17:05

    Hab ne Freeware Icon-Sammlung von Andrew Watts von 1995 auf einer alten CD gefunden. Teilweise sind ganz nette Icons dabei. Es lohnt sich, das mal durchzuschauen.

  • Do-Until-Schleife: Durchlauf überspringen?

    • funkey
    • 25. Oktober 2008 um 21:52

    Hm,

    [autoit]

    $i = 0
    Do
    $i +=1
    If $i = 2 Then $i +=1
    MsgBox(0,"",$i)
    Until $i = 5

    [/autoit]

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™