Hi,
geht DirMove da wirklich nicht?
So long,
Mega
Hi,
geht DirMove da wirklich nicht?
So long,
Mega
Hi,
oh man lies doch die Hilfe.
[autoit];----- example 1 ----
#include <GUIConstants.au3>
GUICreate("My GUI picture",350,300,-1,-1,$WS_SIZEBOX+$WS_SYSMENU) ; will create a dialog box that when displayed is centered
GUISetBkColor (0xE0FFFF)
$n=GUICtrlCreatePic(@Systemdir & "\oobe\images\mslogo.jpg",50,50, 200,50, $SS_NOTIFY)
GUISetState ()
[/autoit][autoit][/autoit][autoit]; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
If $msg = $n Then MsgBox(0,"", "Ey, sollst du mich klicken!!", 5)
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend
So long,
Mega
in die Styles gucken.
So long,
Mega
Hi,
kannst ja meine Lösung noch probieren, ohne externe Tools.
So long,
Mega
Hi,
#include-once
;======================================
; _ZipFunctions.au3 -- v1.0 -- 20 June, 2006
; An AutoIT User Defined Function (UDF) file.
;
; Requires AutoIT 3.1.127 or later.
; Uses the native compression API of Windows XP, Windows 2003, or later.
;
; By PsaltyDS at http://www.autoitscript.com/forum
; Includes code from other forum users, especially as posted at:
; http://www.autoitscript.com/forum/index.php?showtopic=21004
;
; Includes the following functions:
; _ZipCreate($sZip, $iFlag = 0)
; _ZipAdd($sZip, $sSrc)
; _ZipList($sZip)
; _UnZip($sZip, $sDest)
; See each function below for full usage.
;======================================
;----------------------------------
; Function _ZipCreate($sZip, $iFlag = 0)
; Creates an empty .zip archive file.
; Where:
; $sZip is the .zip file to create
; $iFlag: 0 = prompts to overwrite (default)
; 1 = overwrite without prompt
; Returns 1 on success, 0 for fail
; On fail, @Error is:
; 1 = Not permitted to overwrite
; 2 = FileOpen failed
; 3 = FileWrite failed
;----------------------------------
Func _ZipCreate($sZip, $iFlag = 0)
; Test zip file
If FileExists($sZip) Then
If Not $iFlag Then
If MsgBox(32 + 4, "Zip Functions UDF", "Click YES to overwrite existing archive file: " & @CRLF & _
@TAB & $sZip) <> 6 Then Return SetError(1, 0, 0)
EndIf
EndIf
; Create header data
Local $sHeader = Chr(80) & Chr(75) & Chr(5) & Chr(6)
For $i = 1 To 18
$sHeader &= Chr(0)
Next
; Create empty zip file
$hFile = FileOpen($sZip, 8 + 2); Mode = Create folder, Overwrite
If $hFile <> - 1 Then
If FileWrite($hFile, $sHeader) Then
FileClose($hFile)
Return 1
Else
Return SetError(3, 0, 0)
EndIf
Else
Return SetError(2, 0, 0)
EndIf
EndFunc ;==>_ZipCreate
;----------------------------------
; Function _ZipAdd($sZip, $sSrc)
; Adds a file or folder to a pre-existing .zip archive.
; Where:
; $sZip is the .zip file to add to
; $sSrc is the source file or folder to add
; Returns 1 on success, 0 for fail
; On fail, @Error is:
; 1 = Creating Zip file failed [@Extended = @Error from _ZipCreate()]
; 2 = Source did not exist
; 3 = Shell ObjCreate error
; 4 = Zip file namespace object error
; 5 = Error copying data
;----------------------------------
Func _ZipAdd($sZip, $sSrc)
; Test zip file and create if required
If Not FileExists($sZip) Then
If Not _ZipCreate($sZip) Then Return SetError(1, @error, 0)
EndIf
; Test source
If FileExists($sSrc) Then
; Create shell object
Local $oShell = ObjCreate('Shell.Application')
If Not @error And IsObj($oShell) Then
; Get zip file object
Local $oFolder = $oShell.NameSpace ($sZip)
If Not @error And IsObj($oFolder) Then
; Copy source file or folder to zip file
If StringInStr(FileGetAttrib($sSrc), "D") Then
$oFolder.CopyHere ($oShell.NameSpace ($sSrc).items)
Else
$oFolder.CopyHere ($sSrc)
EndIf
Sleep(1000)
If @error Then
Return SetError(5, 0, 0)
Else
Return 1
EndIf
Else
Return SetError(4, 0, 0)
EndIf
Else
Return SetError(3, 0, 0)
EndIf
Else
Return SetError(2, 0, 0)
EndIf
EndFunc ;==>_ZipAdd
;----------------------------------
; Function _ZipList($sZip)
; List the contents of a .zip archive file
; Where: $sZip is the .zip file
; On Success, returns a 1D array of items in the zip file, with [0]=count
; On fail, returns array with [0]=0 and @Error is:
; 1 = Zip file did not exist
; 2 = Shell ObjCreate error
; 3 = Zip file namespace object error
; 4 = Error copying data
;----------------------------------
Func _ZipList($sZip)
Local $aNames[1] =[0], $i
; Test zip file
If FileExists($sZip) Then
; Create shell object
Local $oShell = ObjCreate('Shell.Application')
If Not @error And IsObj($oShell) Then
; Get zip file object
Local $oFolder = $oShell.NameSpace ($sZip)
If Not @error And IsObj($oFolder) Then
; Get list of items
Local $oItems = $oFolder.Items ()
If Not @error And IsObj($oItems) Then
; Read items into array
For $i In $oItems
$aNames[0] += 1
ReDim $aNames[$aNames[0] + 1]
$aNames[$aNames[0]] = $oFolder.GetDetailsOf ($i, 0)
Next
Else
SetError(4)
EndIf
Else
SetError(3)
EndIf
Else
SetError(2)
EndIf
Else
SetError(1)
EndIf
Return $aNames
EndFunc ;==>_ZipList
;----------------------------------
; Function _UnZip($sZip, $sDest)
; Uncompress items from a .zip file a destination folder.
; Where:
; $sZip is the .zip file
; $sDest is the folder to uncompress to (without trailing '\')
; Returns 1 on success, 0 for fail
; On fail, @Error is:
; 1 = Source zip file did not exist
; 2 = Error creating destination folder
; 3 = Shell ObjCreate error
; 4 = Zip file namespace object error
; 5 = Error creating item list object
; 6 = Destination folder namespace object error
; 7 = Error copying data
;----------------------------------
Func _UnZip($sZip, $sDest)
; Test zip file
If FileExists($sZip) Then
; Test destination folder
If Not FileExists($sDest & "\") Then
If Not DirCreate($sDest) Then Return SetError(2, 0, 0)
EndIf
; Create shell object
Local $oShell = ObjCreate('Shell.Application')
If Not @error And IsObj($oShell) Then
; Get zip file namespace object
Local $oFolder = $oShell.NameSpace ($sZip)
If Not @error And IsObj($oFolder) Then
; Get list of items in zip file
Local $oItems = $oFolder.Items ()
If Not @error And IsObj($oItems) Then
; Get destination folder namespace object
$oDest = $oShell.NameSpace ($sDest & "\")
If Not @error And IsObj($oDest) Then
; Copy the files
$oDest.CopyHere ($oItems)
Sleep(500)
If @error = 0 Then
Return 1
Else
Return SetError(7, 0, 0)
EndIf
Else
Return SetError(6, 0, 0)
EndIf
Else
Return SetError(5, 0, 0)
EndIf
Else
Return SetError(4, 0, 0)
EndIf
Else
Return SetError(3, 0, 0)
EndIf
Else
Return SetError(1, 0, 0)
EndIf
EndFunc ;==>_UnZip
Beispiel:
#include<zip.au3>
Global $zipPath = "c:\Downloads\KeePass-1.10.zip"
Global $desPath = 'C:\Test\
MsgBox(64, "Return", _UnZip($zipPath, $desPath))
So long,
Mega
Hi,
man sollte vielleicht auch mal den Sinn hinterfragen. Warum sollen mehrere Fenster aupoppen? Mich würde das als User nerven. Entweder ein Fenster zeigt mir alle Informationen an, oder ...!?!
Ansonsten kann ich leviathan nur Recht geben. Einfach viele GUIs machen.
So long,
Mega
HI,
siehe post davor. Pixelchecksum wird dir leider nicht weiterhelfen, da die Zahlen unterschiedlich groß sind.
Kannst du evtl. einfach immer alle durchklicken bis es klappt? ![]()
So long,
Mega
Hi,
versuch doch einfach die Abfrage anzuzeigen und dann die Chechsumme auszuwerten.
Nein, das alte Skript hilft hier glaube ich nicht.
Edit: Habe gerade mal geguckt, da die Zahlen untschiedlich groß sind, wird meine Methode nicht zum Ziel führen.
So long,
Mega
Hi,
habe den Titel mal angepaßt.
Du kannst versuchen (wenn die Anzeige immer an derselben Stelle erscheint), mit Pixelchecksum den Wert der Zahl zu ermitteln und ihn anschließend suchen lassen.
So long,
Mega
Hi,
deshalb hatte ich ja den Wink mit der Staumauer zu den DllCalls gegeben. ![]()
Evtl. könnte man die Anzeige nach mit weiteren Informationen bestücken, oder würde dies den Zweck der Anwendung sprengen?
So long,
Mega
Hi,
nimm lieber dies:
[autoit]If Not _ejectUSB() = 1 Then MsgBox(16, 'Error', 'Es ist ein Fehler aufgetreten!', 5)
[/autoit][autoit][/autoit][autoit]Func _ejectUSB($drive = '')
Local $path = @TempDir & '\12345USB54321.exe'
If $drive = '' Or $drive = Default Then $drive = StringLeft(@ScriptDir, 2)
If $cmdLine[0] = 1 And ($cmdLine[1] = '-?' Or $cmdLine[1] = '/?') Then
MsgBox(64, 'Information', 'Parameter : (Drive) e.g. : E:', 5)
Exit (0)
EndIf
If $cmdLine[0] = 1 Then $drive = $cmdLine[1]
FileInstall('EjectMedia.exe', $path, 1)
If Not FileExists($drive) Then Return -1
If Not FileExists($path) Then Return -2
Run($path & ' ' & $drive & ' -l -f -s -w:1000', @TempDir, @SW_HIDE)
Return 1
EndFunc ;==>_ejectUSB
So long,
Mega
Hi,
naja es sieht aber ziemlich komisch aus, wenn man es an den rechten Rand dockt und dann einfahren läßt. ![]()
So long,
Mega
Hi,
ich meinte auch, dass du es erstmal lokal probieren sollst (server & Client auf einem PC)
So long,
Mega
Hi,
habe mir deinen Code nicht angeguckt, aber probier doch mal ob dies läuft.
http://www.autoitscript.com/forum/index.php?showtopic=31627&st=0&p=226731&#entry226731
So long,
Mega
Hi,
die Doppelpunkte passen sich nicht mit an. Vielleicht möchtest du ja noch dies einbauen:
;CONSTANTS
Global Const $AW_FADE_IN = 0x00080000;fade-in
Global Const $AW_FADE_OUT = 0x00090000;fade-out
Global Const $AW_SLIDE_IN_LEFT = 0x00040001;slide in from left
Global Const $AW_SLIDE_OUT_LEFT = 0x00050002;slide out to left
Global Const $AW_SLIDE_IN_RIGHT = 0x00040002;slide in from right
Global Const $AW_SLIDE_OUT_RIGHT = 0x00050001;slide out to right
Global Const $AW_SLIDE_IN_TOP = 0x00040004;slide-in from top
Global Const $AW_SLIDE_OUT_TOP = 0x00050008;slide-out to top
Global Const $AW_SLIDE_IN_BOTTOM = 0x00040008;slide-in from bottom
Global Const $AW_SLIDE_OUT_BOTTOM = 0x00050004;slide-out to bottom
Global Const $AW_DIAG_SLIDE_IN_TOPLEFT = 0x00040005;diag slide-in from Top-left
Global Const $AW_DIAG_SLIDE_OUT_TOPLEFT = 0x0005000a;diag slide-out to Top-left
Global Const $AW_DIAG_SLIDE_IN_TOPRIGHT = 0x00040006;diag slide-in from Top-Right
Global Const $AW_DIAG_SLIDE_OUT_TOPRIGHT = 0x00050009;diag slide-out to Top-Right
Global Const $AW_DIAG_SLIDE_IN_BOTTOMLEFT = 0x00040009;diag slide-in from Bottom-left
Global Const $AW_DIAG_SLIDE_OUT_BOTTOMLEFT = 0x00050006;diag slide-out to Bottom-left
Global Const $AW_DIAG_SLIDE_IN_BOTTOMRIGHT = 0x0004000a;diag slide-in from Bottom-right
Global Const $AW_DIAG_SLIDE_OUT_BOTTOMRIGHT = 0x00050005;diag slide-out to Bottom-right
Global Const $AW_EXPLODE = 0x00040010;explode
Global Const $AW_IMPLODE = 0x00050010;implode
Func _WinAnimate($v_gui, $i_mode, $i_duration = 1000)
If @OSVersion = "WIN_XP" OR @OSVersion = "WIN_2000" Then
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", WinGetHandle($v_gui), "int", $i_duration, "long", $i_mode)
Local $ai_gle = DllCall('kernel32.dll', 'int', 'GetLastError')
If $ai_gle[0] <> 0 Then
SetError(1)
Return 0
EndIf
Return 1
EndIf
EndFunc;==> _WinAnimate()
;#cs DEMO - For lazy guys like me - to copy paste
$hwnd = GUICreate("AnimateWindow - Demo", 300, 300)
_WinAnimate($hwnd, $AW_FADE_IN)
ConsoleWrite('er: ' & @error & @LF & 'ex: ' & @extended & @CRLF)
Sleep(1500)
_WinAnimate($hwnd, $AW_FADE_OUT)
ConsoleWrite('er: ' & @error & @LF & 'ex: ' & @extended & @CRLF)
Sleep(1500)
_WinAnimate($hwnd, $AW_SLIDE_IN_LEFT)
ConsoleWrite('er: ' & @error & @LF & 'ex: ' & @extended & @CRLF)
Sleep(1500)
_WinAnimate($hwnd, $AW_SLIDE_OUT_LEFT)
ConsoleWrite('er: ' & @error & @LF & 'ex: ' & @extended & @CRLF)
Sleep(1500)
_WinAnimate($hwnd, $AW_SLIDE_IN_RIGHT)
ConsoleWrite('er: ' & @error & @LF & 'ex: ' & @extended & @CRLF)
Sleep(1500)
_WinAnimate($hwnd, $AW_SLIDE_OUT_RIGHT)
ConsoleWrite('er: ' & @error & @LF & 'ex: ' & @extended & @CRLF)
Sleep(1500)
_WinAnimate($hwnd, $AW_SLIDE_IN_TOP)
ConsoleWrite('er: ' & @error & @LF & 'ex: ' & @extended & @CRLF)
Sleep(1500)
_WinAnimate($hwnd, $AW_SLIDE_OUT_TOP)
ConsoleWrite('er: ' & @error & @LF & 'ex: ' & @extended & @CRLF)
Sleep(1500)
_WinAnimate($hwnd, $AW_SLIDE_IN_BOTTOM)
ConsoleWrite('er: ' & @error & @LF & 'ex: ' & @extended & @CRLF)
Sleep(1500)
_WinAnimate($hwnd, $AW_SLIDE_OUT_BOTTOM)
ConsoleWrite('er: ' & @error & @LF & 'ex: ' & @extended & @CRLF)
Sleep(1500)
_WinAnimate($hwnd, $AW_DIAG_SLIDE_IN_TOPLEFT)
ConsoleWrite('er: ' & @error & @LF & 'ex: ' & @extended & @CRLF)
Sleep(1500)
_WinAnimate($hwnd, $AW_DIAG_SLIDE_OUT_TOPLEFT)
ConsoleWrite('er: ' & @error & @LF & 'ex: ' & @extended & @CRLF)
Sleep(1500)
_WinAnimate($hwnd, $AW_DIAG_SLIDE_IN_TOPRIGHT)
ConsoleWrite('er: ' & @error & @LF & 'ex: ' & @extended & @CRLF)
Sleep(1500)
_WinAnimate($hwnd, $AW_DIAG_SLIDE_OUT_TOPRIGHT)
ConsoleWrite('er: ' & @error & @LF & 'ex: ' & @extended & @CRLF)
Sleep(1500)
_WinAnimate($hwnd, $AW_DIAG_SLIDE_IN_BOTTOMLEFT)
ConsoleWrite('er: ' & @error & @LF & 'ex: ' & @extended & @CRLF)
Sleep(1500)
_WinAnimate($hwnd, $AW_DIAG_SLIDE_OUT_BOTTOMLEFT)
ConsoleWrite('er: ' & @error & @LF & 'ex: ' & @extended & @CRLF)
Sleep(1500)
_WinAnimate($hwnd, $AW_DIAG_SLIDE_IN_BOTTOMRIGHT)
ConsoleWrite('er: ' & @error & @LF & 'ex: ' & @extended & @CRLF)
Sleep(1500)
_WinAnimate($hwnd, $AW_DIAG_SLIDE_OUT_BOTTOMRIGHT)
ConsoleWrite('er: ' & @error & @LF & 'ex: ' & @extended & @CRLF)
Sleep(1500)
_WinAnimate($hwnd, $AW_EXPLODE)
ConsoleWrite('er: ' & @error & @LF & 'ex: ' & @extended & @CRLF)
Sleep(1500)
_WinAnimate($hwnd, $AW_IMPLODE)
ConsoleWrite('er: ' & @error & @LF & 'ex: ' & @extended & @CRLF)
;#ce
So long,
Mega
Hi,
[autoit];ejectUSB
Global $re = _ejectUSB('z:')
If $re Then
MsgBox(64, 'Info', 'Der USB-Stick wurde erfolgreich beendet!', 3)
Else
MsgBox(16, 'Info', 'Fehler: ' & $re)
EndIf
Func _ejectUSB($drive = '')
Local $path = @ScriptDir & '\ejectUSB.exe'
If $drive = '' Or $drive = Default Then $drive = StringLeft(@ScriptDir, 2)
FileInstall('deveject.exe', $path, 0)
If Not FileExists($path) Then Return -1
If ShellExecuteWait($path, '-EjectDrive:' & $drive, @ScriptDir, 'Open', @SW_HIDE) = 0 Then
FileDelete($path)
Return 1
Else
FileDelete($path)
EndIf
Return 0
EndFunc ;==>_ejectUSB
So long,
Mega
Hi,
schöne Funktion
und ja es sind Unterschiede!
So long,
Mega
Hi,
das ist ein "harter" Crash von Auoit. Nutze die Opt Debug um zu sehen, in welcher Zeile du bist, oder bau dir eine Version mit einem Log.
So long,
Mega
Hi,
guck die mal :
DevCon von Microsoft
DevEject von c't
an. Mit einer Kombination der beiden Tools solltest du es hinbekommen.
So long,
Mega