Beiträge von funkey
-
-
-
Hab den Code von Pastebin.
Wenn ich nach dem Generieren auf Draw drücke passiert garnichts. Wenn ich Buttons anklicke (blau) und dann Draw drücke, dann werden die bluauen Buttons von grünen umrandet. Soll das nicht so sein? -
Ich kann nicht nachvollziehen was du meinst.
-
Hoffentlich ist das so wie gewollt:
Spoiler anzeigen
[autoit]#include <File.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <Array.au3>
#include <String.au3>Global $aFile, $aFile_New[1]
[/autoit] [autoit][/autoit] [autoit]
_FileReadToArray("3rd5000wave_sorted_clear (2).txt", $aFile)Global $SectionStart = 0
[/autoit] [autoit][/autoit] [autoit]
Global $TraceMsg = 0
Global $Error = 0
Global $IndexStart, $IndexStopFor $i = 1 To $aFile[0]
[/autoit] [autoit][/autoit] [autoit]
If StringInStr($aFile[$i], "CStore::LogInfo;Informational;4905") And $SectionStart = 0 Then
$SectionStart = 1
$IndexStart = $i
ContinueLoop
EndIfDo
[/autoit] [autoit][/autoit] [autoit]
If StringInStr($aFile[$i], "CSession::Logoff;TraceMsg;4801") Then $SectionStart = 0
$TraceMsg += StringInStr($aFile[$i], "MailKernel::LogStatus;TraceMsg;2040")
$Error += StringInStr($aFile[$i], "CMessage::CopyToPST;Error;")
$i += 1
Until $SectionStart = 0If $TraceMsg And $Error Then
[/autoit] [autoit][/autoit] [autoit]
$IndexStop = $i
For $j = $IndexStart To $IndexStop - 1
_ArrayAdd($aFile_New, $aFile[$j])
Next
EndIf$TraceMsg = 0
[/autoit] [autoit][/autoit] [autoit]
$Error = 0
Next$aFile_New[0] = UBound($aFile_New)
[/autoit]
_ArrayDisplay($aFile_New)
_FileWriteFromArray(@ScriptDir & "\NewLogFile.txt", $aFile_New, 1) -
Spoiler anzeigen
[autoit]#include <Constants.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <WinAPI.au3>Global $MsgBoxX = 20
[/autoit] [autoit][/autoit] [autoit]
Global $MsgBoxY = 20Local $hProcMsgBox = DllCallbackRegister("CbtHookProcMsgBox", "int", "int;int;int")
[/autoit] [autoit][/autoit] [autoit]
Local $TIDMsgBox = _WinAPI_GetCurrentThreadId()
Local $hHookMsgBox = _WinAPI_SetWindowsHookEx($WH_CBT, DllCallbackGetPtr($hProcMsgBox), 0, $TIDMsgBox)Local $iRet = MsgBox(34, "Select example", "Please select the skin you want to try")
[/autoit] [autoit][/autoit] [autoit]
$MsgBoxX = 120
Local $iRet = MsgBox(34, "Select example", "Please select the skin you want to try")
$MsgBoxX = 220
Local $iRet = MsgBox(34, "Select example", "Please select the skin you want to try")_WinAPI_UnhookWindowsHookEx($hHookMsgBox)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
DllCallbackFree($hProcMsgBox)#region Just for fun!!
[/autoit] [autoit][/autoit] [autoit]
;##########################################################
Func CbtHookProcMsgBox($nCode, $wParam, $lParam)
Local $RET = 0
If $nCode < 0 Then
$RET = _WinAPI_CallNextHookEx($hHookMsgBox, $nCode, $wParam, $lParam)
Return $RET
EndIf
Switch $nCode
Case 5 ;5=HCBT_ACTIVATE
_WinAPI_SetDlgItemText($wParam, 3, "1")
_WinAPI_SetDlgItemText($wParam, 4, "2")
_WinAPI_SetDlgItemText($wParam, 5, "3")
_WinAPI_SetWindowPos($wParam, $HWND_TOP, $MsgBoxX, $MsgBoxY, _WinAPI_GetWindowWidth($wParam), _WinAPI_GetWindowHeight($wParam), $SWP_NOZORDER)
EndSwitch
Return
EndFunc ;==>CbtHookProcMsgBoxFunc _WinAPI_SetDlgItemText($hDlg, $nIDDlgItem, $lpString)
[/autoit] [autoit][/autoit] [autoit]
Local $aRet = DllCall('user32.dll', "int", "SetDlgItemText", _
"hwnd", $hDlg, _
"int", $nIDDlgItem, _
"str", $lpString)
Return $aRet[0]
EndFunc ;==>_WinAPI_SetDlgItemText;##########################################################
[/autoit] [autoit][/autoit] [autoit][/autoit]
#endregion Just for fun!! -
Number hat einen zweiten Parameter ;). Entweder wird als Integer(default) oder Gleitkommazahl interpretiert.
-
Es müsste normalerweise möglich sein. Du benötigst mind. ControlGetText und die Excel-UDF (_Excel.....).
Mehr kann ich dazu nicht sagen, da ich das Programm ja nicht kenne bzw. es nicht genannt wurde. -
Tolle UDF!
Einen Fehler hab ich aber noch entdeckt. Und zwar wird die Hover-Farbe nicht zurückgesetzt, wenn das Kontext-Menü verschwindet. Beim erneuten Anzeigen des Menüs ist dann die letzte Auswahl noch farblich hervorgehoben. Könnte man aber auch als Feature sehen. -
Irgendein Label muss über dem Button sein!
Außerdem ist das ganze ein bischen chaotisch aufgebaut. -
Spoiler anzeigen
[autoit]$Info = _FileGetProperty(@ScriptDir & "\Test.JPG", "Bild aufgenommen am")
[/autoit] [autoit][/autoit] [autoit]
ConsoleWrite($Info & @CRLF);===============================================================================
[/autoit]
; Function Name.....: _FileGetProperty
; Description.......: Returns a property or all properties for a file.
; Version...........: 1.0.2
; Change Date.......: 05-16-2012
; AutoIt Version....: 3.2.12.1+
; Parameter(s)......: $S_PATH - String containing the file path to return the property from.
; $S_PROPERTY - [optional] String containing the name of the property to return. (default = "")
; Requirements(s)...: None
; Return Value(s)...: Success: Returns a string containing the property value.
; If $S_PROPERTY is empty, an two-dimensional array is returned:
; $av_array[0][0] = Number of properties.
; $av_array[1][0] = 1st property name.
; $as_array[1][1] = 1st property value.
; $av_array[n][0] = nth property name.
; $as_array[n][1] = nth property value.
; Failure: Returns 0 and sets @error to:
; 1 = The folder $S_PATH does not exist.
; 2 = The property $S_PROPERTY does not exist or the array could not be created.
; 3 = Unable to create the "Shell.Application" object $objShell.
; Author(s).........: - Simucal <[email='Simucal@gmail.com'][/email]>
; - Modified by: Sean Hart <[email='autoit@hartmail.ca'][/email]>
; - Modified by: teh_hahn <[email='sPiTsHiT@gmx.de'][/email]>
; - Modified by: BrewManNH
; URL...............: http://www.autoitscript.com/forum/topic/..…view__findpost_
; Note(s)...........: Modified the script that teh_hahn posted at the above link to include the properties that
; Vista and Win 7 include that Windows XP doesn't. Also removed the ReDims for the $av_ret array and
; replaced it with a single ReDim after it has found all the properties, this should speed things up.
;===============================================================================
Func _FileGetProperty(Const $S_PATH, Const $S_PROPERTY = "")
Local Const $objShell = ObjCreate("Shell.Application")
If @error Then Return SetError(3, 0, 0)
Local $iPropertyCount = 300 ; arbitrary number used, Windows 7 only returns 289 properties, Windows XP only returns 38 (future proofing)
If StringLeft($S_PATH, 1) = '"' Then StringTrimLeft($S_PATH, 1) ; deletes any quotes around the path\filename, otherwise will cause errors
If StringRight($S_PATH, 1) = '"' Then StringTrimRight($S_PATH, 1) ; deletes any quotes around the path\filename, otherwise will cause errors
If Not FileExists($S_PATH) Then Return SetError(1, 0, 0)
Local Const $S_FILE = StringTrimLeft($S_PATH, StringInStr($S_PATH, "\", 0, -1))
Local Const $S_DIR = StringTrimRight($S_PATH, StringLen($S_FILE) + 1)
Local Const $objFolder = $objShell.NameSpace($S_DIR)
Local Const $objFolderItem = $objFolder.Parsename($S_FILE)
If $S_PROPERTY Then
For $I = 0 To $iPropertyCount
If $objFolder.GetDetailsOf($objFolder.Items, $I) = $S_PROPERTY Then Return $objFolder.GetDetailsOf($objFolderItem, $I)
Next
Return SetError(2, 0, 0)
EndIf
Local $av_ret[300][2] = [[1]]
For $I = 1 To $iPropertyCount + 1
If $objFolder.GetDetailsOf($objFolder.Items, $I) Then
$av_ret[$I][0] = $objFolder.GetDetailsOf($objFolder.Items, $I - 1)
$av_ret[$I][1] = $objFolder.GetDetailsOf($objFolderItem, $I - 1)
$av_ret[0][0] += 1
EndIf
Next
ReDim $av_ret[$av_ret[0][0] + 1][2]
If Not $av_ret[1][0] Then Return SetError(2, 0, 0)
Return $av_ret
EndFunc ;==>_FileGetProperty -
Ich denke nicht, dass es das ist, wonach gesucht wird. Ich habe mein Win7 so eingestellt, dass immer alle TrayIcons angezeigt werden. Hab aber keine Ahnung wie man es automatisch sichtbar macht, wenn das nicht so eingestellt wird. Dachte das passiert automatisch, kann es jetzt aber nicht testen, da ich zZ mit WinXP arbeite.
-
Such mal nach _WinAPI_RoundRect aus der WinAPIEx-UDF oder vllt suchst du auch _WinAPI_CreateRoundRectRgn aus der Standard-AutoIt-Bibliothek.
-
Nützlich, das ganze sieht im Endeffekt der GuiFrame-UDF ziemlich ählich: http://www.autoitscript.com/forum/topic/11…12/#entry830537
Hoffentlich hast du nicht das Rad neu erfunden!

-
Das würde ich nicht machen, name22.
Dann springt er nämlich zum nächsten Case. -
Und wenn du es einfach so machst?
If $bedingung <> $ergebnis Then
Mach_Was()
EndIf -
Wenn ich FileRead() mit einer Textdatei verwende, dann erhalte ich auch einen String und nichts binary. Wenn du binär auslesen willst, musst du die Datei zuerst mit FileOpen im Binärmodus öffnen.
-
Das wird aber kein Bruteforce-Programm, oder?
-
http://www.autoitscript.com/forum/topic/10…ll/#entry751325
Spoiler anzeigen
[autoit]$oExcel = ObjCreate("Excel.Application")
[/autoit] [autoit][/autoit] [autoit]
With $oExcel ; open new workbook
.Visible = True
.WorkBooks.Add
.ActiveWorkbook.Sheets(1).Select()
EndWith$sRange ="A1:G8"
[/autoit]
$k = 1
For $i = 1 To 7
For $j = 1 To 8
$oExcel.ActiveSheet.Range(Chr(64 + $i) & $j).Value = "ColorIndex: " & $k
With $oExcel.ActiveSheet.Range(Chr(64 + $i) & $j).Font
If Mod($j, 2) Then
.Name = "Courier New"
.FontStyle = "Italic"
;.Underline = 2
Else
.Name = "Comic Sans MS"
.FontStyle = "Regular"
.Underline = -4119 ; double underline
;.Underline = 4 ; accounting single underline
;.Underline = 5 ; accounting double underline
EndIf
.Bold = True
.ColorIndex = $k
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
EndWith
$k += 1
Next
Next
; format cells
With $oExcel.ActiveSheet.Range($sRange)
.Select
.HorizontalAlignment = -4108 ; center
.ColumnWidth = 18
;.EntireColumn.AutoFit
EndWith
; color columns
For $i = 1 To 7
$sCol = Chr(64 + $i)
If Mod($i, 2) Then
$oExcel.ActiveSheet.Range($sCol & "1:" & $sCol & "8").Interior.ColorIndex = 3
Else
$oExcel.ActiveSheet.Range($sCol & "1:" & $sCol & "8").Interior.ColorIndex = 20
EndIf
Next -
Also bei mir hier unter WinXP läuft das super:
[autoit];Script self stop
[/autoit][autoit][/autoit][autoit]
#include <SysTray.au3>$TrayIconIndex = _SysTrayIconIndex(@AutoItPID, 2)
[/autoit][autoit][/autoit][autoit]$aPos = _SysTrayIconPos($TrayIconIndex, 1)
[/autoit][autoit][/autoit][autoit]MouseClick("right", $aPos[0], $aPos[1])
[/autoit]