Hi,
dafür ist kein Task nötig. Du kannst das Skript sich auch einfach selbst neu starten lassen und vorher beenden.
Aber erstmal Oscars Vorschlag checken!
Mega
Hi,
dafür ist kein Task nötig. Du kannst das Skript sich auch einfach selbst neu starten lassen und vorher beenden.
Aber erstmal Oscars Vorschlag checken!
Mega
Hi,
am einfachsten ist es wie gezeigt Bilder zu nahmen und dort auf notify abzuprüfen. Somit dienen dir Bilder / Labels etc. als Buttons.
Mega
Suche mal nach rekursiv.
Mega
Hi,
könnte man das nicht in das Run after schreiben beim Compile.
Mega
Habs so getestet. Geht einwandfrei.
$splitname2 = 10
$infotext = FileOpen(@ScriptDir & "\Temp\infos\info.txt", 10)
MsgBox(0, "", $splitname2)
;~ MsgBox(0, "", $video_size)
;~ MsgBox(0, "", $video_codec)
;~ MsgBox(0, "", $video_length)
;~ MsgBox(0, "", $vid_resolution)
FileWrite($infotext, $splitname2)
;~ FileWrite($infotext, $video_size)
;~ FileWrite($infotext, $video_codec)
;~ FileWrite($infotext, $video_length)
;~ FileWrite($infotext, $vid_resolution)
FileClose($infotext)
Mega
;===============================================================================
;
; Description: lists all or preferred files and or folders in a specified path (Similar to using Dir with the /B Switch)
; Syntax: _FileListToArrayEx($sPath, $sFilter = '*.*', $iFlag = 0, $sExclude = '')
; Parameter(s): $sPath = Path to generate filelist for
; $sFilter = The filter to use. Search the Autoit3 manual for the word "WildCards" For details, support now for multiple searches
; Example *.exe; *.txt will find all .exe and .txt files
; $iFlag = determines weather to return file or folders or both.
; $sExclude = exclude a file from the list by all or part of its name
; Example: Unins* will remove all files/folders that start with Unins
; $iFlag=0(Default) Return both files and folders
; $iFlag=1 Return files Only
; $iFlag=2 Return Folders Only
;
; Requirement(s): None
; Return Value(s): On Success - Returns an array containing the list of files and folders in the specified path
; On Failure - Returns the an empty string "" if no files are found and sets @Error on errors
; @Error or @extended = 1 Path not found or invalid
; @Error or @extended = 2 Invalid $sFilter or Invalid $sExclude
; @Error or @extended = 3 Invalid $iFlag
; @Error or @extended = 4 No File(s) Found
;
; Author(s): SmOke_N
; Note(s): The array returned is one-dimensional and is made up as follows:
; $array[0] = Number of Files\Folders returned
; $array[1] = 1st File\Folder
; $array[2] = 2nd File\Folder
; $array[3] = 3rd File\Folder
; $array[n] = nth File\Folder
;
; All files are written to a "reserved" .tmp file (Thanks to gafrost) for the example
; The Reserved file is then read into an array, then deleted
;===============================================================================
#include<array.au3>
$hFilesFolders = _FileListToArrayEx("c:\Downloads", '*.au3;*.txt', Default, "")
[/autoit] [autoit][/autoit] [autoit]_ArrayDisplay($hFilesFolders, 'Exe and Txt')
Func _FileListToArrayEx($sPath, $sFilter = '*.*', $iFlag = 0, $sExclude = '')
If Not FileExists($sPath) Then Return SetError(1, 1, '')
If $sFilter = -1 Or $sFilter = Default Then $sFilter = '*.*'
If $iFlag = -1 Or $iFlag = Default Then $iFlag = 0
If $sExclude = -1 Or $sExclude = Default Then $sExclude = ''
Local $aBadChar[6] = ['\', '/', ':', '>', '<', '|']
For $iCC = 0 To 5
If StringInStr($sFilter, $aBadChar[$iCC]) Or _
StringInStr($sExclude, $aBadChar[$iCC]) Then Return SetError(2, 2, '')
Next
If StringStripWS($sFilter,
= '' Then Return SetError(2, 2, '')
If Not ($iFlag = 0 Or $iFlag = 1 Or $iFlag = 2) Then Return SetError(3, 3, '')
Local $oFSO = ObjCreate("Scripting.FileSystemObject"), $sTFolder
$sTFolder = $oFSO.GetSpecialFolder(2)
Local $hOutFile = @TempDir & $oFSO.GetTempName
If Not StringInStr($sFilter, ';') Then $sFilter &= ';'
Local $aSplit = StringSplit(StringStripWS($sFilter, 8), ';'), $sRead
For $iCC = 1 To $aSplit[0]
If StringStripWS($aSplit[$iCC],
= '' Then ContinueLoop
If StringLeft($aSplit[$iCC], 1) = '.' And _
UBound(StringSplit($aSplit[$iCC], '.')) - 2 = 1 Then $aSplit[$iCC] = '*' & $aSplit[$iCC]
RunWait(@ComSpec & ' /c ' & 'dir "' & $sPath & '\' & $aSplit[$iCC] _
& '" /b /o-e /od > "' & $hOutFile & '"', '', @SW_HIDE)
$sRead &= FileRead($hOutFile)
If Not FileExists($hOutFile) Then Return SetError(4, 4, '')
FileDelete($hOutFile)
Next
If StringStripWS($sRead,
= '' Then SetError(4, 4, '')
Local $aFSplit = StringSplit(StringTrimRight(StringStripCR($sRead), 1), @LF)
Local $sHold
For $iCC = 1 To $aFSplit[0]
If $sExclude And StringLeft($aFSplit[$iCC], _
StringLen(StringReplace($sExclude, '*', ''))) = StringReplace($sExclude, '*', '') Then ContinueLoop
Switch $iFlag
Case 0
$sHold &= $aFSplit[$iCC] & Chr(1)
Case 1
If StringInStr(FileGetAttrib($sPath & '\' & $aFSplit[$iCC]), 'd') Then ContinueLoop
$sHold &= $aFSplit[$iCC] & Chr(1)
Case 2
If Not StringInStr(FileGetAttrib($sPath & '\' & $aFSplit[$iCC]), 'd') Then ContinueLoop
$sHold &= $aFSplit[$iCC] & Chr(1)
EndSwitch
Next
If StringTrimRight($sHold, 1) Then Return StringSplit(StringTrimRight($sHold, 1), Chr(1))
Return SetError(4, 4, '')
EndFunc
Oh man,
was eine schwere Geburt.
Mega
Hi,
andere Möglichkeit wäre z.B. in einer schleife zu prüfen, ob dein Programmfenster den Fokus hat und falls die FehlerGUI den Fokus klaut, weißt du Bescheid.
Mega
Hi,
geht doch. Das Fenster in der Ecke bleibt gleich groß und der Zoom wird erhöht.
Mega
Hi,
warum reicht sowas nicht?
Zeig doch mal das gestem Skript.
[autoit]#include<WindowsConstants.au3>
#include<GUIConstantsEx.au3>
Opt("WinTitleMatchMode", 4)
Opt('GUICloseOnESC', 1)
Opt('GUIOnEventMode', 1)
$MagWidth = 150
$MagHeight = 150
$MagZoom = 2;1.00000000000000001
Global $dll[3], $DeskHDC, $GUIHDC
$dll[1] = DllOpen("user32.dll")
$dll[2] = DllOpen("gdi32.dll")
Global $shell = WinGetPos("classname=Shell_TrayWnd")
Global $GUI = GUICreate("Gui", 160, 160, @DesktopWidth - 160, @DesktopHeight - 160 - $shell[3], $WS_POPUP, $WS_EX_TOPMOST)
GUISetOnEvent($GUI_EVENT_CLOSE, "OnAutoItExit")
GUISetState(@SW_SHOW)
$DeskHDC = DllCall("user32.dll", "int", "GetDC", "hwnd", 0)
$GUIHDC = DllCall("user32.dll", "int", "GetDC", "hwnd", $GUI)
While 1
MAG()
Sleep(5)
WEnd
Func MAG()
DllCall("gdi32.dll", "int", "StretchBlt", "int", $GUIHDC[0], "int", _
0, "int", 0, "int", $MagWidth * $MagZoom, "int", $MagHeight * $MagZoom, "int", $DeskHDC[0], "int", _
MouseGetPos(0) - $MagWidth / 2, "int", MouseGetPos(1) - $MagHeight / 2, "int", $MagWidth, "int", $MagHeight, _
"long", $SRCCOPY)
EndFunc ;==>MAG
Func OnAutoItExit()
DllCall("user32.dll", "int", "ReleaseDC", "int", $DeskHDC[0], "hwnd", 0)
DllCall("user32.dll", "int", "ReleaseDC", "int", $GUIHDC[0], "hwnd", $GUI)
DllClose($dll[1])
DllClose($dll[2])
Exit(0)
EndFunc ;==>OnAutoItExit
Mega
Also, du hast eine GUI angenommen 100 * 100 Pixel. Darin ein Fenster, mit eine "Art" Lupe angenommen 50*50. Jetzt ziehst du deine GUI größer und die GUI der Lupe soll mitwachsen?
Mega
Schreib dir einfach als Pseudotext auf, was du machen musst damit du die Logik vor Augen hast, dann kannst du es sicher auch umsetzen.
Hi,
nutze einfach EVENTCREATE kannst du z.B. unter DOS (cmd) testen.
Mega
Na dann mach WinGetPos und pass es wieder an.
Okay, dann weiß ich nicht was du willst ![]()
Hi,
Hilfe lesen, Beispiel ausprobieren. Evtl. deutsche Hilfe angucken und dann schaffst du das!
Mega
Hi,
warum loggst du nicht in eine Textdatei?
Mega
Hi,
Sternchen? Nimm einfach StringInStr oder _StringBetween oder StringRegExp
Mega
Dein Code funktioniert nicht.
Welche Ursprungsbeispiele gibt es denn?
HH:MM:SS:MMM
H:MM:SS:MMM
...
Mega