Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/07/2022 in all areas

  1. You can find the limits for AutoIt e.g. here : LimitsDefaults Excerpt : Maximum number of elements for an array = 16,777,216 Your problem is apparently the default limit of 2,147,483,647 bytes in RAM. @kurtykurtyboy's suggestion to process the .csv file line by line is good, assuming that this is what you need. Another option would be to read the data into a SQLite database and process it with the respective SQL statements.
    2 points
  2. SyncFiles v0.9.0 Here is my take on a file/folder comparison and synchronization tool. There are a lot of these out there already, but surely one more wouldn't hurt! This has been a fun one; I've learned so much more than I ever thought I would when starting this project. I hope you enjoy it! Key Features: Analyze the contents of two folders to detect any differences between the files' dates and sizes Display the results in a color-coded list Synchronize the two folders; select one of three options: Synchronize: Copy new and updated files in either direction Mirror to left: Make the left folder identical to the right folder Mirror to right: Make the right folder identical to the left folder Save and switch between multiple sync profiles Progress bar to show sync percent completed Drag and drop folders onto the input boxes Works with UNC file paths: "\\sharepoint.company.com@SSL\DavWWWRoot\Projects\ProjectDocuments" Right click on any file to override the sync action Download v0.9.0 (2022-08-19) SyncFiles_0.9.0.zip Or check the GitHub Repository for the latest updates. I spent a lot of time testing many different ways to search, compare, and copy files. The speed as it is now in my opinion is quite acceptable, but I will continue investigating more ways to increase the search and analyze speed. If I can muster the necessary brainpower, I may look into LarsJ's fast array functions or some custom C++/ASM functions to improve the speed or maybe spawning child processes to spread the load. Credits: LarsJ: example of virtual listviews and item colors [Link] Yashied: Copy UDF [Link] Ward: MemoryDll UDF (and BinaryCall UDF) [Link] Ward: Json UDF [Link] kurtykurtyboy (me): GuiFlatButton UDF [Link] Many other random snippets from the forums
    1 point
  3. @SaeidNYes... Webdriver is definitely more complicated. @mLipok has a section on the Webdriver wiki page dealing with Translate IE UDF to WebDriver.
    1 point
  4. Ah ...guess this change last year September fixed your issue:
    1 point
  5. I will have a look at the issue.. thanks for reporting. Jos Ps i think you should be able to post the issue in TRAC without registering.
    1 point
  6. @pixelsearch I think you will find that your constant 6 is also the ID returned by GUICtrlCreateMenuItem. So, it should be as simple as: $iIndex = $idBookmark1 #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiMenu.au3> #include <GuiToolTip.au3> #Region ### START Koda GUI section ### Form= Global $Form1 = GUICreate("Form1", 625, 442, 370, 232) Global $idFile = GUICtrlCreateMenu("&File") Global $idFileExit = GUICtrlCreateMenuItem("&Exit", $idFile) Global $idBookmarks = GUICtrlCreateMenu("&Bookmarks") Global $idBookmark1 = GUICtrlCreateMenuItem("Bookmark1", $idBookmarks) Global $idBookmark2 = GUICtrlCreateMenuItem("Bookmark2", $idBookmarks) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_MENUSELECT, "WM_MENUSELECT") #EndRegion ### END Koda GUI section ### Global $g_sBookmarkTT = "This is a tooltip for bookmark1" Global $g_hMain = _GUICtrlMenu_GetMenu($Form1) Global $g_hBookmark1 = _GUICtrlMenu_GetItemSubMenu($g_hMain, 1) ConsoleWrite($idBookmark1 & @CRLF) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func WM_MENUSELECT($hWnd, $iMsg, $wParam, $lParam) Local $iIndex = BitAND($wParam, 0xFFFF) ConsoleWrite($iIndex & @crlf) Local $iFlag = BitShift($wParam, 16) ; If BitAND($iFlag, $MF_MOUSESELECT) Then If BitAND($iFlag, $MF_HILITE) Then ToolTip("") ; If $lParam = $g_hBookmark1 Then If $lParam = $g_hBookmark1 And $iIndex = $idBookmark1 Then ToolTip($g_sBookmarkTT, Default, Default, "", 0, 1) EndIf EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_MENUSELECT
    1 point
  7. You can do this: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiMenu.au3> #include <GuiToolTip.au3> #Region ### START Koda GUI section ### Form= Global $Form1 = GUICreate("Form1", 625, 442, 370, 232) Global $idFile = GUICtrlCreateMenu("&File") Global $idFileExit = GUICtrlCreateMenuItem("&Exit", $idFile) Global $idBookmarks = GUICtrlCreateMenu("&Bookmarks") Global $idBookmark1 = GUICtrlCreateMenuItem("Bookmark1", $idBookmarks) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_MENUSELECT, "WM_MENUSELECT") #EndRegion ### END Koda GUI section ### Global $g_sBookmarkTT = "This is a tooltip for bookmark1" Global $g_hMain = _GUICtrlMenu_GetMenu($Form1) Global $g_hBookmark1 = _GUICtrlMenu_GetItemSubMenu($g_hMain, 1) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func WM_MENUSELECT($hWnd, $iMsg, $wParam, $lParam) Local $iIndex = BitAND($wParam, 0xFFFF) Local $iFlag = BitShift($wParam, 16) If BitAND($iFlag, $MF_MOUSESELECT) Then ToolTip("") If $lParam = $g_hBookmark1 Then ToolTip($g_sBookmarkTT, Default, Default, "", 0, 1) EndIf EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_MENUSELECT Saludos
    1 point
  8. So, after searching around the forum and looking at MSDN I realized, that GUICtrlSetFont takes the font in points, whereas _WinAPI_CreateFont takes the font in logical units. However I found two possible approaches: Either using GDI+ to calculate/measure the heigth of the fonts from given points or using the formula given on the MSDN entry nHeight = -MulDiv(PointSize, GetDeviceCaps(hDC, LOGPIXELSY), 72); As the solution with DC is slight more accurate (or similar) to GuiCtrlSetFont I am using this as solution for now: Func _GUICtrlSetFont($p_hControl = Default, $p_iHeight = Default, $p_iWeight = Default, $p_iAttribute = Default, $p_sgFont = "Tahoma") ; Set values If $p_iHeight = Default Then $p_iHeight = 8.5 If $p_iWeight = Default Then $p_iWeight = 400 If $p_iAttribute = Default Then $p_iAttribute = 0 Local $boItalic = (BitAND($p_iAttribute, 2) <> 0) Local $boUnder = (BitAND($p_iAttribute, 4) <> 0) Local $boStrike = (BitAND($p_iAttribute, 8) <> 0) Local $iHeight = $p_iHeight ; Convert point height to logical unit Local $hDC = _WinAPI_GetDC(0) Local $_iCap = _WinAPI_GetDeviceCaps($hDC, 90) _WinAPI_ReleaseDC(0, $hDC) $iHeight = -1 * _WinAPI_MulDiv($p_iHeight, $_iCap, 72) ; Assign font Local $hFnt = _WinAPI_CreateFont($iHeight, 0, 0, 0, $p_iWeight, $boItalic, $boUnder, $boStrike, $DEFAULT_CHARSET, $OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $PROOF_QUALITY, 0, $p_sgFont) _WinAPI_SetFont($p_hControl, $hFnt, True) EndFunc ;==>_GUICtrlSetFont_Dc It was also imported to not use $ANTIALIASED_QUALITY but $PROOF_QUALITY .
    1 point
  9. Try using the clip children style on it like this #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.8.1 Author: Abhishek Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- #include-once #include <WindowsConstants.au3> #include <WinAPI.au3> #include <GDIPlus.au3> #include <GUIConstantsEx.au3> Global $MyStyle = BitOR($WS_CAPTION, $WS_SYSMENU, $WS_THICKFRAME, $WS_MINIMIZEBOX, $WS_MAXIMIZEBOX, $WS_CLIPCHILDREN) ; get height of window title and width of window frame - may be different when XP theme is ON/OFF Global $htit = _WinAPI_GetSystemMetrics($SM_CYCAPTION) Global $frame = _WinAPI_GetSystemMetrics($SM_CXDLGFRAME) ConsoleWrite('Height:' & $htit & ' Frame:' & $frame & @CRLF & @CRLF) $gui = GUICreate('', 100, 100, -1, -1, $MyStyle) GUISetState() GUISetBkColor(0) Sleep(10) $hwnd = GUICtrlCreateLabel('Dust', 10, 10, 80, 80) GUICtrlSetBkColor(-1, 0xffffff) GUICtrlSetResizing(-1, 102) $hwnd = GUICtrlGetHandle(-1) _Zoom($gui, 300, 200, -1) Sleep(3000) Func _Zoom($sHwnd, $iW = 500, $iH = 500, $nSpeed = -1) Local $Pos = WinGetPos($sHwnd) ConsoleWrite('X:' & $Pos[0] & ' Y:' & $Pos[1] & ' W:' & $Pos[2] & ' H:' & $Pos[3] & @CRLF & @CRLF) Local $hOffset, $wOffset, $nTimes If $iH > $iW Then $wOffset = 1 $hOffset = $iH / $iW $nTimes = $iW ElseIf $iH < $iW Then $wOffset = $iW / $iH $hOffset = 1 $nTimes = $iH Else $hOffset = 1 $wOffset = 1 $nTimes = $iH EndIf $Pos = WinGetPos($sHwnd) $iH = 0 $iW = 0 GUISetStyle($MyStyle, -1, $gui); Set back to normal For $i = 1 To $nTimes $iH += $hOffset $iW += $wOffset WinMove($sHwnd, '', $iW / 2 + ($Pos[0] - $iW), $iH / 2 + ($Pos[1] - $iH), $iW, $iH, $nSpeed) Next GUISetStyle(BitAND($MyStyle, BitNOT($WS_CLIPCHILDREN)), -1, $gui); remove the clip children style $Pos = WinGetPos($sHwnd) ConsoleWrite('X:' & $Pos[0] & ' Y:' & $Pos[1] & ' W:' & $Pos[2] & ' H:' & $Pos[3] & @CRLF & @CRLF) EndFunc ;==>_Zoom
    1 point
×
×
  • Create New...