HI,
Au3Info.exe ist doch im Programm-Ordner drin. Verstehe den Aufwand nicht.
So long,
Mega
HI,
Au3Info.exe ist doch im Programm-Ordner drin. Verstehe den Aufwand nicht.
So long,
Mega
HI,
schön das ich weiterhelfen konnte. Das Skript ist wirklich nutzbar. Mal sehen, ob sowas in die nächste Stable einfließt.
Viel Spaß beim Probieren.
So long,
Mega
HI,
ja der Fehler nichts mit der Beta zu tun. Ich hatte noch keine Zeit zu gucken, was derjenige dort falsch gemacht hat. Aber könntest du nicht auch diese Func benutzen?
;===============================================================================
; Function Name: GetExtProperty($sPath,$iProp)
; Description: Returns an extended property of a given file.
; Parameter(s): $sPath - The path to the file you are attempting to retrieve an extended property from.
; $iProp - The numerical value for the property you want returned. If $iProp is is set
; to -1 then all properties will be returned in a 1 dimensional array in their corresponding order.
; The properties are as follows:
; Name = 0
; Size = 1
; Type = 2
; DateModified = 3
; DateCreated = 4
; DateAccessed = 5
; Attributes = 6
; Status = 7
; Owner = 8
; Author = 9
; Title = 10
; Subject = 11
; Category = 12
; Pages = 13
; Comments = 14
; Copyright = 15
; Artist = 16
; AlbumTitle = 17
; Year = 18
; TrackNumber = 19
; Genre = 20
; Duration = 21
; BitRate = 22
; Protected = 23
; CameraModel = 24
; DatePictureTaken = 25
; Dimensions = 26
; Width = 27
; Height = 28
; Company = 30
; Description = 31
; FileVersion = 32
; ProductName = 33
; ProductVersion = 34
; Requirement(s): File specified in $spath must exist.
; Return Value(s): On Success - The extended file property, or if $iProp = -1 then an array with all properties
; On Failure - 0, @Error - 1 (If file does not exist)
; Author(s): Simucal (Simucal@gmail.com)
; Note(s):
;
;===============================================================================
#include <array.au3>
$path = FileOpenDialog("Select a file to read attributes",@ScriptDir,"All (*.*)")
$prop = _GetExtProperty($path,-1)
_ArrayDisplay($prop,"Property Array")
Func _GetExtProperty($sPath, $iProp)
Local $iExist, $sFile, $sDir, $oShellApp, $oDir, $oFile, $aProperty, $sProperty
$iExist = FileExists($sPath)
If $iExist = 0 Then
SetError(1)
Return 0
Else
$sFile = StringTrimLeft($sPath, StringInStr($sPath, "\", 0, -1))
$sDir = StringTrimRight($sPath, (StringLen($sPath) - StringInStr($sPath, "\", 0, -1)))
$oShellApp = ObjCreate ("shell.application")
$oDir = $oShellApp.NameSpace ($sDir)
$oFile = $oDir.Parsename ($sFile)
If $iProp = -1 Then
Local $aProperty[35]
For $i = 0 To 34
$aProperty[$i] = $oDir.GetDetailsOf ($oFile, $i)
Next
Return $aProperty
Else
$sProperty = $oDir.GetDetailsOf ($oFile, $iProp)
If $sProperty = "" Then
Return 0
Else
Return $sProperty
EndIf
EndIf
EndIf
EndFunc ;==>_GetExtProperty
Alles anzeigen
So long,
Mega
Hi,
vielleicht sagst du uns einfach, was du vorhast, dann können wir gucken, ob es schon soetwas gibt, oder Tipps weitergeben.
So long,
Mega
Hi,
hast du ein Bsp zum leichten Nachvollziehen?
So long,
Mega
Hi,
wenn du meinst mit welchem Programm eine Datei geöffnet wird, dann liegt es an der Extension. Das OS verlinkt z.B. *.txt mit Editor oder UltraEdit.
Das steht in der Registry.
Hoffe wenigstens annährend deine Frage beantwortet zu haben.
So long,
Mega
HI,
sieht eirgentlich vom Aufbau gut aus, auch wenn ich die Farbauswahl gewöhnungsbedürftig finde. Außerdem finde ich den Englisch-Deutsch-Mix recht lustig. :tongue:
So long,
Mega
Okay okay, ich sag ja schon nichts mehr. :tier:
Nächstes Jahr werde ich mit Mastermind starten.
So long,
Mega
Hi,
juhu. Ich habe den 2.ten Platz gemacht :party3:
Bekomme ich jetzt 100 Posts geschenkt?
Coole Idee @pee mit dem Contest!
So long,
Mega
Hi,
wenn du die Datei einfach nur anzeigen lassen willst, dann kannst du sie ja auch einfach starten.
#include<Process.au3>
_RunDOS("start c:\Downloads\bookmarks.html")
So long,
Mega
Hi,
4 Teilnehmer, da bin ich ja gleich im Halbfinale.
So long,
Mega
HI,
wie machst du es denn manuell? Maus, Tastatur? Vielleicht kannst du ja einfach den manuellen Weg automatisieren.
So long,
Mega
HI,
ich bin kein Skype-Nutzer, aber bist du dir sicher, dass es keine Möglichkeit in Skype gibt?
So long,
Mega
muh_kuh : Die Wette gehe ich ein. Wenn Ecuador Weltmeister wird, dann schreibe ich ein Skript < 1000 Zeilen Code für dich.
Wenn nicht, dann testest du 2 Skripte die ich dir schicke auf Herz und Nieren.
So long,
Mega
Hi,
dieses Skript liest einige wichtige Daten über das Betriebssystem ein und zeigt sie in einer einfachen GUI an.
; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.1 beta
; Author: Thorsten Meger
;
; Script Function:
; Windows XP Information displayed in a GUI
; with Office-Key (only Office XP or 2003 supported)
;
; ----------------------------------------------------------------------------
#include <GUIConstants.au3>
[/autoit] [autoit][/autoit] [autoit];GUI
$GUI = GUICreate("Windows Information", 685, 450, 158, 127)
;Labels
$windowsInformation_L = GUICtrlCreateLabel("Windows Information", 8, 8, 659, 25)
$status_L = GUICtrlCreateLabel("Information read out ...", 24, 80, 400, 17)
$description_L = GUICtrlCreateLabel("Description", 16, 112, 103, 17)
$windowsType_L = GUICtrlCreateLabel("WindowsType", 16, 152, 103, 17)
$serialNumber_L = GUICtrlCreateLabel("SerialNumber", 16, 192, 103, 17)
$ProductKey_L = GUICtrlCreateLabel("ProductKey", 16, 232, 103, 17)
$InstallDate_L = GUICtrlCreateLabel("InstallDate", 16, 272, 103, 17)
$LastBootUpTime_L = GUICtrlCreateLabel("LastBootUpTime", 16, 312, 103, 17)
$RegisteredOwner_L = GUICtrlCreateLabel("RegisteredOwner", 16, 352, 103, 17)
$officeKey_L = GUICtrlCreateLabel("OfficeKey", 16, 392, 103, 17)
;Input
$description_I = GUICtrlCreateInput("Description", 130, 112, 389, 21)
$windowsType_I = GUICtrlCreateInput("WindowsType", 130, 152, 389, 21)
$serialNumber_I = GUICtrlCreateInput("SerialNumber", 130, 192, 389, 21)
$ProductKey_I = GUICtrlCreateInput("ProductKey", 130, 232, 389, 21)
$InstallDate_I = GUICtrlCreateInput("InstallDate", 130, 272, 389, 21)
$LastBootUpTime_I = GUICtrlCreateInput("LastBootUpTime", 130, 312, 389, 21)
$RegisteredOwner_I = GUICtrlCreateInput("RegisteredOwner", 130, 352, 389, 21)
$officeKey_I = GUICtrlCreateInput("OfficeKey", 130, 392, 389, 21)
;Groups
$informationPanel_G = GUICtrlCreateGroup("Information Panel", 8, 48, 585, 393)
$status_G = GUICtrlCreateGroup("Status", 14, 64, 553, 41)
$buttins_G = GUICtrlCreateGroup("Buttons", 608, 48, 65, 393)
$office_G = GUICtrlCreateGroup("Microsoft Office", 14, 375, 553, 48)
;Buttons
$exit_B = GUICtrlCreateButton("Exit", 616, 72, 49, 25, 0)
$Description_B = GUICtrlCreateButton("clipboard", 616, 112, 49, 25, 0)
$WindowsType_B = GUICtrlCreateButton("clipboard", 616, 152, 49, 25, 0)
$SerialNumber_B = GUICtrlCreateButton("clipboard", 616, 192, 49, 25, 0)
$ProductKey_B = GUICtrlCreateButton("clipboard", 616, 232, 49, 25, 0)
$InstallDate_B = GUICtrlCreateButton("clipboard", 616, 272, 49, 25, 0)
$LastBootUpTime_B = GUICtrlCreateButton("clipboard", 616, 312, 49, 25, 0)
$registeredOwner_B = GUICtrlCreateButton("clipboard", 616, 352, 49, 25, 0)
$OfficeKey_B = GUICtrlCreateButton("clipboard", 616, 392, 49, 25, 0)
; SetFont
$font = "Comic Sans MS"
GUICtrlSetFont($windowsInformation_L, 16, 400, 4, $font)
;ProgressBar
$progressbar = GUICtrlCreateProgress(140, 75, 400, 25)
;Global variables
Global $product = "" ; Office product Version (XP or 2003)
Global $counter = 3 ; Counter for progressBar
Global $wait = 150 ; Wait for progessBar
GUISetState(@SW_SHOW)
[/autoit] [autoit][/autoit] [autoit]While 1
$msg = GUIGetMsg()
If $counter = 3 Then
Sleep(500)
GUICtrlSetData($status_L, "Initialize... " & $counter)
progress()
$counter -= 1
ElseIf $counter = 2 Then
GUICtrlSetData($status_L, "Initialize... " & $counter)
progress()
$counter -= 1
ElseIf $counter = 1 Then
GUICtrlSetData($status_L, "Initialize... " & $counter)
progress()
$counter -= 1
ElseIf $counter = 0 Then
GUICtrlSetData($status_L, "Ready ...")
progress()
$counter -= 1
ElseIf $counter = -1 Then
Dim $Bin = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "DigitalProductID")
Dim $key4RegisteredOwner = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
$objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
$colSettings = $objWMIService.ExecQuery ("Select * from Win32_OperatingSystem")
For $objOperatingSystem In $colSettings
Next
GUICtrlSetData($description_I, StringMid($objOperatingSystem.Description, 1))
GUICtrlSetData($windowsType_I, '(' & @OSVersion & ') ' & StringMid($objOperatingSystem.Caption, 19))
GUICtrlSetData($serialNumber_I, StringMid($objOperatingSystem.SerialNumber, 1))
GUICtrlSetData($ProductKey_I, DecodeProductKey($Bin))
GUICtrlSetData($InstallDate_I, WMIDateStringToDate($objOperatingSystem.InstallDate))
GUICtrlSetData($LastBootUpTime_I, WMIDateStringToDate($objOperatingSystem.LastBootUpTime))
GUICtrlSetData($RegisteredOwner_I, RegRead($key4RegisteredOwner, "RegisteredOwner"))
GUICtrlSetData($officeKey_I, getOfficeKey())
GUICtrlSetData($officeKey_L, "Office " & $product)
$counter -= 1
ElseIf $counter < - 1 Then
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $exit_B
GUICtrlSetData($status_L, "So long, Mega")
Sleep(1500)
ExitLoop
Case $msg = $Description_B
ClipPut(StringMid($objOperatingSystem.Description, 1))
GUICtrlSetData($status_L, "Description copied to clipboard")
Case $msg = $WindowsType_B
ClipPut('(' & @OSVersion & ') ' & StringMid($objOperatingSystem.Caption, 19))
GUICtrlSetData($status_L, "WindowsType copied to clipboard")
Case $msg = $SerialNumber_B
ClipPut(StringMid($objOperatingSystem.SerialNumber, 1))
GUICtrlSetData($status_L, "SerialNumber copied to clipboard")
Case $msg = $ProductKey_B
ClipPut(DecodeProductKey($Bin))
GUICtrlSetData($status_L, "ProductKey copied to clipboard")
Case $msg = $InstallDate_B
ClipPut(WMIDateStringToDate($objOperatingSystem.InstallDate))
GUICtrlSetData($status_L, "InstallDate copied to clipboard")
Case $msg = $LastBootUpTime_B
ClipPut(WMIDateStringToDate($objOperatingSystem.LastBootUpTime))
GUICtrlSetData($status_L, "LastBootUpTime copied to clipboard")
Case $msg = $registeredOwner_B
ClipPut(RegRead($key4RegisteredOwner, "RegisteredOwner"))
GUICtrlSetData($status_L, "RegisteredOwner copied to clipboard")
Case $msg = $OfficeKey_B
ClipPut(getOfficeKey())
GUICtrlSetData($status_L, "OfficeKey copied to clipboard")
Case Else
;;;;;;;
EndSelect
EndIf
WEnd
Exit
; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.1 beta
; Author: Unknown & Thorsten Meger <[email='Thorsten.Meger@gmx.de'][/email]>
;
; Script Function: Decode REG_BINARY
; ----------------------------------------------------------------------------
Func DecodeProductKey($BinaryDPID)
Local $bKey[15]
Local $sKey[29]
Local $Digits[24]
Local $Value = 0
Local $hi = 0
Local $n = 0
Local $i = 0
Local $dlen = 29
Local $slen = 15
Local $Result
$Digits = StringSplit("BCDFGHJKMPQRTVWXY2346789", "")
$BinaryDPID = StringMid($BinaryDPID, 105, 30)
For $i = 1 To 29 Step 2
$bKey[Int($i / 2) ] = Dec(StringMid($BinaryDPID, $i, 2))
Next
For $i = $dlen - 1 To 0 Step - 1
If Mod(($i + 1), 6) = 0 Then
$sKey[$i] = "-"
Else
$hi = 0
For $n = $slen - 1 To 0 Step - 1
$Value = BitOR(BitShift($hi, -8), $bKey[$n])
$bKey[$n] = Int($Value / 24)
$hi = Mod($Value, 24)
Next
$sKey[$i] = $Digits[$hi + 1]
EndIf
Next
For $i = 0 To 28
$Result = $Result & $sKey[$i]
Next
Return $Result
EndFunc ;==>DecodeProductKey
; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.1 beta
; Author: Unknown & Thorsten Meger <[email='Thorsten.Meger@gmx.de'][/email]>
;
; Script Function: WMIDateStringToDate (changed Date format)
; ----------------------------------------------------------------------------
Func WMIDateStringToDate($dtmDate)
Return (StringMid($dtmDate, 7, 2) & "/" & _
StringMid($dtmDate, 5, 2) & "/" & StringLeft($dtmDate, 4) _
& " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate, 13, 2))
EndFunc ;==>WMIDateStringToDate
; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.1 beta
; Author: Thorsten Meger <[email='Thorsten.Meger@gmx.de'][/email]>
;
; Script Function: Display a "fake" progressbar at the beginning
; ----------------------------------------------------------------------------
Func progress()
If $counter = 3 Then
For $i = 0 To 20 Step 1
GUICtrlSetData($progressbar, $i)
Sleep($wait / 20)
Next
ElseIf $counter = 2 Then
For $i = 20 To 50 Step 1
GUICtrlSetData($progressbar, $i)
Sleep($wait / 30)
Next
ElseIf $counter = 1 Then
For $i = 50 To 80 Step 1
GUICtrlSetData($progressbar, $i)
Sleep($wait / 30)
Next
ElseIf $counter = 0 Then
For $i = 80 To 100 Step 1
GUICtrlSetData($progressbar, $i)
Sleep($wait / 20)
Next
GUICtrlSetState($progressbar, $GUI_HIDE)
EndIf
EndFunc ;==>progress
; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.1 beta
; Author: Thorsten Meger <[email='Thorsten.Meger@gmx.de'][/email]>
;
; Script Function:Get & decode OfficeKey
; ----------------------------------------------------------------------------
Func getOfficeKey()
Local $List[1]
Local $i = 1
$var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Common\InstallRoot", "Path")
If $var <> "" Then
$product = "2003"
Dim $officeKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Registration"
Else
$var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\10.0\Common\InstallRoot", "Path")
If @error <> 0 Then
GUICtrlSetData($status_L, "Info: Unable to find installationPath, maybe no Office installed!")
Return "No Office XP or 2003 found"
EndIf
If $var <> "" Then
$product = "XP"
Dim $officeKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\10.0\Registration"
EndIf
EndIf
Dim $var = RegEnumKey($officeKey, $i)
If @error <> 0 Then
GUICtrlSetData($status_L, "Info: Unable to find REG_BINARY 'DigitalProductID', maybe no Office installed!")
Return "No Office XP or 2003 found"
Else
$List[$i - 1] = RegRead($officeKey & "\" & $var, "DigitalProductID")
If $List[$i - 1] = "" Then
GUICtrlSetData($status_L, "Info: Unable to find REG_BINARY 'DigitalProductID', maybe no Office installed!")
Else
$key = $List[$i - 1]
Return DecodeProductKey($key)
EndIf
EndIf
EndFunc ;==>getOfficeKey
Schlanke GUI :
; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.1 beta
; Author: Thorsten Meger
;
; Script Function:
; Windows XP Information displayed in a Gui
;
; ----------------------------------------------------------------------------
#include <GUIConstants.au3>
$GUI = GUICreate("", 380, 315, -1, -1)
GUISetFont(9, 700, -1, "MS Sans Serif")
$windowsInformation_L = GUICtrlCreateLabel(" Windows Information", 5, 3, 290, 25)
$status_L = GUICtrlCreateLabel("Information read ...", 20, 280, 200, 20)
$description_L = GUICtrlCreateLabel("Description", 20, 58, 100, 20)
$windowsType_L = GUICtrlCreateLabel("WindowsType", 20, 83, 100, 20)
$serialNumber_L = GUICtrlCreateLabel("SerialNumber", 20, 108, 100, 20)
$ProductKey_L = GUICtrlCreateLabel("ProductKey", 20, 133, 100, 20)
$InstallDate_L = GUICtrlCreateLabel("InstallDate", 20, 158, 100, 20)
$LastBootUpTime_L = GUICtrlCreateLabel("LastBootUpTime", 20, 183, 100, 20)
$RegisteredOwner_L = GUICtrlCreateLabel("RegisteredOwner", 20, 208, 100, 20)
$officeKey_L = GUICtrlCreateLabel("OfficeKey", 20, 233, 100, 20)
$description_I = GUICtrlCreateInput("", 125, 55, 235, 20)
$windowsType_I = GUICtrlCreateInput("", 125, 80, 235, 20)
$serialNumber_I = GUICtrlCreateInput("", 125, 105, 235, 20)
$ProductKey_I = GUICtrlCreateInput("", 125, 130, 235, 20)
$InstallDate_I = GUICtrlCreateInput("", 125, 155, 235, 20)
$LastBootUpTime_I = GUICtrlCreateInput("", 125, 180, 235, 20)
$RegisteredOwner_I = GUICtrlCreateInput("", 125, 205, 235, 20)
$officeKey_I = GUICtrlCreateInput("", 125, 230, 235, 20)
$informationPanel_G = GUICtrlCreateGroup("Information Panel", 10, 35, 360, 225)
$status_G = GUICtrlCreateGroup("Status", 10, 265, 360, 40)
$font = "Comic Sans MS"
GUICtrlSetColor($windowsInformation_L, 0xff0000)
GUICtrlSetFont($windowsInformation_L, 16, 700, 4, $font)
$progressbar = GUICtrlCreateProgress(140, 278, 220, 20)
[/autoit] [autoit][/autoit] [autoit]Global $product = ""
Global $counter = 3
Global $wait = 150
GUISetState(@SW_SHOW)
[/autoit] [autoit][/autoit] [autoit]While 1
$msg = GUIGetMsg()
If $counter = 3 Then
Sleep(1000)
GUICtrlSetData($status_L, "Initialize ... " & $counter)
progress()
$counter -= 1
ElseIf $counter = 2 Then
GUICtrlSetData($status_L, "Initialize ... " & $counter)
progress()
$counter -= 1
ElseIf $counter = 1 Then
GUICtrlSetData($status_L, "Initialize ... " & $counter)
progress()
$counter -= 1
ElseIf $counter = 0 Then
GUICtrlSetData($status_L, "Ready ...")
progress()
$counter -= 1
ElseIf $counter = -1 Then
Dim $Bin = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "DigitalProductID")
Dim $key4RegisteredOwner = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
$objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
$colSettings = $objWMIService.ExecQuery ("Select * from Win32_OperatingSystem")
For $objOperatingSystem In $colSettings
Next
GUICtrlSetData($description_I, StringMid($objOperatingSystem.Description, 1))
GUICtrlSetData($windowsType_I, '(' & @OSVersion & ') ' & StringMid($objOperatingSystem.Caption, 19))
GUICtrlSetData($serialNumber_I, StringMid($objOperatingSystem.SerialNumber, 1))
GUICtrlSetData($ProductKey_I, DecodeProductKey($Bin))
GUICtrlSetData($InstallDate_I, WMIDateStringToDate($objOperatingSystem.InstallDate))
GUICtrlSetData($LastBootUpTime_I, WMIDateStringToDate($objOperatingSystem.LastBootUpTime))
GUICtrlSetData($RegisteredOwner_I, RegRead($key4RegisteredOwner, "RegisteredOwner"))
GUICtrlSetData($officeKey_I, getOfficeKey())
GUICtrlSetData($officeKey_L, "Office " & $product)
$counter -= 1
ElseIf $counter < -1 Then
Select
Case $msg = $GUI_EVENT_CLOSE
GUICtrlSetState($progressbar, $GUI_HIDE)
GUICtrlSetData($status_L, "CU Mega")
Sleep(2000)
ExitLoop
EndSelect
EndIf
WEnd
Exit
Func DecodeProductKey($BinaryDPID)
Local $bKey[15]
Local $sKey[29]
Local $Digits[24]
Local $Value = 0
Local $hi = 0
Local $n = 0
Local $i = 0
Local $dlen = 29
Local $slen = 15
Local $Result
$Digits = StringSplit("BCDFGHJKMPQRTVWXY2346789", "")
$BinaryDPID = StringMid($BinaryDPID, 105, 30)
For $i = 1 To 29 Step 2
$bKey[Int($i / 2) ] = Dec(StringMid($BinaryDPID, $i, 2))
Next
For $i = $dlen - 1 To 0 Step - 1
If Mod(($i + 1), 6) = 0 Then
$sKey[$i] = "-"
Else
$hi = 0
For $n = $slen - 1 To 0 Step - 1
$Value = BitOR(BitShift($hi, -8), $bKey[$n])
$bKey[$n] = Int($Value / 24)
$hi = Mod($Value, 24)
Next
$sKey[$i] = $Digits[$hi + 1]
EndIf
Next
For $i = 0 To 28
$Result = $Result & $sKey[$i]
Next
Return $Result
EndFunc ;==>DecodeProductKey
Func WMIDateStringToDate($dtmDate)
Return (StringMid($dtmDate, 7, 2) & "/" & _
StringMid($dtmDate, 5, 2) & "/" & StringLeft($dtmDate, 4) _
& " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate, 13, 2))
EndFunc ;==>WMIDateStringToDate
Func progress()
If $counter = 3 Then
For $i = 0 To 20 Step 1
GUICtrlSetData($progressbar, $i)
Sleep($wait / 20)
Next
ElseIf $counter = 2 Then
For $i = 20 To 50 Step 1
GUICtrlSetData($progressbar, $i)
Sleep($wait / 30)
Next
ElseIf $counter = 1 Then
For $i = 50 To 80 Step 1
GUICtrlSetData($progressbar, $i)
Sleep($wait / 30)
Next
ElseIf $counter = 0 Then
For $i = 80 To 100 Step 1
GUICtrlSetData($progressbar, $i)
Sleep($wait / 20)
Next
GUICtrlSetState($progressbar, $GUI_SHOW)
EndIf
EndFunc ;==>progress
Func getOfficeKey()
Local $List[1]
Local $i = 1
$var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Common\InstallRoot", "Path")
If $var <> "" Then
$product = "2003"
Dim $officeKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Registration"
Else
$var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\10.0\Common\InstallRoot", "Path")
If @error <> 0 Then
GUICtrlSetData($status_L, "Info: Unable to find installationPath, maybe no Office installed!")
Return "No Office XP or 2003 found"
EndIf
If $var <> "" Then
$product = "XP"
Dim $officeKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\10.0\Registration"
EndIf
EndIf
Dim $var = RegEnumKey($officeKey, $i)
If @error <> 0 Then
GUICtrlSetData($status_L, "Info: Unable to find REG_BINARY 'DigitalProductID', maybe no Office installed!")
Return "No Office XP or 2003 found"
Else
$List[$i - 1] = RegRead($officeKey & "\" & $var, "DigitalProductID")
If $List[$i - 1] = "" Then
GUICtrlSetData($status_L, "Info: Unable to find REG_BINARY 'DigitalProductID', maybe no Office installed!")
Else
$key = $List[$i - 1]
Return DecodeProductKey($key)
EndIf
EndIf
EndFunc ;==>getOfficeKey
Evtl. kann es ja der eine oder andere gebrauchen.
So long,
Mega
HI,
vielen Dank für eure Anmerkungen. Den Fehler mit dem Vergleich mit Platz 10 anstatt 12 hatte ich direkt nach dem ich es gepostet hatte schon selbst gefunden. :tongue:
Hmmh, manchmal ist die Frage, wie ich es schneller machen kann, meinetwegen kann der Code ruhig länger werden, hauptsache schnell.
Die HighScore dauert solange, weil er viele Stringoperationen machen muss, außerdem ist die Verschlüsselung und Entschlüsselung ziemlich langsam.
Die falsche Straßenbrechnung konnte ich bisher noch nicht nachvollziehen. Evtl. Muss ich mal einen Bot schreiben, der das spielt und überprüft.
Macht weiter so Jungs. So macht es wirklich Spaß!
Kudos!
So long,
Mega
Stimme die in vielen Punkten zu. Hatte Ukraine auch hoch auf der Rechnung. Dennoch glaube ich, dass wir weit kommen.
So long,
Mega
HI,
hier ist meine Variante. Etwas kürzer.
#include <Date.au3>
HotKeySet("{esc}", "end")
$objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
$colSettings = $objWMIService.ExecQuery ("Select * from Win32_OperatingSystem")
For $objOperatingSystem In $colSettings
Next
While 1
ToolTip("LastBootUpTime : " & _counter(WMIDateStringToDate($objOperatingSystem.LastBootUpTime)) _
& @CRLF & "InstallDate : " & _counter(WMIDateStringToDate($objOperatingSystem.InstallDate)))
Sleep(10)
WEnd
Func _counter($s_Date)
If _DateIsValid($s_Date) Then
Local $NumberOfSeconds = _DateDiff("s", $s_Date, _NowCalc())
Return StringFormat("Days = %.03d" & @TAB & "Hours = %.02d" & @TAB & "Min = %.02d" & @TAB & "Sec = %.02d" & @TAB & _
"Msec = %.03d", $NumberOfSeconds / 86400, Mod($NumberOfSeconds / 3600, 24), Mod(($NumberOfSeconds / 60), 60), _
Mod($NumberOfSeconds, 60), _MSec())
Else
Return -1
EndIf
EndFunc ;==>_counter
Func WMIDateStringToDate($dtmDate)
Return (StringLeft($dtmDate, 4) & "/" & StringMid($dtmDate, 5, 2) & "/" & StringMid($dtmDate, 7, 2) _
& " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate, 13, 2))
EndFunc ;==>WMIDateStringToDate
Func _MSec()
Local $stSystemTime = DllStructCreate('ushort;ushort;ushort;ushort;ushort;ushort;ushort;ushort')
DllCall('kernel32.dll', 'none', 'GetSystemTime', 'ptr', DllStructGetPtr($stSystemTime))
$sMilliSeconds = StringFormat('%03d', DllStructGetData($stSystemTime, 8))
$stSystemTime = 0
Return $sMilliSeconds
EndFunc ;==>_MSec
Func end()
Exit(0)
EndFunc
Alles anzeigen
l
So long,
Mega
Hi,
super dass das Spiel dir so gut gefällt. Kannst du mir einen Screenshot schicken, falls du nochmal einen angeblichen Fehler in der Berechnung findest. Ich teste gerade seit 10 min., aber die Straßen werden immer korrekt berechnet.
Die HS in ein Array speichern? Ist doch schon. Du meinst noch einfacher als
If ControlGetText("", "", $point_PL) >= Int(StringMid($highScore_A[9], 1, 3))
So long,
Mega