JScript Posted November 9, 2012 Share Posted November 9, 2012 @BrewManNH I've also had that impression, but it's not the way it goes! In this context UDF, only frees the memory that is no longer in use. @Melba23 I'm doing some tests and then return when finished, but I will say that the "SetProcessWorkingSetSize" need only be called once and will be marked the minimum and maximum to be used! JS http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
BrewManNH Posted November 10, 2012 Share Posted November 10, 2012 I can only offer what I've read in regards to EmptyWorkingSet from elsewhere. Here's a few links I've found. http://stackoverflow.com/questions/1812018/what-are-the-side-effects-of-using-emptyworkingset http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/b795740a-fc11-4d39-9df8-598867ffff2f If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
JScript Posted November 10, 2012 Share Posted November 10, 2012 @BrewManNH I had seen these links, but understand that the process "explorer.exe" and anyone other who is not "their" program will suffer the consequence of losing performance! In the case of Melba's UDF and other programs that I did, this function only frees the memory that is no longer being used! JS http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
BrewManNH Posted November 10, 2012 Share Posted November 10, 2012 The problem comes when your program needs that data again and it has to page it back in from the hard drive, that's where the performance issues can hit. I'm just saying that if you have a memory issue, using it isn't going to magically fix it, it's just going to hide it. As all the links I've read have said, let Windows worry about its memory, and you worry about making the program run. If there's memory not being used, and Windows needs it for something, it will do the paging for you, when and if it needs to If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
JScript Posted November 10, 2012 Share Posted November 10, 2012 At this point I agree with you, surely the memory management of Windows is becoming more efficient, but sometimes it becomes necessary, see for example the memory management in Firefox... JS http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
AUTTRY Posted November 14, 2012 Share Posted November 14, 2012 AUTTRY,, Try this version of the UDF - I get very similar memory usage between the 2 versions now: expandcollapse popup#include-once ;#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w- 7 ; #INDEX# ======================================================================================================================= ; Title .........: Marquee ; Description ...: This module contains functions to create and manage marquee controls ; =============================================================================================================================== ; #CURRENT# ===================================================================================================================== ;_GUICtrlMarquee_Init : Initialises a Marquee control ;_GUICtrlMarquee_SetScroll : Sets movement parameters for Marquee ;_GUICtrlMarquee_SetDisplay : Sets display parameters for Marquee ;_GUICtrlMarquee_Create : Creates Marquee ;_GUICtrlMarquee_Delete : Deletes a marquee control ;_GUICtrlMarquee_Reset : Resets a marquee control to current parameters ; =============================================================================================================================== ; #INTERNAL_USE_ONLY#============================================================================================================ ;__GUIMarquee_MemReduce() : Reduce memory usage by Shell.Explorer.2 objects ;================================================================================================================================ ; #INCLUDES# ==================================================================================================================== ; #GLOBAL VARIABLES# ============================================================================================================ ; Array to hold Marquee parameters Global $aMarquee_Params[1][13] = [[0, 0, 0, "scroll", "left", 6, 85, 0, 0, 0, 12, "Tahoma", ""]] ; [0][0] = Count [n][0] = ControlID ; [0][1] [n][1] = Obj Ref ; [0][2] = Def loop state [n][2] = Loop state ; [0][3] = Def move state [n][3] = Move state ; [0][4] = Def move dirn [n][4] = Move dirn ; [0][5] = Def scroll speed [n][5] = Scroll speed ; [0][6] = Def delay time [n][6] = Delay time ; [0][7] = Def border state [n][7] = Border state ; [0][8] = Def text colour [n][8] = Text colour ; [0][9] = Def back colour [n][9] = Back colour ; [0][10] = Def font family [n][10] = Font size ; [0][11] = Def font size [n][11] = Font family ; [0][12] [n][12] = Text ; Get system text and background colours Global $aMarquee_Colours_Ret = DllCall("User32.dll", "int", "GetSysColor", "int", 8) $aMarquee_Params[0][8] = BitAND(BitShift(String(Binary($aMarquee_Colours_Ret[0])), 8), 0xFFFFFF) $aMarquee_Colours_Ret = DllCall("User32.dll", "int", "GetSysColor", "int", 5) $aMarquee_Params[0][9] = BitAND(BitShift(String(Binary($aMarquee_Colours_Ret[0])), 8), 0xFFFFFF) ; #FUNCTION# ==================================================================================================================== ; Name...........: _GUICtrlMarquee_Init ; Description ...: Initialises UDF prior to creating a Marquee control ; Syntax.........: _GUICtrlMarquee_Init() ; Parameters ....: None ; Return values .: Index of marquee to be passed to other _GUICtrlMarquee functions ; Author ........: Melba 23 ; Related .......: Other _GUICtrlMarquee functions ; Link ..........; ; Example .......; Yes ; =============================================================================================================================== Func _GUICtrlMarquee_Init() ; Add a new line to the array $aMarquee_Params[0][0] += 1 ReDim $aMarquee_Params[$aMarquee_Params[0][0] + 1][13] ; Copy over the default values For $i = 2 To 12 $aMarquee_Params[$aMarquee_Params[0][0]][$i] = $aMarquee_Params[0][$i] Next ; Return index of marquee in array Return $aMarquee_Params[0][0] EndFunc ;==>_GUICtrlMarquee_Init ; #FUNCTION# ==================================================================================================================== ; Name...........: _GUICtrlMarquee_SetScroll ; Description ...: Sets movement parameters for a Marquee ; Syntax.........: _GUICtrlMarquee_SetScroll($iIndex, [$iLoop, [$sMove, [$sDirection, [$iScroll, [$iDelay]]]]]) ; Parameters ....: $iIndex - Index of marquee returned by _GUICtrlMarquee_Init ; $iLoop - [optional] Number of loops to repeat. (Default = infinite, -1 = leave unchanged) ; Use "slide" movement to keep text visible after stopping ; $sMove - [optional] Movement of text. From "scroll" (Default), "slide" and "alternate". (-1 = leave unchanged) ; $sDirection - [optional] Direction of scrolling. From "left" (Default), "right", "up" and "down". (-1 = leave unchanged) ; $iScroll - [optional] Distance of each advance - controls speed of scrolling (Default = 6, -1 = leave unchanged) ; Higher numbers increase speed, lower numbers give smoother animation. ; $iDelay - [optional] Time in milliseconds between each advance (Default = 85, -1 = leave unchanged) ; Higher numbers lower speed, lower numbers give smoother animation. ; Return values .: Success - Returns 1 ; Failure - Returns 0 and sets @error to 1 - @extended set to index of parameter with error ; Author ........: Melba 23 ; Related .......: Other _GUICtrlMarquee functions ; Link ..........; ; Example .......; Yes ; =============================================================================================================================== Func _GUICtrlMarquee_SetScroll($iIndex, $iLoop = Default, $sMove = Default, $sDirection = Default, $iScroll = Default, $iDelay = Default) ; Errorcheck and set parameters Switch $iIndex Case 1 To $aMarquee_Params[0][0] $iIndex = Int($iIndex) Case Else Return SetError(1, 1, 0) EndSwitch Switch $iLoop Case -1 ; No change Case Default $aMarquee_Params[$iIndex][2] = $aMarquee_Params[0][2] Case Else If IsNumber($iLoop) Then $aMarquee_Params[$iIndex][2] = Int(Abs($iLoop)) Else Return SetError(1, 2, 0) EndIf EndSwitch Switch $sMove Case -1 ; No change Case "scroll", 'alternate', 'slide' $aMarquee_Params[$iIndex][3] = $sMove Case Default $aMarquee_Params[$iIndex][3] = $aMarquee_Params[0][3] Case Else Return SetError(1, 3, 0) EndSwitch Switch $sDirection Case -1 ; No change Case 'left', 'right', 'up', 'down' $aMarquee_Params[$iIndex][4] = $sDirection Case Default $aMarquee_Params[$iIndex][4] = $aMarquee_Params[0][4] Case Else Return SetError(1, 4, 0) EndSwitch Switch $iScroll Case -1 ; No change Case Default $aMarquee_Params[$iIndex][5] = $aMarquee_Params[0][5] Case Else If IsNumber($iScroll) Then $aMarquee_Params[$iIndex][5] = Int(Abs($iScroll)) Else Return SetError(1, 5, 0) EndIf EndSwitch Switch $iDelay Case -1 ; No change Case Default $aMarquee_Params[$iIndex][6] = $aMarquee_Params[0][6] Case Else If IsNumber($iDelay) Then $aMarquee_Params[$iIndex][6] = Int(Abs($iDelay)) Else Return SetError(1, 6, 0) EndIf EndSwitch Return 1 EndFunc ;==>_GUICtrlMarquee_SetScroll ; #FUNCTION# ==================================================================================================================== ; Name...........: _GUICtrlMarquee_SetDisplay ; Description ...: Sets display parameters for subsequent _GUICtrlCreateMarquee calls ; Syntax.........: _GUICtrlMarquee_SetDisplay($iIndex, [$iBorder, [$vTxtCol, [$vBkCol, [$iPoint, [$sFont]]]]) ; Parameters ....: $iIndex - Index of marquee returned by _GUICtrlMarquee_Init ; $iBorder - [optional] 0 = None (Default), 1 = 1 pixel, 2 = 2 pixel, 3 = 3 pixel (-1 = no change) ; $vTxtCol - [optional] Colour for text (Default = system colour, -1 = no change) ; $vBkCol - [optional] Colour for Marquee (Default = system colour, -1 = no change) ; Colour can be passed as RGB value or as one of the following strings: ; 'black', 'gray', 'white', 'silver', 'maroon', 'red', 'purple', 'fuchsia', ; 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua' ; $iPoint - [optional] Font size (Default = 12, -1 = unchanged) ; $sFont - [optional] Font to use (Default = Tahoma, "" = unchanged) ; Return values .: Success - Returns 0 ; Failure - Returns 0 and sets @error to 1 - @extended set to index of parameter with error ; Author ........: Melba 23 ; Related .......: Other _GUICtrlMarquee functions ; Link ..........; ; Example .......; Yes ; =============================================================================================================================== Func _GUICtrlMarquee_SetDisplay($iIndex, $iBorder = Default, $vTxtCol = Default, $vBkCol = Default, $iPoint = Default, $sFont = Default) ; Errorcheck and set parameters Switch $iIndex Case 1 To $aMarquee_Params[0][0] $iIndex = Int($iIndex) Case Else Return SetError(1, 1, 0) EndSwitch Switch $iBorder Case -1 ; No change Case Default $aMarquee_Params[$iIndex][7] = $aMarquee_Params[0][7] Case 0 To 3 $aMarquee_Params[$iIndex][7] = Int($iBorder) Case Else Return SetError(1, 2, 0) EndSwitch Switch $vTxtCol Case -1 ; No change Case Default $aMarquee_Params[$iIndex][8] = $aMarquee_Params[0][8] Case Else If Number($vTxtCol) Then $aMarquee_Params[$iIndex][8] = Int(Number($vTxtCol)) Else $aMarquee_Params[$iIndex][8] = $vTxtCol EndIf EndSwitch Switch $vBkCol Case -1 ; No change Case Default $aMarquee_Params[$iIndex][9] = $aMarquee_Params[0][9] Case Else If Number($vBkCol) Then $aMarquee_Params[$iIndex][9] = Int(Number($vBkCol)) Else $aMarquee_Params[$iIndex][9] = $vBkCol EndIf EndSwitch Switch $iPoint Case -1 ; No change Case Default $aMarquee_Params[$iIndex][10] = $aMarquee_Params[0][10] Case Else If IsNumber($iPoint) Then $aMarquee_Params[$iIndex][10] = Int(Abs($iPoint / .75)) Else Return SetError(1, 5, 0) EndIf EndSwitch Switch $sFont Case "" ; No change Case Default $aMarquee_Params[$iIndex][11] = $aMarquee_Params[0][11] Case Else If IsString($sFont) Then $aMarquee_Params[$iIndex][11] = $sFont Else Return SetError(1, 5, 0) EndIf EndSwitch Return 1 EndFunc ;==>_GUICtrlMarquee_SetDisplay ; #FUNCTION# ==================================================================================================================== ; Name...........: _GUICtrlMarquee_Create ; Description ...: Creates a marquee control ; Syntax.........: _GUICtrlMarquee_Create($iIndex, $sText, $iLeft, $iTop, $iWidth, $iHeight, [$sTipText]) ; Parameters ....: $iIndex - Index of marquee returned by _GUICtrlMarquee_Init ; $sText - The text (or HTML markup) the marquee should display. ; $iLeft - The left side of the control. ; $iTop - The top of the control. ; $iWidth - The width of the control. ; $iHeight - The height of the control. ; $sTipTxt - [optional] Tip text displayed when mouse hovers over the control. ; Return values .: Success - Returns 1 ; Failure - Returns 0 and sets @error as follows ; 1 = Invalid index ; 2 = Index already used ; 3 = Failed to create object ; 4 = Failed to embed object ; Author ........: james3mg, trancexx and jscript "FROM BRAZIL" ; Modified.......: Melba23 ; Remarks .......: This function attempts to embed an 'ActiveX Control' or a 'Document Object' inside the GUI. ; The GUI functions GUICtrlRead and GUICtrlSet have no effect on this control. The object can only be ; controlled using other _GUICtrlMarquee functions ; Related .......: Other _GUICtrlMarquee functions ; Link ..........; ; Example .......; Yes ; =============================================================================================================================== Func _GUICtrlMarquee_Create($iIndex, $sText, $iLeft, $iTop, $iWidth, $iHeight, $sTipText = "") ; Errorcheck index Switch $iIndex Case 1 To $aMarquee_Params[0][0] $iIndex = Int($iIndex) Case Else Return SetError(1, 0, 0) EndSwitch ; Check not previously created If $aMarquee_Params[$iIndex][1] <> "" Then Return SetError(2, 0, 0) EndIf ; Store text $aMarquee_Params[$iIndex][12] = $sText ; Create marquee Local $oShell = ObjCreate("Shell.Explorer.2") If Not IsObj($oShell) Then Return SetError(3, 0, 0) Else $aMarquee_Params[$iIndex][1] = $oShell EndIf $aMarquee_Params[$iIndex][0] = GUICtrlCreateObj($oShell, $iLeft, $iTop, $iWidth, $iHeight) If $aMarquee_Params[$iIndex][0] = 0 Then Return SetError(4, 0, 0) EndIf ; Wait for marquee to be created $oShell.navigate("about:blank") While $oShell.busy Sleep(100) WEnd ; Add marquee content With $oShell.document .write('<style>marquee{cursor: default}></style>') .write('<body onselectstart="return false" oncontextmenu="return false" onclick="return false" ondragstart="return false" ondragover="return false">') .writeln('<marquee width=100% height=100%') .writeln("loop=" & $aMarquee_Params[$iIndex][2]) .writeln("behavior=" & $aMarquee_Params[$iIndex][3]) .writeln("direction=" & $aMarquee_Params[$iIndex][4]) .writeln("scrollamount=" & $aMarquee_Params[$iIndex][5]) .writeln("scrolldelay=" & $aMarquee_Params[$iIndex][6]) .write(">") .write($sText) .body.title = $sTipText .body.topmargin = 0 .body.leftmargin = 0 .body.scroll = "no" .body.style.borderWidth = $aMarquee_Params[$iIndex][7] .body.style.color = $aMarquee_Params[$iIndex][8] .body.bgcolor = $aMarquee_Params[$iIndex][9] .body.style.fontSize = $aMarquee_Params[$iIndex][10] .body.style.fontFamily = $aMarquee_Params[$iIndex][11] EndWith ; Free memory __GUIMarquee_MemReduce() Return 1 EndFunc ;==>_GUICtrlMarquee_Create ; #FUNCTION# ==================================================================================================================== ; Name...........: _GUICtrlMarquee_Delete ; Description ...: Deletes a marquee control ; Syntax.........: _GUICtrlMarquee_Delete($iIndex) ; Parameters ....: $iIndex - Index of marquee returned by _GUICtrlMarquee_Init ; Return values .: Success - Returns 1 ; Failure - Returns 0 and sets @error to 1 ; Author ........: Melba23 ; Remarks .......: ; Related .......: Other _GUICtrlMarquee functions ; Link ..........; ; Example .......; Yes ; =============================================================================================================================== Func _GUICtrlMarquee_Delete($iIndex) ; Errorcheck index Switch $iIndex Case 1 To $aMarquee_Params[0][0] $iIndex = Int($iIndex) Case Else Return SetError(1, 0, 0) EndSwitch ; Delete the object $aMarquee_Params[$iIndex][1] = 0 ; And free the memory __GUIMarquee_MemReduce() ; Remove that entry from the array GUICtrlDelete($aMarquee_Params[$iIndex][0]) For $i = $iIndex To $aMarquee_Params[0][0] - 1 For $j = 0 To UBound($aMarquee_Params, 2) - 1 $aMarquee_Params[$i][$j] = $aMarquee_Params[$i + 1][$j] Next Next ReDim $aMarquee_Params[$aMarquee_Params[0][0]][13] $aMarquee_Params[0][0] -= 1 ; Redraw the other marquees For $i = 1 To $aMarquee_Params[0][0] _GUICtrlMarquee_Reset($i) Next EndFunc ;==>_GUICtrlMarquee_Delete ; #FUNCTION# ==================================================================================================================== ; Name...........: _GUICtrlMarquee_Reset ; Description ...: Resets a marquee control to current parameters ; Syntax.........: _GUICtrlMarquee_Reset($iIndex, $sText) ; Parameters ....: $iIndex - Index of marquee returned by _GUICtrlMarquee_Init ; $sText - The text (or HTML markup) the marquee should display (Default leaves text unchanged) ; Return values .: Success - Returns 1 ; Failure - Returns 0 and sets @error as follows ; 1 = Invalid index ; 2 = Invalid object reference ; Author ........: rover ; Modified.......: Melba23 ; Remarks .......: ; Related .......: Other _GUICtrlMarquee functions ; Link ..........; ; Example .......; Yes ; =============================================================================================================================== Func _GUICtrlMarquee_Reset($iIndex, $sText = Default) ; Errorcheck index Switch $iIndex Case 1 To $aMarquee_Params[0][0] $iIndex = Int($iIndex) Case Else Return SetError(1, 0, 0) EndSwitch ; Retrieve object reference $oShell = $aMarquee_Params[$iIndex][1] If Not IsObj($oShell) Then Return SetError(2, 0, 0) EndIf If $sText <> Default Then $aMarquee_Params[$iIndex][12] = $sText EndIf $oShell.document.body.innerHTML = '<body onselectstart="return false" oncontextmenu="return false" onclick="return false" ' & _ 'ondragstart="return false" ondragover="return false"> ' & _ '<marquee width=100% height=100% ' & "loop=" & $aMarquee_Params[$iIndex][2] & _ " behavior=" & $aMarquee_Params[$iIndex][3] & _ " direction=" & $aMarquee_Params[$iIndex][4] & _ " scrollamount=" & $aMarquee_Params[$iIndex][5] & _ " scrolldelay=" & $aMarquee_Params[$iIndex][6] & _ ">" & $aMarquee_Params[$iIndex][12] With $oShell.document .body.style.borderWidth = $aMarquee_Params[$iIndex][7] .body.style.color = $aMarquee_Params[$iIndex][8] .body.bgcolor = $aMarquee_Params[$iIndex][9] .body.style.fontSize = $aMarquee_Params[$iIndex][10] .body.style.fontFamily = $aMarquee_Params[$iIndex][11] EndWith Return 1 EndFunc ;==>_GUICtrlMarquee_SetText ; #INTERNAL USE ONLY# ==================================================================================================================== ; Name...........: _GUICtrlMarquee_MemReduce ; Description ...: Reduce memory usage by Shell.Explorer.2 objects ; Syntax.........: _GUICtrlMarquee_MemReduce() ; Author ........: AutoUt forum ; Remarks .......: This function is used internally by ; =============================================================================================================================== Func __GUIMarquee_MemReduce() Local $aHandle = DllCall("kernel32.dll", "int", "OpenProcess", "int", 0x1f0fff, "int", 0, "int", @AutoItPID) DllCall("psapi.dll", "int", "EmptyWorkingSet", "long", $aHandle[0]) DllCall("kernel32.dll", "int", "CloseHandle", "int", $aHandle[0]) EndFunc How do you get on? M23 M23, I took a few days off ~~ Now, I can see the gap of memory usage not so big now. No matter how ugly the method is, I like it! I also have such a UDF Func _ReduceMemory($i_PID = -1) If $i_PID <> -1 Then Local $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $i_PID) Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_Handle[0]) DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $ai_Handle[0]) Else Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1) EndIf Return $ai_Return[0] EndFunc ;==>_ReduceMemory Link to comment Share on other sites More sharing options...
darthwhatever Posted November 15, 2012 Share Posted November 15, 2012 The problem comes when your program needs that data again and it has to page it back in from the hard drive, that's where the performance issues can hit. I think what JScript is trying to say is that since there are no longer any references to the Shell.Explorer.2 object, it gets swapped to the disc. And since there are no more references anymore, it won't need to be swapped back from the hard drive. However, other parts of the memory will need to be swapped back in from the hard drive, resulting in (or caused by, I'm not sure) page faults. Bottom line, Melba23, I would recommend against using the __GUIMarquee_MemReduce or _ReduceMemory function, because it's not worth worrying about that 0.4% of your memory being used. Actually that's 0.4% on my computer, which has only 2gb of ram. If programmers want to use EmptyWorkingSet, let them do it themselves. [font=arial, sans-serif]How is education supposed to make me feel smarter? Besides, every time I learn something new, it pushes some old stuff out of my brain. Remember when I took that home winemaking course, and I forgot how to drive?[/font][font=arial, sans-serif]<div>This is how you annoy a web developer.</span>[/font] Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 15, 2012 Author Moderators Share Posted November 15, 2012 darthwhatever, After further reading I agree with your analysis - and I had also reached the same conclusion and will not include such a function in the UDF itself. Now enough of this memory stuff - can we now please leave this thread to discussion of my UDF! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted June 23, 2013 Share Posted June 23, 2013 Since this UDF uses HTML mark-up tags here's a link to help with tags: http://www.quackit.com/html/tags/ Try this: #include "Marquee.au3" ; The source for your image ; NOTE: The full path (eg. C:\path\to\img\file.jpg) is need or the file is displayed as an X (not found) $Img = @ScriptDir & "\pix\test.jpg" GUICreate("Marquee Example", 700, 20) $aMarquee = _GUICtrlMarquee_Init() _GUICtrlMarquee_SetScroll($aMarquee, -1, -1, -1, 4, 10) _GUICtrlMarquee_Create($aMarquee, '"Smooth Scroll" Marquee Parameters <-----<-----<----- The following is a test <----- Img: <img src="' & $Img & '" width="17" height="17" alt="Img_1">', 0, 0, 700, 20) GUISetState() While 1 $iMsg = GUIGetMsg() If $iMsg = -3 Then Exit WEnd "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
Vinh Posted June 24, 2013 Share Posted June 24, 2013 hi, how to transparent this on gui ^^ Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 26, 2013 Author Moderators Share Posted June 26, 2013 Vinh,Sorry, I have no idea how to do that. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
guinness Posted June 26, 2013 Share Posted June 26, 2013 hi, how to transparent this on gui ^^ It's not possible using with this approach. I've been >asked before as well. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted August 3, 2013 Share Posted August 3, 2013 Is it possible to add a _GUICtrlMarquee_GetPos() and a _GUICtrlMarquee_SetPos() function to this UDF? "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 3, 2013 Author Moderators Share Posted August 3, 2013 DatMCEyeBall,And what exactly are these functions supposed to do? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
DatMCEyeBall Posted August 3, 2013 Share Posted August 3, 2013 (edited) And what exactly are these functions supposed to do? Get the scrolling position of the Marquee and set the scrolling position. Example: Save the position for later use Change the text to show the user something else Change back after a while and revert to the previous scrolling position so that the user can go back to whatever they were doing Edited August 3, 2013 by DatMCEyeBall "Just be fred, all we gotta do, just be fred." -Vocaliod "That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha @tabhooked Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 4, 2013 Author Moderators Share Posted August 4, 2013 DatMCEyeBall,I tried doing somehting like that when I introduced the _GUICtrlMarquee_Reset function and could not determine how to detect nor set the current scrolling position. If you find me a way to do it - I will write the functions. Deal? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Quesney Posted April 6, 2017 Share Posted April 6, 2017 I am new to Autoit and this is pretty awesome, thanks for the code, teaching my self so reverse engineering code helps me a lot “Courage is being scared to death, but saddling up anyway” – John Wayne Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 6, 2017 Author Moderators Share Posted April 6, 2017 djchaney3, Welcome to the AutoIt forum and thanks for the compliment. What you are doing is an excellent way to learn - and never be afraid to ask questions about bits of code from other members that you do not understand. Sensible forum members will not bite if asked sensible questions - and if the author of the code is not sensible then you will not be learning much anyway ! M23 spudw2k 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
mexykanu Posted October 10, 2017 Share Posted October 10, 2017 Hello. There is a bug in _GUICtrlMarquee_Reset, as follows: The line $oShell = $aMarquee_Params[$iIndex][1] should be Local $oShell = $aMarquee_Params[$iIndex][1] Thank you for this great UDF ! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 10, 2017 Author Moderators Share Posted October 10, 2017 mexykanu, You are quite correct - I had changed the UDF file in the zip, but not the code in the post itself. Now fixed thanks - and delighted you like the UDF. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now