Custom Query
Results (151 - 153 of 3866)
Ticket | Resolution | Summary | Owner | Reporter |
---|---|---|---|---|
#2037 | Fixed | COM speed deterioration | trancexx | trancexx |
Description |
User Ascend4nt reported this. http://www.autoitscript.com/forum/topic/95366-latest-beta/page__view__findpost__p__932030 So the beta COM interface has slowed down tremendously. I know there's been major changes, but this is a huge performance difference. I'm seeing between 4-5x slower speed on the code below on beta 3.3.7.18 and 3.3.7.19, versus the production 3.3.6.1.. (Use it with at least one folder with a few hundred or so items, thats where the performance difference is most noticeable): ; ========================================================================================================================== ; Func _ObjectSHFolderViewFromWin($hWnd) ; ; Returns an 'ShellFolderView' Object for the given Window handle ; ; Author: Ascend4nt, based on code by KaFu, klaus.s ; ========================================================================================================================== Func _ObjectSHFolderViewFromWin($hWnd) If Not IsHWnd($hWnd) Then Return SetError(1,0,0) Local $oShell,$oShellWindows,$oIEObject,$oSHFolderView ; Shell Object $oShell=ObjCreate("Shell.Application") If Not IsObj($oShell) Then Return SetError(2,0,0) ; Get a 'ShellWindows Collection' object $oShellWindows = $oShell.Windows() If Not IsObj($oShellWindows) Then Return SetError(3,0,0) ; Iterate through the collection - each of type 'InternetExplorer' Object For $oIEObject In $oShellWindows If $oIEObject.HWND = $hWnd Then ; InternetExplorer->Document = ShellFolderView object $oSHFolderView=$oIEObject.Document If IsObj($oSHFolderView) Then Return $oSHFolderView Return SetError(4,0,0) EndIf Next Return SetError(-1,0,0) EndFunc ; ========================================================================================================================== ; Func _ExplorerWinGetAllItems($hWnd) ; ; ; Author: Ascend4nt, based on code by klaus.s, KaFu ; ========================================================================================================================== Func _ExplorerWinGetAllItems($hWnd) If Not IsHWnd($hWnd) Then Return SetError(1,0,'') Local $oSHFolderView,$oFolderItem,$oFolderItems Local $iTotal,$iCounter=2,$aItems[2] = [0, ""] $oSHFolderView=_ObjectSHFolderViewFromWin($hWnd) If @error Then Return SetError(@error,0,'') ; Folder->FolderItems Collection $oFolderItems = $oSHFolderView.Folder.Items $iTotal = $oFolderItems.Count Dim $aItems[$iTotal+2] ; 2 extra -> 1 for count [0], 1 for Folder path [1] $aItems[0]=$iTotal ; ShellFolderView->Folder->Self as 'FolderItem'->Path $aItems[1]=$oSHFolderView.Folder.Self.Path For $oFolderItem In $oFolderItems $aItems[$iCounter] = $oFolderItem.Path $iCounter += 1 Next Return SetExtended($iCounter-2,$aItems) EndFunc ;==>_ExplorerWinGetAllItems ; ========================================================================================================================== ; ========================================================================================================================== #include <Array.au3> ConsoleWrite("AutoIt Version:"&@AutoItVersion&@CRLF) $aWinList=WinList("[REGEXPCLASS:^(Explore|Cabinet)WClass$]") For $i = 1 To $aWinList[0][0] $iTimer=TimerInit() $aSelection = _ExplorerWinGetAllItems($aWinList[$i][1]) ConsoleWrite("Time:"&TimerDiff($iTimer)&" ms"&@CRLF) _ArrayDisplay($aSelection, "Explorer Instance #" & $i & " / " & $aWinList[$i][0]) Next |
|||
#1939 | Rejected | Be able to put some text in a Progress control | trac-autoit@… | |
Description |
Hi there, This is a little feature request for Progress control (Created by GUICtrlCreateProgress). It would be great to have the ability to put some text in it. Like the percent of progression or any other text. I know this can be done using extra GDI+ libraries but they are complicated and quite buggy sometimes. Thank your for your work. Thibaut LinuxLive USB Creator Project (www.linuxliveusb.com) |
|||
#338 | Rejected | Run scripts with no need to save them | Jos | torels |
Description |
I think it's a good idea to insert a "Run" voice in SciTe which runs the script even if it's not saved I wrote an AutoIt script which does the work, but it would be much better in LUA, even because the script I wrote always comes up with a message from SciTe asking me to save the file. By clicking NO the script starts. I came uo with this: #include <file.au3> $file = _TempFile(@TempDir,"~",".au3") $oldclip = ClipGet() FileOpen($file,2) FileWrite($file,_ReadScite()) FileClose($file) $AutoItProdexePath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "InstallDir") $AutoItexePath = $AutoItProdexePath Run('"' & $AutoItexePath & '\AutoIt3.exe "' & ' "' & $file & '"') FileDelete($file) ClipPut($oldclip) Func _ReadScite() Opt("WinTitleMatchMode", 4) ; Read text from SciTE (already open) WinWait("[CLASS:SciTEWindow; INSTANCE:1]") $hSciTE = WinGetHandle("[CLASS:SciTEWindow; INSTANCE:1]") WinActivate($hSciTE) WinWaitActive($hSciTE) ControlFocus($hSciTE, "", "[CLASS:Scintilla; INSTANCE:1]") ControlSend($hSciTE, "", "[CLASS:Scintilla; INSTANCE:1]", "^a") ControlSend($hSciTE, "", "[CLASS:Scintilla; INSTANCE:1]", "^c") ControlSend($hSciTE, "", "[CLASS:Scintilla; INSTANCE:1]", "{left}") return ClipGet() EndFunc also see: http://www.autoitscript.com/forum/index.php?showtopic=72697&st=0&p=530328&#entry530328 |