Hallo,
die Datei muss im Binärmodus geöffnet werden (s. FileOpen)!
[ gelöst ] Binary datei einlesen und wieder speichern
Hallo,
die Datei muss im Binärmodus geöffnet werden (s. FileOpen)!
[ gelöst ] Binary datei einlesen und wieder speichern
Hallo,
ich hatte das Problem zwar noch nicht aber Probiers mal so!
Mit AutoIt wird's wohl schwer aber such mal nach FRAPS!
Sorry, vergiss einfach alles ab guten morgen, ich hatte heute einfach einen stressigen Tag und hab dann wohl den Beitrag nur halbherzig und falsch gelesen! ![]()
Die Frage war nicht ob man es machen kann sondern ob es dir einer schreibt! Solche Fragen gehen mir langsam auf den Keks!
Alles anzeigenGuten abend
ich habe mal iene frage
kann man ein schriptt schreiben
das die fps im spiel anzeigt
sowas könnte ich mal gut gebrauchen (als gamer)
okay das war es schon
schönen abend noch
Versuchs mal in der Jobbörse und schreib gleich dazu was Du bereit bist zu zahlen! ![]()
Hallo,
die Funktion _INetSmtpMail in der aktuellen Stable hat immer noch den Fehler!
einfach in der Hilfe unter Index Operators eingeben!
Hallo,
Verknüpfungen werden mit FileCreateShortcut erstellt, FileCreateNTFSLink erzeugt Hardlinks und die können nur auf dem gleichen Volume angelegt werden.
PS: Wir haben zwar die Lizenz zum schnellen Antworten aber da braucht man nicht schon nach 1h zu fragen ob keiner eine Lösung hat, es gibt Foren da wartet man Tage auf eine Antwort! ![]()
Hallo,
ja ich glaube Du hast da was übersehen DriveMapAdd, DriveMapDel, DriveMapGet!
Hallo,
der Koda gehört ins Verzeichnis SciTE -> Koda
den Wrapper gibts da -> http://www.autoitscript.com/autoit3/scite/downloads.shtml
einige nützliche Links findest Du da -> Erste Hilfe
Hallo,
hol sie dir doch aus dem Archiv -> http://www.autoitscript.com/autoit3/files/archive/autoit/
Ich sagte ja auch deklarieren und nicht Wert zuweisen!
; ------------------------------------------------------------------------------
;
;
; Language: Deutsch
; Platform: Win2k / XP
; Author: Leviathan
;
; Script Function: Ftp-Upload-Tool --> Can handle multifile-upload
;
; ------------------------------------------------------------------------------
Global $server = 'IP-Adresse'
Global $username = 'user'
Global $pass = 'kennwort'
Global $file
#include <Process.au3>
#include <GUIConstants.au3>
#include <File.au3>
$maingui = GUICreate("FileUploader für die BES-Maschine", 500, 210, 193, 115)
$choosefilelabel = GUICtrlCreateLabel("Datei wählen:", 8, 40, 100, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$fileinput = GUICtrlCreateInput("", 160, 40, 233, 17)
$butt_open = GUICtrlCreateButton("Öffnen", 400, 40, 57, 17, 0)
$filenameonserverlabel = GUICtrlCreateLabel("Dateiname auf der Maschine:", 8, 72, 150, 17)
$filename = GUICtrlCreateInput("", 160, 72, 233, 17)
$butt_upload = GUICtrlCreateButton("Hochladen", 400, 72, 73, 17, 0)
$your_link = GUICtrlCreateInput("", 160, 160, 233, 17)
GUICtrlCreateLabel("your link:", 8, 160, 46, 17)
GUISetState(@SW_SHOW)
While 1
$msg = GUIGetMsg(1)
If $msg[0] = $GUI_EVENT_CLOSE AND $msg[1] =$maingui Then Exit
IF $msg[0] = $butt_open AND $msg[1] = $maingui Then _fileopendialog()
If $msg[0] = $butt_upload AND $msg[1] = $maingui Then _buttonupload()
WEnd
Func _fileopendialog()
;Global $file = FileOpenDialog("Datei auswählen", @MyDocumentsDir, "TXT (*.txt)", 7)
$file = FileOpenDialog("Datei auswählen", "E:\", "TXT (*.txt)", 7)
$multifile = StringInStr($file, "|")
If $multifile <> 0 then
GUICtrlSetStyle($filename, $ES_READONLY)
GUICtrlSetData($filename, "Mehrere Dateien hochladen")
Global $multifile = 1
Else
Global $multifile = 0
GUICtrlSetData($fileinput, $file)
EndIf
EndFunc ;=> _fileopendialog
Func _buttonupload()
If $multifile = 1 then
$multifile = StringSplit($file, "|")
$link=""
For $i = 1 To $multifile[0]
$UPLOADFILE=$multifile[$i]
$fnos = StringSplit($multifile[$i], "\")
$FTPFILENAME = $fnos[$fnos[0]]
$Open = _FTPOpen('Dateien hochladen')
$Conn = _FTPConnect($Open, $server, $username, $pass)
$Ftpp = _FtpPutFile($Conn, $UPLOADFILE, $FTPFILENAME)
$Ftpc = _FTPClose($Open)
$link = $link & "172.16.140.175/h0/bes3g/DATEN/tab/"&$FTPFILENAME&" |"
Next
$link = StringTrimRight($link, 2)
GUICtrlSetData($your_link, $link)
Beep(767, 50)
GUICtrlSetStyle($filename, $GUI_SS_DEFAULT_INPUT)
GUICtrlSetData($filename, "")
Msgbox(1,"Achtung","Upload beendet!")
Else
If $multifile = 0 then
$fn = guictrlread($filename)
If $fn = "" Then
$fnos = StringSplit($file, "\")
$k = $fnos[0]
$FTPFILENAME = $fnos[$k]
;Msgbox(1,"34", $FTPFILENAME) ;test
GUICtrlSetData($filename, $FTPFILENAME)
Else
$FTPFILENAME = $fn
EndIf
GUICtrlSetStyle($filenameonserverlabel, -1)
GUICtrlSetData($filenameonserverlabel, "")
$UPLOADFILE = $file
$fnos = StringSplit($file, "\")
$Open = _FTPOpen('Was hier steht ist egal')
$Conn = _FTPConnect($Open, $server, $username, $pass)
$Ftpp = _FtpPutFile($Conn, $UPLOADFILE, $FTPFILENAME)
$Ftpc = _FTPClose($Open)
$link = "172.16.140.175/h0/bes3g/DATEN/tab/"&$FTPFILENAME
GUICtrlSetData($your_link, $link)
Msgbox(1,"Achtung","Upload beendet!")
GUICtrlSetData($fileinput, "")
GUICtrlSetData($filename, "")
EndIf
EndIf
GUICtrlSetStyle($filename, -1)
GUICtrlSetData($filename, "")
EndFunc
Hallo,
ich habe noch ein wenig mit deinem Problem experimentiert und glaube das eine ganz brauchbare Lösung rausgekommen ist!
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <StaticConstants.au3>
Opt('MustDeclareVars', 1)
Opt('GUIOnEventMode', 1)
Global $gui_digit[6], $dColor = 0xff2222, $eColor = 0x000000, $bgColor = 0xc0c0c0
Global $s = -1, $m = -1, $h = -1, $hh, $hm, $hs, $ls, $rs
GUICreate('test', 800, 480, -1, -1, $WS_POPUP, BitOr($WS_EX_TOOLWINDOW, $WS_EX_LAYERED))
GUISetOnEvent($GUI_EVENT_PRIMARYDOWN, '_MoveWindow')
GUISetOnEvent($GUI_EVENT_CLOSE,'_End')
GUISetBKColor($bgColor) ; Hintergrundfarbe setzen
$gui_digit[0] = GUICtrlCreateGraphic(20, 20, 32, 56)
GUICtrlSetBkColor(-1, $bgColor)
$gui_digit[1] = GUICtrlCreateGraphic(60, 20, 32, 56)
GUICtrlSetBkColor(-1, $bgColor)
_Colon(103, 20)
$gui_digit[2] = GUICtrlCreateGraphic(120, 20, 32, 56)
GUICtrlSetBkColor(-1, $bgColor)
$gui_digit[3] = GUICtrlCreateGraphic(160, 20, 32, 56)
GUICtrlSetBkColor(-1, $bgColor)
_Colon(203, 20)
$gui_digit[4] = GUICtrlCreateGraphic(220, 20, 32, 56)
GUICtrlSetBkColor(-1, $bgColor)
$gui_digit[5] = GUICtrlCreateGraphic(260, 20, 32, 56)
GUICtrlSetBkColor(-1, $bgColor)
GUICtrlCreatePic(@ScriptDir & '\nicht loeschen.gif', 0, 0, 1, 1) ; wird für die Transparenz benötigt (nicht löschen)
GUISetState()
While 1
$hh = @HOUR
If $hh <> $h Then
GUISetState(@SW_LOCK)
If $hh = "00" Then
GUICtrlDelete($gui_digit[0])
GUICtrlDelete($gui_digit[1])
$gui_digit[0] = GUICtrlCreateGraphic(20, 20, 32, 56)
GUICtrlSetBkColor(-1, $bgColor)
$gui_digit[1] = GUICtrlCreateGraphic(60, 20, 32, 56)
GUICtrlSetBkColor(-1, $bgColor)
EndIf
$ls = StringLeft($hh, 1)
$rs = StringRight($hh, 1)
_DigitShow($gui_digit[0], $ls)
_DigitShow($gui_digit[1], $rs)
$h = $hh
GUISetState(@SW_UNLOCK)
EndIf
$hm = @MIN
If $hm <> $m Then
GUISetState(@SW_LOCK)
If $hm = "00" Then
GUICtrlDelete($gui_digit[2])
GUICtrlDelete($gui_digit[3])
$gui_digit[2] = GUICtrlCreateGraphic(120, 20, 32, 56)
GUICtrlSetBkColor(-1, $bgColor)
$gui_digit[3] = GUICtrlCreateGraphic(160, 20, 32, 56)
GUICtrlSetBkColor(-1, $bgColor)
EndIf
$ls = StringLeft($hm, 1)
$rs = StringRight($hm, 1)
_DigitShow($gui_digit[2], $ls)
_DigitShow($gui_digit[3], $rs)
$m = $hm
$h = -1
GUISetState(@SW_UNLOCK)
EndIf
$hs = @SEC
If $hs <> $s Then
GUISetState(@SW_LOCK)
If $hs = "00" Then
GUICtrlDelete($gui_digit[4])
GUICtrlDelete($gui_digit[5])
$gui_digit[4] = GUICtrlCreateGraphic(220, 20, 32, 56)
GUICtrlSetBkColor(-1, $bgColor)
$gui_digit[5] = GUICtrlCreateGraphic(260, 20, 32, 56)
GUICtrlSetBkColor(-1, $bgColor)
EndIf
$ls = StringLeft($hs, 1)
$rs = StringRight($hs, 1)
_DigitShow($gui_digit[4], $ls)
_DigitShow($gui_digit[5], $rs)
$s = $hs
GUISetState(@SW_UNLOCK)
EndIf
Sleep(10)
WEnd
Func _Colon($PosX, $PosY)
GUICtrlCreateGraphic($PosX, $PosY, 10, 56)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $eColor, $dColor)
GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 12, 10, 10)
GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 0, 36, 10, 10)
EndFunc
Func _DigitShow($digit, $number)
Switch $number ; g
Case 2, 3, 4, 5, 6, 8, 9
GUICtrlSetGraphic($digit, $GUI_GR_COLOR, $eColor, $dColor)
GUICtrlSetGraphic($digit, $GUI_GR_MOVE, 0, 28)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 8, 24)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 24, 24)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 32, 28)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 24, 32)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 8, 32)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 0, 28)
Case 0, 1, 7
GUICtrlSetGraphic($digit, $GUI_GR_COLOR, $bgColor, $bgColor)
GUICtrlSetGraphic($digit, $GUI_GR_MOVE, 2, 28)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 9, 24)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 23, 24)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 30, 28)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 23, 32)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 9, 32)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 2, 28)
EndSwitch
Switch $number ; a
Case 0, 2, 3, 5, 6, 7, 8, 9
GUICtrlSetGraphic($digit, $GUI_GR_COLOR, $eColor, $dColor)
GUICtrlSetGraphic($digit, $GUI_GR_MOVE, 0, 0)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 8, ![]()
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 24, ![]()
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 32, 0)
Case 1, 4
GUICtrlSetGraphic($digit, $GUI_GR_COLOR, $bgColor, $bgColor)
GUICtrlSetGraphic($digit, $GUI_GR_MOVE, 1, 0)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 9, ![]()
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 23, ![]()
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 31, 0)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 1, 0)
EndSwitch
Switch $number ; b
Case 0, 1, 2, 3, 4, 7, 8, 9
GUICtrlSetGraphic($digit, $GUI_GR_COLOR, $eColor, $dColor)
GUICtrlSetGraphic($digit, $GUI_GR_MOVE, 32, 0)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 24, ![]()
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 24, 24)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 32, 28)
Case 5, 6
GUICtrlSetGraphic($digit, $GUI_GR_COLOR, $bgColor, $bgColor)
GUICtrlSetGraphic($digit, $GUI_GR_MOVE, 32, 1)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 24, 9)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 24, 23)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 32, 27)
EndSwitch
Switch $number ; c
Case 0, 1, 3, 4, 5, 6, 7, 8, 9
GUICtrlSetGraphic($digit, $GUI_GR_COLOR, $eColor, $dColor)
GUICtrlSetGraphic($digit, $GUI_GR_MOVE, 32, 28)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 24, 32)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 24, 48)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 32, 56)
Case 2
GUICtrlSetGraphic($digit, $GUI_GR_COLOR, $bgColor, $bgColor)
GUICtrlSetGraphic($digit, $GUI_GR_MOVE, 32, 29)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 24, 33)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 24, 48)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 32, 55)
EndSwitch
Switch $number ; d
Case 0, 2, 3, 5, 6, 8, 9
GUICtrlSetGraphic($digit, $GUI_GR_COLOR, $eColor, $dColor)
GUICtrlSetGraphic($digit, $GUI_GR_MOVE, 0, 56)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 8, 48)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 24, 48)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 32, 56)
Case 1, 4, 7
GUICtrlSetGraphic($digit, $GUI_GR_COLOR, $bgColor, $bgColor)
GUICtrlSetGraphic($digit, $GUI_GR_MOVE, 1, 56)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 9, 48)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 23, 48)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 31, 56)
EndSwitch
Switch $number ; e
Case 0, 2, 6, 8
GUICtrlSetGraphic($digit, $GUI_GR_COLOR, $eColor, $dColor)
GUICtrlSetGraphic($digit, $GUI_GR_MOVE, 0, 28)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 8, 32)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 8, 48)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 0, 56)
Case 1, 3, 4, 5, 7, 9
GUICtrlSetGraphic($digit, $GUI_GR_COLOR, $bgColor, $bgColor)
GUICtrlSetGraphic($digit, $GUI_GR_MOVE, 0, 29)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 8, 33)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 8, 47)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 0, 55)
EndSwitch
Switch $number ; f
Case 0, 4, 5, 6, 8, 9
GUICtrlSetGraphic($digit, $GUI_GR_COLOR, $eColor, $dColor)
GUICtrlSetGraphic($digit, $GUI_GR_MOVE, 0, 0)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 8, ![]()
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 8, 24)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 0, 28)
Case 1, 2, 3, 7
GUICtrlSetGraphic($digit, $GUI_GR_COLOR, $bgColor, $bgColor)
GUICtrlSetGraphic($digit, $GUI_GR_MOVE, 0, 1)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 8, 9)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 8, 23)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 0, 27)
EndSwitch
Switch $Number
Case 1
GUICtrlSetGraphic($digit, $GUI_GR_COLOR, $bgColor, $bgColor)
GUICtrlSetGraphic($digit, $GUI_GR_MOVE, 0, 0)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 8, 0)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 8, 56)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 0, 56)
Case 4
GUICtrlSetGraphic($digit, $GUI_GR_COLOR, $bgColor, $bgColor)
GUICtrlSetGraphic($digit, $GUI_GR_MOVE, 0, 33)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 8, 33)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 8, 56)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 0, 56)
Case 7
GUICtrlSetGraphic($digit, $GUI_GR_COLOR, $bgColor, $bgColor)
GUICtrlSetGraphic($digit, $GUI_GR_MOVE, 0, 9)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 8, 9)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 8, 56)
GUICtrlSetGraphic($digit, $GUI_GR_LINE, 0, 56)
EndSwitch
GUICtrlSetGraphic($digit, $GUI_GR_REFRESH)
EndFunc
Func _MoveWindow()
Local $DifX, $DifY, $MouseData = GUIGetCursorInfo(@GUI_WinHandle)
Local $WinPos = WinGetPos(@GUI_WinHandle)
Local $MPos = MouseGetPos()
$DifX = $MPos[0] - $WinPos[0]
$DifY = $MPos[1] - $WinPos[1]
Do
Sleep(15)
$MPos = MouseGetPos()
$MouseData = GUIGetCursorInfo(@GUI_WinHandle)
Until ($WinPos[0] <> ($MPos[0] - $DifX)) Or ($WinPos[1] <> ($MPos[1] - $DifY)) Or (Not $MouseData[2])
While $MouseData[2]
$MPos = MouseGetPos()
$WinPos = WinGetPos(@GUI_WinHandle)
If ($WinPos[0] <> ($MPos[0] - $DifX)) Or ($WinPos[1] <> ($MPos[1] - $DifY)) Then
WinMove(@GUI_WinHandle, '', $MPos[0] - $DifX, $MPos[1] - $DifY)
EndIf
Sleep(15)
$MouseData = GUIGetCursorInfo(@GUI_WinHandle)
WEnd
EndFunc
Func _End()
Exit
EndFunc
Hallo,
einfach $file am Anfang des Scripts deklarieren dann sollte der Fehler weg sein, der Fehler kommt weil $file erst in der Funktion _fileopendialog deklariert wird.
Hallo,
es gibt scheinbar doch die Möglichkeit den Gerätetyp auszulesen und zwar mit der WMI-Klasse Win32_SystemEnclosure. Intressant ist hier der Wert ChassisTypes -> http://www.microsoft.com/technet/script…z.mspx?mfr=true
; Erstellt von AutoIt Scriptomatic
$wbemFlagReturnImmediately=0x10
$wbemFlagForwardOnly=0x20
$colItems=""
$strComputer="localhost"
$Output=""
$Output&="Computer: " &$strComputer & @CRLF
$Output&="==========================================" & @CRLF
$objWMIService=ObjGet("winmgmts:\\" &$strComputer &"\root\CIMV2")
$colItems=$objWMIService.ExecQuery("SELECT * FROM Win32_SystemEnclosure", "WQL", _
$wbemFlagReturnImmediately + $wbemFlagForwardOnly)
If IsObj($colItems) Then
For $objItem In $colItems
$Output&="AudibleAlarm: " &$objItem.AudibleAlarm & @CRLF
$Output&="BreachDescription: " &$objItem.BreachDescription & @CRLF
$Output&="CableManagementStrategy: " &$objItem.CableManagementStrategy & @CRLF
$Output&="Caption: " &$objItem.Caption & @CRLF
$strChassisTypes=$objItem.ChassisTypes(0)
$Output&="ChassisTypes: " &$strChassisTypes & @CRLF
$Output&="CreationClassName: " &$objItem.CreationClassName & @CRLF
$Output&="CurrentRequiredOrProduced: " &$objItem.CurrentRequiredOrProduced & @CRLF
$Output&="Depth: " &$objItem.Depth & @CRLF
$Output&="Description: " &$objItem.Description & @CRLF
$Output&="HeatGeneration: " &$objItem.HeatGeneration & @CRLF
$Output&="Height: " &$objItem.Height & @CRLF
$Output&="HotSwappable: " &$objItem.HotSwappable & @CRLF
$Output&="InstallDate: " & WMIDateStringToDate($objItem.InstallDate) & @CRLF
$Output&="LockPresent: " &$objItem.LockPresent & @CRLF
$Output&="Manufacturer: " &$objItem.Manufacturer & @CRLF
$Output&="Model: " &$objItem.Model & @CRLF
$Output&="Name: " &$objItem.Name & @CRLF
$Output&="NumberOfPowerCords: " &$objItem.NumberOfPowerCords & @CRLF
$Output&="OtherIdentifyingInfo: " &$objItem.OtherIdentifyingInfo & @CRLF
$Output&="PartNumber: " &$objItem.PartNumber & @CRLF
$Output&="PoweredOn: " &$objItem.PoweredOn & @CRLF
$Output&="Removable: " &$objItem.Removable & @CRLF
$Output&="Replaceable: " &$objItem.Replaceable & @CRLF
$Output&="SecurityBreach: " &$objItem.SecurityBreach & @CRLF
$Output&="SecurityStatus: " &$objItem.SecurityStatus & @CRLF
$Output&="SerialNumber: " &$objItem.SerialNumber & @CRLF
$strServiceDescriptions=$objItem.ServiceDescriptions(0)
$Output&="ServiceDescriptions: " &$strServiceDescriptions & @CRLF
$strServicePhilosophy=$objItem.ServicePhilosophy(0)
$Output&="ServicePhilosophy: " &$strServicePhilosophy & @CRLF
$Output&="SKU: " &$objItem.SKU & @CRLF
$Output&="SMBIOSAssetTag: " &$objItem.SMBIOSAssetTag & @CRLF
$Output&="Status: " &$objItem.Status & @CRLF
$Output&="Tag: " &$objItem.Tag & @CRLF
$strTypeDescriptions=$objItem.TypeDescriptions(0)
$Output&="TypeDescriptions: " &$strTypeDescriptions & @CRLF
$Output&="Version: " &$objItem.Version & @CRLF
$Output&="VisibleAlarm: " &$objItem.VisibleAlarm & @CRLF
$Output&="Weight: " &$objItem.Weight & @CRLF
$Output&="Width: " &$objItem.Width & @CRLF
If Msgbox(1, "WMI-Ausgabe", $Output)=2 then ExitLoop
$Output=""
Next
Else
Msgbox(0, "WMI-Ausgabe","Keine WMI-Objekte gefunden für Klasse: " & "Win32_SystemEnclosure")
Endif
Func WMIDateStringToDate($dtmDate)
Return (StringMid($dtmDate, 5, 2) &"/" &StringMid($dtmDate, 7, 2) &"/" &StringLeft($dtmDate, 4) & " " &StringMid($dtmDate, 9, 2) &":" &StringMid($dtmDate, 11, 2) &":" &StringMid($dtmDate,13, 2))
EndFunc
Hallo,
ich hatte da vor einiger Zeit mal eine Funktion für geschrieben!
; ==========================================================================================================================
; Name: GetNetInfo
; Description: Ermittelt aus IP-Adresse/Netzadresse und Subnetmaske einige Netzinformationen
;
; Parameter(s): $szIP = IP-Adresse/Netzadresse
; $szSN = Subnetmaske
; $cInfo = Gibt an welche Information zurückgegeben werden soll
; -1 = alle als Array (Standard)
; 0 = Netzadresse als String
; 1 = Broadcastadresse als String
; 2 = kleinste Hostadresse als String
; 3 = größte Hostadresse als String
;
; Requirement(s): keine
; Return Value(s): Array oder String mit gewünschter Information
;
; Author(s): bernd670
; ==========================================================================================================================
Func GetNetInfo($szIP, $szSN, $cInfo=-1)
Local $aszIP = StringSplit($szIP, "."), $dwIP
Local $aszSN = StringSplit($szSN, "."), $dwSN
Local $dwBC, $dwNA, $dwHostMin, $dwHostMax
Local $aszNI[4]
$dwIP = BitOR(BitShift(BitOR(BitShift(BitOR(BitShift($aszIP[1],-8),$aszIP[2]),-8),$aszIP[3]),-8),$aszIP[4])
$dwSN = BitOR(BitShift(BitOR(BitShift(BitOR(BitShift($aszSN[1],-8),$aszSN[2]),-8),$aszSN[3]),-8),$aszSN[4])
$dwBC = BitOR($dwIP, BitXOR($dwSN,0xFFFFFFFF))
$dwNA = BitAND($dwIP, $dwSN)
$dwHostMin = BitAND($dwBC,$dwSN+1)
$dwHostMax = BitAND($dwBC,0xFFFFFFFE)
$aszNI[0] = BitAND(BitShift($dwNA,24),255) & "." & BitAND(BitShift($dwNA,16),255) & "." & BitAND(BitShift($dwNA,8),255) & "." & BitAND($dwNA,255)
$aszNI[1] = BitAND(BitShift($dwBC,24),255) & "." & BitAND(BitShift($dwBC,16),255) & "." & BitAND(BitShift($dwBC,8),255) & "." & BitAND($dwBC,255)
$aszNI[2] = BitAND(BitShift($dwHostMin,24),255) & "." & BitAND(BitShift($dwHostMin,16),255) & "." & BitAND(BitShift($dwHostMin,8),255) & "." & BitAND($dwHostMin,255)
$aszNI[3] = BitAND(BitShift($dwHostMax,24),255) & "." & BitAND(BitShift($dwHostMax,16),255) & "." & BitAND(BitShift($dwHostMax,8),255) & "." & BitAND($dwHostMax,255)
If $cInfo = -1 Then
Return $aszNI
Else
Return $aszNI[$cInfo]
EndIf
EndFunc ;==>GetNetInfo
Hallo,
wie ist es wenn Du die Grafik einfach mit dem Hintergrund übermalst, evtl. kannst Du ja nur die nicht mehr benötigten Elemente übermalen.
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <StaticConstants.au3>
Opt('MustDeclareVars', 1)
Opt('GUIOnEventMode', 1)
Global $dig[10]
GUICreate('test', 800, 480, -1, -1, $WS_POPUP, BitOr($WS_EX_TOOLWINDOW, $WS_EX_LAYERED))
GUISetOnEvent($GUI_EVENT_CLOSE,'_End')
GUISetBKColor(0xC0C0C0) ; Hintergrundfarbe setzen
$dig[8] = GUICtrlCreateGraphic(0, 0, 32, 56)
GUICtrlSetBkColor(-1, 0xC0C0C0)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0, 0xffff88)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0, 0) ; a
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 8, ![]()
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 24, ![]()
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 32, 0)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 32, 0) ; b
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 24, ![]()
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 24, 24)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 32, 28)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 32, 28) ; c
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 24, 32)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 24, 48)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 32, 56)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0, 56) ; d
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 8, 48)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 24, 48)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 32, 56)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0, 28) ; e
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 8, 32)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 8, 48)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 0, 56)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0, 0) ; f
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 8, ![]()
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 8, 24)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 0, 28)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0, 28) ; g
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 8, 24)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 24, 24)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 32, 28)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 24, 32)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 8, 32)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 0, 28)
GUICtrlCreatePic(@ScriptDir & '\nicht loeschen.gif', 0, 0, 1, 1) ; wird für die Transparenz benötigt (nicht löschen)
GUISetState()
[/autoit] [autoit][/autoit] [autoit]Sleep(2000)
[/autoit] [autoit][/autoit] [autoit]GUICtrlSetGraphic($dig[8], $GUI_GR_COLOR, 0xC0C0C0, 0xC0C0C0)
GUICtrlSetGraphic($dig[8], $GUI_GR_MOVE, 0, 0)
GUICtrlSetGraphic($dig[8], $GUI_GR_LINE, 0, 56)
GUICtrlSetGraphic($dig[8], $GUI_GR_LINE, 32, 56)
GUICtrlSetGraphic($dig[8], $GUI_GR_LINE, 32, 0)
GUICtrlSetGraphic($dig[8], $GUI_GR_COLOR, 0, 0xffff88)
GUICtrlSetGraphic($dig[8], $GUI_GR_MOVE, 0, 0) ; a
GUICtrlSetGraphic($dig[8], $GUI_GR_LINE, 8, ![]()
GUICtrlSetGraphic($dig[8], $GUI_GR_LINE, 24, ![]()
GUICtrlSetGraphic($dig[8], $GUI_GR_LINE, 32, 0)
GUICtrlSetGraphic($dig[8], $GUI_GR_MOVE, 32, 0) ; b
GUICtrlSetGraphic($dig[8], $GUI_GR_LINE, 24, ![]()
GUICtrlSetGraphic($dig[8], $GUI_GR_LINE, 24, 24)
GUICtrlSetGraphic($dig[8], $GUI_GR_LINE, 32, 28)
GUICtrlSetGraphic($dig[8], $GUI_GR_MOVE, 32, 28) ; c
GUICtrlSetGraphic($dig[8], $GUI_GR_LINE, 24, 32)
GUICtrlSetGraphic($dig[8], $GUI_GR_LINE, 24, 48)
GUICtrlSetGraphic($dig[8], $GUI_GR_LINE, 32, 56)
GUICtrlSetGraphic($dig[8], $GUI_GR_REFRESH)
While 1
Sleep(100)
WEnd
Func _End()
Exit
EndFunc
Hallo,
ContinueCase ist nicht zum Beenden von einem Case-Zweig sondern zum Ausführen des nächsten Case-Zweig ohne Überprüfung der Bedingung!
Hallo,
man könnte es mit Timern lösen!
#include <GUIConstants.au3>
#Include <Timers.au3>
Local $idTimer1 = -1, $idTimer2 = -1, $idTimer21 = -1, $idTimer22 = -1
Local $tTimer1 = 0, $tTimer2 = 0, $tTimer21 = 0, $tTimer22 = 0
$frmTest = GUICreate("test",700,400)
$tab = GUICtrlCreateTab ( 10, 10, 680, 350)
$button1 = GUICtrlCreateButton ("Notizen",640,370)
$button2 = GUICtrlCreateButton ("Editor schließen",10,370)
$tabitem = GUICtrlCreateTabItem ("TestTabItem")
$checkbox1 = GUICtrlCreateCheckbox ( "Checkbox1", 100,50)
$checkbox2 = GUICtrlCreateCheckbox ("Checkbox2",300,50)
$slider1 = GUICtrlCreateSlider (100,100,200,20)
$tabitem2 = GUICtrlCreateTabItem("test2")
$checkbox21 = GUICtrlCreateCheckbox ("3",120,70)
$checkbox22 = GUICtrlCreateCheckbox ("4",200,70)
$input1 = GUICtrlCreateInput("",150,70)
GUICtrlSetData($input1,5000,1)
$input2 = GUICtrlCreateInput("",230,70)
GUICtrlSetData($input2,5000,1)
GUICtrlSetLimit($slider1,5000,1000)
GUISetState(@SW_SHOW)
GUICtrlSetData($slider1, 2,0)
While 1
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $button1
Run("notepad.exe")
Case $button2
ProcessClose("notepad.exe")
EndSwitch
If BitAnd(GUICtrlRead($checkbox1),$GUI_CHECKED) = $GUI_CHECKED Then
If $idTimer1 = -1 Or $tTimer1 <> GUICtrlRead($Slider1) Then
$tTimer1 = GUICtrlRead($Slider1)
$idTimer1 = _Timer_SetTimer($frmTest, $tTimer1, "Timer1", $idTimer1)
EndIf
Else
If $idTimer1 <> -1 Then
_Timer_KillTimer($frmTest, $idTimer1)
$idTimer1 = -1
EndIf
EndIf
If BitAnd(GUICtrlRead($checkbox2),$GUI_CHECKED) = $GUI_CHECKED Then
If $idTimer2 = -1 Or $tTimer2 <> GUICtrlRead($Slider1) Then
$tTimer2 = GUICtrlRead($Slider1)
$idTimer2 = _Timer_SetTimer($frmTest, $tTimer2, "Timer2", $idTimer2)
EndIf
Else
If $idTimer2 <> -1 Then
_Timer_KillTimer($frmTest, $idTimer2)
$idTimer2 = -1
EndIf
EndIf
If BitAnd(GUICtrlRead($checkbox21),$GUI_CHECKED) = $GUI_CHECKED Then
If $idTimer21 = -1 Or $tTimer21 <> GUICtrlRead($input1) Then
$tTimer21 = GUICtrlRead($input1)
$idTimer21 = _Timer_SetTimer($frmTest, $tTimer21, "Timer21", $idTimer21)
EndIf
Else
If $idTimer21 <> -1 Then
_Timer_KillTimer($frmTest, $idTimer21)
$idTimer21 = -1
EndIf
EndIf
If BitAnd(GUICtrlRead($checkbox22),$GUI_CHECKED) = $GUI_CHECKED Then
If $idTimer22 = -1 Or $tTimer22 <> GUICtrlRead($input2) Then
$tTimer22 = GUICtrlRead($input2)
$idTimer22 = _Timer_SetTimer($frmTest, $tTimer22, "Timer22", $idTimer22)
EndIf
Else
If $idTimer22 <> -1 Then
_Timer_KillTimer($frmTest, $idTimer22)
$idTimer22 = -1
EndIf
EndIf
WEnd
Func Timer1($hWnd, $Msg, $iIDTimer, $dwTime)
#forceref $hWnd, $Msg, $iIDTimer, $dwTime
If WinExists("Unbenannt - Editor") Then
ControlSend("Unbenannt - Editor", "", "Edit1", "1")
EndIf
EndFunc
Func Timer2($hWnd, $Msg, $iIDTimer, $dwTime)
#forceref $hWnd, $Msg, $iIDTimer, $dwTime
If WinExists("Unbenannt - Editor") Then
ControlSend("Unbenannt - Editor", "", "Edit1", "2")
EndIf
EndFunc
Func Timer21($hWnd, $Msg, $iIDTimer, $dwTime)
#forceref $hWnd, $Msg, $iIDTimer, $dwTime
If WinExists("Unbenannt - Editor") Then
ControlSend("Unbenannt - Editor", "", "Edit1", "3")
EndIf
EndFunc
Func Timer22($hWnd, $Msg, $iIDTimer, $dwTime)
#forceref $hWnd, $Msg, $iIDTimer, $dwTime
If WinExists("Unbenannt - Editor") Then
ControlSend("Unbenannt - Editor", "", "Edit1", "4")
EndIf
EndFunc
PS: Geht nur mit der aktuellen Version oder der letzten Beta!