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
Beiträge von funkey
-
-
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.

-
-
[autoit]
$Voller_Name = "Jörg Müller"
[/autoit][autoit][/autoit][autoit]
$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]MsgBox(0,"Benutzername",$Name)
[/autoit] -
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>
[/autoit][autoit][/autoit][autoit]
Global $dll = DllOpen("user32.dll")AdlibEnable("_IsAnyKeyPressed",100)
[/autoit][autoit][/autoit][autoit]$j = 99
[/autoit][autoit][/autoit][autoit]
While 1
ToolTip("In "&$j&" Sekunden ist das Skript aus!")
Sleep(1000)
$j -= 1
;Also alles hier rein was noch zu erledigen ist!
WEndAdlibDisable()
[/autoit][autoit][/autoit][autoit]
DllClose($dll)Func _IsAnyKeyPressed()
[/autoit][autoit][/autoit][autoit]
For $i = 0 to 255
if (_IsPressed(Hex($i), $dll)) Then Do_something()
Next
EndFuncFunc Do_something()
[/autoit]
MsgBox(0,"","Irgendetwas wurde gedrückt, sonst wäre dieses Fenster nicht zu sehen!")
EndFunc -
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>
[/autoit][autoit][/autoit][autoit]
$dll = DllOpen("user32.dll")For $i = 5 To 1 Step -1
[/autoit][autoit][/autoit][autoit]
ToolTip("In "&$i&" Sekunden geht's weiter")
Sleep(1000)
Next
ToolTip("Ich, das Skript, warte bis du irgendetwas drückst, bevor ich weitermache")While 1
[/autoit][autoit][/autoit][autoit]
Local $val
$val = _IsAnyKeyPressed()
if ( $val > -1 ) Then
Do_something()
EndIf
WEndFunc Do_something()
[/autoit][autoit][/autoit][autoit]
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
EndFuncFunc _IsAnyKeyPressed($start = 0, $end = 255)
[/autoit]
For $i = $start to $end
if (_IsPressed(Hex($i), $dll)) Then return $i
Next
return -1
EndFuncDu 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
-
Wo ist da das Problem?
[autoit]#include <misc.au3>
[/autoit][autoit][/autoit][autoit]
$dll = DllOpen("user32.dll")
Sleep(1000)Func _IsAnyKeyPressed($start = 0, $end = 255)
[/autoit][autoit][/autoit][autoit]
For $i = $start to $end
if (_IsPressed(Hex($i), $dll)) Then return $i
Next
return -1
EndFuncwhile(true)
[/autoit][autoit][/autoit][autoit][/autoit][autoit]
Local $val
$val = _IsAnyKeyPressed()
if ( $val > -1 ) Then
Do_something()
EndIf
WEndFunc Do_something()
[/autoit]
MsgBox(0,"","Irgendetwas wurde gedrückt, sonst wäre dieses Fenster nicht zu sehen!")
;Installiere 20 Programme
Exit
EndFunc -
Aus dem englischen Forum:
[autoit]#include <misc.au3>
[/autoit][autoit][/autoit][autoit]
$dll = DllOpen("user32.dll")Func _IsAnyKeyPressed($start = 0, $end = 255)
[/autoit][autoit][/autoit][autoit]
For $i = $start to $end
if (_IsPressed(Hex($i), $dll)) Then return $i
Next
return -1
EndFuncwhile(true)
[/autoit]
Local $val
$val = _IsAnyKeyPressed()
if ( $val > -1 ) Then
MsgBox(0, "", "You press the " & Chr($val) & " key.")
EndIf
WEnd -
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.
-
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)
[/autoit]
MsgBox(0,"Adresszeile", ControlGetText(WinGetTitle("Internet Explorer"),"","Edit1")) -
Ich weiß jetzt nicht wieso es anders nicht geht, aber so geht es:
[autoit]#include <IE.au3>
[/autoit]
Opt("WinTitleMatchMode",2)
$fensterhandle = WinGetHandle(WinGetTitle("Internet Explorer"))
$oIE = _IEAttach ($fensterhandle,"hwnd")
$addr = _IEPropertyGet ($oIE, "LocationURL")
Msgbox(0, "Adresszeile", $addr) -
Lass dir mal $fenstername in einer MsgBox darstellen, vllt kannst du dann einen Fehler erkennen. Normalerweise sollte es so funktionieren.

-
Hm, probier mal das
[autoit]Run(@SystemDir&"\mmc.exe "&@SystemDir&"\services.msc")
[/autoit] -
Es gibt die Option WinTitleMatchMode. Schau sie dir in der Hilfe an.
[autoit]Opt("WinTitleMatchMode",2)
[/autoit]
$Fenstertitel = "\jre\bin\" -
Dafür gibt's _IEAttach
[autoit]#include <IE.au3>
[/autoit]
$oIE = _IEAttach ($Fenstertitel)
$addr = _IEPropertyGet ($oIE, "LocationURL")
Msgbox(0, "", $addr) -
Am besten schaust du dir den Befehl ControlGetText an.
[autoit]ControlGetText($Fenstertitel,"","Edit1")
[/autoit] -
Im englischen Forum habe ich noch was gefunden: _ProcessListProperties
Spoiler anzeigen
[autoit]#include <array.au3> ; for _ArrayDisplay()
[/autoit] [autoit][/autoit] [autoit]$avRET = _ProcessListProperties()
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
_ArrayDisplay($avRET, "Debug: $avProcs, @error = " & @error);===============================================================================
[/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; Return for no matches
[/autoit] [autoit][/autoit] [autoit]
If $avProcs[0][0] = 0 Then Return $avProcs; ReDim array for additional property columns
[/autoit] [autoit][/autoit] [autoit]
ReDim $avProcs[$avProcs[0][0] + 1][8]; Connect to WMI and get process objects
[/autoit] [autoit][/autoit] [autoit]
$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; [n][2] = Parent PID
[/autoit] [autoit][/autoit] [autoit]
$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.ExecutablePathExitLoop
[/autoit] [autoit][/autoit] [autoit]
EndIf
Next
Next
Else
SetError(2) ; Error getting process collection from WMI
EndIf; Get collection of all processes from Win32_PerfFormattedData_PerfProc_Process
[/autoit] [autoit][/autoit] [autoit]
; 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; Return array
[/autoit]
Return $avProcs
EndFunc ;==>_ProcessListProperties -
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)
[/autoit][autoit][/autoit][autoit]
WinSetState("Windows Task-Manager","",@SW_MINIMIZE)While 1
[/autoit]
$CPULoad = StringTrimLeft(StatusBarGetText("Windows Task-Manager","",2),16)
msgbox(0,'CPU-Auslastung',$CPULoad)
WEndEDIt: Sorry, hab überlesen, dass du nur die Prozessorauslastung von einem Prozess willst.
-
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.
-
Hm,
[autoit]$i = 0
[/autoit]
Do
$i +=1
If $i = 2 Then $i +=1
MsgBox(0,"",$i)
Until $i = 5