guinness Posted February 21, 2011 Share Posted February 21, 2011 I noticed a discrepancy in the Syntax for _GUICtrlCreateGIF() it says >> _GUICtrlCreateGIF(ByRef $pGIF, $vGIF, $vAdditionalData, $iLeft, $iTop [, $iWidth = Default [, $iHeight = Default [, $iRenderingStyle = Default [, $iForcedARGB = Default ]]]]) but shouldn't it be >> _GUICtrlCreateGIF($vGIF, $vAdditionalData, $iLeft, $iTop [, $iWidth = Default [, $iHeight = Default [, $iRenderingStyle = Default [, $iForcedARGB = Default ]]]]) I thought I would only mention it since it could be confusing for those who like to read the Help File(s) 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...
trancexx Posted March 6, 2011 Author Share Posted March 6, 2011 (edited) I noticed a discrepancy in the Syntax for _GUICtrlCreateGIF() it says >> _GUICtrlCreateGIF(ByRef $pGIF, $vGIF, $vAdditionalData, $iLeft, $iTop [, $iWidth = Default [, $iHeight = Default [, $iRenderingStyle = Default [, $iForcedARGB = Default ]]]]) but shouldn't it be >> _GUICtrlCreateGIF($vGIF, $vAdditionalData, $iLeft, $iTop [, $iWidth = Default [, $iHeight = Default [, $iRenderingStyle = Default [, $iForcedARGB = Default ]]]]) I thought I would only mention it since it could be confusing for those who like to read the Help File(s) I bet you can't find a mistake now. I have added _GUICtrlSetGIF() function. It can be used to set supported images to AutoIt controls. Supported is plenty. Normally it would be used like this: ;... $hControl = GUICtrlCreatePic("", $iLeft, $iRight, $iWidth, $iHeight) _GUICtrlSetGIF($hControl, $sImageFile) ;... ... but it can be used in many other ways. edit: First post for more info. Edited March 6, 2011 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
guinness Posted March 6, 2011 Share Posted March 6, 2011 (edited) I bet you can't find a mistake now.Nope, I can't!Thanks for the addition of _GUICtrlSetGIF() Edited March 6, 2011 by guinness 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...
JScript Posted March 7, 2011 Share Posted March 7, 2011 You're note 10, no: the best, no: excellent, no: o max, no:..., no..., n..., ..., .., ., , 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...
JScript Posted March 8, 2011 Share Posted March 8, 2011 Well, see this error:In Windows 7 sometimes the program crashes, but this message does not appear...What could it be? 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...
guinness Posted March 8, 2011 Share Posted March 8, 2011 This might shed some light on the problem >> I haven't looked at _GUICtrlSetGIF() so I don't know how they compare to the allocation of memory. 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...
JScript Posted March 8, 2011 Share Posted March 8, 2011 This might shed some light on the problem >> I haven't looked at _GUICtrlSetGIF() so I don't know how they compare to the allocation of memory.Certainly, but beyond that I need to load static and animated images (GIF), and their advice does not suit me... 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...
JScript Posted March 8, 2011 Share Posted March 8, 2011 @trancexxI use this code:expandcollapse popup#include-once ;// This file is a part of the NEEMedia USkin class library. ;// 2005-2006 Never-Ending Media Technology Ltd,co., All Rights Reserved. ;// ;// THIS FILE IS THE PROPERTY OF NEEMEDIA AND IS NOT TO BE ;// RE-DISTRIBUTED BY ANY MEANS WHATSOEVER WITHOUT THE EXPRESSED WRITTEN ;// CONSENT OF NEEMEDIA. ;// ;// THIS CODE CAN ONLY BE USED UNDER THE TERMS AND CONDITIONS OUTLINED ;// IN THE USKIN PRO LICENSE AGREEMENT. NEEMEDIA GRANTS TO ;// YOU (ONE SOFTWARE DEVELOPER) THE LIMITED RIGHT TO USE THIS SOFTWARE ON A ;// SINGLE COMPUTER. ;// ;// CONTACT INFORMATION: ;// support@neemedia.com ;// http://www.neemedia.com ;// ;///////////////////////////////////////////////////////////////////////////// Global $__USkin_UskinDLL = -1 Func _USkin_LoadDLL($szUSkinDLL = "USkin.dll") $__USkin_UskinDLL = DllOpen($szUSkinDLL) If $__USkin_UskinDLL<0 Then Return SetError($__USkin_UskinDLL<0,0,False) DllCall("kernel32.dll", "handle", "LoadLibraryW", "wstr", $szUSkinDLL) Return True EndFunc #cs ---------------------------------------------------------------------------- Function Name :USkinInit Description :Init uskin lib and load skin file. ProtoType : BOOL USkinInit( LPCTSTR lpszUserName // user name LPCTSTR lpszRegCode // sn LPCTSTR lpszFileName // uskin file name ); Parameters : lpszFileName [in] uskin file name,path like:neemedia.u3,..\neemedia.u3 lpszUserName [in, opt] user name.default is NULL lpszRegCode [in, opt] correct sn with user name,default is NULL Return values : If the function succeeds, the return value is nonzero. If the function fails, the return value is zero #ce ; USKIN_API BOOL __stdcall USkinInit(LPCTSTR lpszUserName,LPCTSTR lpszRegCode,LPCTSTR lpszFileName); Func _USkin_Init($szFileName , $szUserName = "" , $szRegCode = "") If $__USkin_UskinDLL<0 And Not _USkin_LoadDLL() Then Return SetError(1,0,0) Local $tpUserName = "ptr", $tpRegCode = "ptr" If StringLen($szUserName) Then $tpUserName = "str" If StringLen($szRegCode) Then $tpRegCode = "str" Local $result = DllCall($__USkin_UskinDLL, "int", "USkinInit", $tpUserName, $szUserName, $tpRegCode, $szRegCode, "str", $szFileName) If @error Then Return SetError(2,0,0) Return $result[0] EndFunc #cs ---------------------------------------------------------------------------- Function Name :USkinExit Description :Exit uskin lib.free memory that uskin alloced ProtoType : BOOL USkinExit( ); Parameters : none Return values : If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. #ce ; USKIN_API BOOL __stdcall USkinExit(); Func _USkin_Exit() If $__USkin_UskinDLL<0 Then Return SetError(1,0,0) Local $result = DllCall($__USkin_UskinDLL, "int", "USkinExit") If @error Then Return SetError(2,0,0) Return $result[0] EndFunc #cs ---------------------------------------------------------------------------- Function Name :USkinLoadSkin Description :Load skin from file. ProtoType : BOOL USkinLoadSkin( LPCTSTR lpszFileName // USkin file name ); Parameters : lpszFileName [in] uskin file name£¬support path like:neemedia.u3,..\neemedia.u3 Return values : If the function succeeds, the return value is nonzero. If the function fails, the return value is zero #ce ; USKIN_API BOOL __stdcall USkinLoadSkin(LPCTSTR lpszFileName); Func _USkin_LoadSkin($szFileName) If $__USkin_UskinDLL<0 Then Return SetError(1,0,0) Local $result = DllCall($__USkin_UskinDLL, "int", "USkinLoadSkin", "str", $szFileName) If @error Then Return SetError(2,0,0) Return $result[0] EndFunc #cs ---------------------------------------------------------------------------- Function Name :USkinAboutSkin Description :Show skin file's copyright information dialog,such as author,author's email,url. ProtoType : BOOL USkinAboutSkin( ); Parameters : none Return values : none #ce ; USKIN_API void __stdcall USkinAboutSkin(); Func _USkin_AboutSkin() If $__USkin_UskinDLL<0 Then Return SetError(1,0,0) Local $result = DllCall($__USkin_UskinDLL, "int", "USkinAboutSkin") If @error Then Return SetError(2,0,0) Return $result[0] EndFunc #cs ---------------------------------------------------------------------------- Function Name :USkinGetMenu Description :retrieves the handle to the menu assigned to the given window ProtoType : HMENU USkinGetMenu( HWND hWnd // handle to the window ); Parameters : hWnd [in] handle to the window Return values : The return value is the handle to the menu. If the given window has no menu, the return value is NULL. #ce ; USKIN_API HMENU __stdcall USkinGetMenu(HWND hWnd); Func _USkin_GetMenu($hWnd) If $__USkin_UskinDLL<0 Then Return SetError(1,0,0) Local $result = DllCall($__USkin_UskinDLL, "ptr", "USkinGetMenu", "hWnd", $hWnd) If @error Then Return SetError(2,0,0) Return $result[0] EndFunc #cs ---------------------------------------------------------------------------- Function Name :USkinUpdateMenuBar Description :Update window menubar after modify the menu get from USkinGetMenu. ProtoType : BOOL USkinUpdateMenuBar( HWND hWnd // Handle of window ); Parameters : hWnd [in] handle of window to update menubar Return values : If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. #ce ; USKIN_API BOOL __stdcall USkinUpdateMenuBar(HWND hWnd); Func _USkin_UpdateMenuBar($hWnd) If $__USkin_UskinDLL<0 Then Return SetError(1,0,0) Local $result = DllCall($__USkin_UskinDLL, "int", "USkinUpdateMenuBar", "hWnd", $hWnd) If @error Then Return SetError(2,0,0) Return $result[0] EndFunc #cs ---------------------------------------------------------------------------- Function Name :USkinApplyColorTheme Description :Apply color theme using hue and saturation. ProtoType : BOOL USkinApplyColorTheme( float fHue // hue float fSaturation // saturation ); Parameters : fHue [in] hue.value range :0.0f-360.f fSaturation [in] saturation.value range:0.0f - 1.0f Return values : If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. #ce ; USKIN_API BOOL __stdcall USkinApplyColorTheme(float fHue,float fSaturation); Func _USkin_ApplyColorTheme($fHue, $fSaturation) If $__USkin_UskinDLL<0 Then Return SetError(1,0,0) Local $result = DllCall($__USkin_UskinDLL, "int", "USkinApplyColorTheme", "float", $fHue, "float", $fSaturation) If @error Then Return SetError(2,0,0) Return $result[0] EndFunc ; Prog@ndy ; same as _USkin_ApplyColorTheme but for a RGB-color Func _USkin_ApplyColorThemeRGB($iRGB) If $__USkin_UskinDLL<0 Then Return SetError(1,0,0) Local $HSV = __USkin_RGB2HSV360(Number($iRGB)) If @error Then Return SetError(3,0,0) Local $result = _USkin_ApplyColorTheme($HSV[0],$HSV[1]) Return SetError(@error,0,$result) EndFunc #cs ---------------------------------------------------------------------------- Function Name :USkinRemoveSkin Description :Pause uskin.unlike USkinExit function,this function not exit uskin lib,just change the interface look and feel into windows default look ProtoType : BOOL USkinRemoveSkin( ); Parameters : none Return values : failed return false,otherwise return true #ce ; USKIN_API BOOL __stdcall USkinRemoveSkin(); Func _USkin_RemoveSkin() If $__USkin_UskinDLL<0 Then Return SetError(1,0,0) Local $result = DllCall($__USkin_UskinDLL, "int", "USkinRemoveSkin") If @error Then Return SetError(2,0,0) Return $result[0] EndFunc #cs ---------------------------------------------------------------------------- Function Name :USkinRestoreSkin Description :After USkinRemoveSkin,call this function to change interface to uskin look and feel. ProtoType : BOOL USkinRestoreSkin( ); Parameters : none Return values : If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. #ce ; USKIN_API BOOL __stdcall USkinRestoreSkin(); Func _USkin_RestoreSkin() If $__USkin_UskinDLL<0 Then Return SetError(1,0,0) Local $result = DllCall($__USkin_UskinDLL, "int", "USkinRestoreSkin") If @error Then Return SetError(2,0,0) Return $result[0] EndFunc ; #FUNCTION# ====================================================================================== ; Name...........: __USkin_RGB2HSV360 ; Description ...: Converts RGB to HSV360 ; Syntax.........: _ColorConvertRGBtoHSL($avArray) ; Parameters ....: $avArray - An array containing RGB values in their respective positions ; Return values .: Success - The array containing the HSL values for the inputted RGB values ; Failure - 0, sets @error to 1 ; Author ........: Ultima ; Modified.......: Prog@ndy ; Remarks .......: See: <a href="http://www.easyrgb.com/math.php?MATH=M18#text18">EasyRGB - Color mathematics and conversion formulas.</a> ; Related .......: _ColorConvertHSLtoRGB ; Link ..........; ; ================================================================================================= Func __USkin_RGB2HSV360($nColor) Local $nR = BitAND(BitShift($nColor, 16), 0xFF) Local $nG = BitAND(BitShift($nColor, 8), 0xFF) Local $nB = BitAND($nColor, 0xFF) Local $nMax = $nR If $nMax < $nG Then $nMax = $nG If $nMax < $nB Then $nMax = $nB Local $nMin = $nR If $nMin > $nG Then $nMin = $nG If $nMin > $nB Then $nMin = $nB ;Local $nMinMaxSum = ($nMax + $nMin) Local $nMinMaxDiff = ($nMax - $nMin) Local $nH, $nS If $nMax = 0 Then ; Grayscale $nS = 0 $nH = 0 Else $nS = $nMinMaxDiff/$nMax ; Hue Switch $nMax Case $nR $nH = ($nG - $nB) / (6 * $nMinMaxDiff) Case $nG $nH = ($nB - $nR) / (6 * $nMinMaxDiff) + 1 / 3 Case $nB $nH = ($nR - $nG) / (6 * $nMinMaxDiff) + 2 / 3 EndSwitch If $nH < 0 Then $nH += 1 If $nH > 1 Then $nH -= 1 EndIf Local $avReturn[3] = [$nH*360, $nS, $nMax] Return $avReturn EndFunchttp://www.neemedia.com/newsite/comments.php?y=08&m=11&entry=entry081110-153248Without load an "SKIN", everything works fine, but if loaded and changing the image, the error appears! 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...
trancexx Posted March 8, 2011 Author Share Posted March 8, 2011 I need the whole thing to determine if error is related to GIFAnimation.au3. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
JScript Posted March 8, 2011 Share Posted March 8, 2011 I need the whole thing to determine if error is related to GIFAnimation.au3.I'll give now:http://www.mediafire.com/?1j0dlgnvl61exwrThis is just an outline of the actual project I have been developing, but the error happens in both scripts.If I remove the part of the script that loads skins, everything works normally! 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...
trancexx Posted March 8, 2011 Author Share Posted March 8, 2011 (edited) It's too complex to analyze. And I don't have access to resources. Could you write a reproducer? Something small(er) that produces the same result. It would be interesting to see if GIFAnimation.au3 is the cause of your problems. Edited March 8, 2011 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
JScript Posted March 8, 2011 Share Posted March 8, 2011 It's too complex to analyze. And I don't have access to resources. Could you write a reproducer? Something small(er) that produces the same result. It would be interesting to see if GIFAnimation.au3 is the cause of your problems. Yes I can, but I will publish the source code when it is fully functional... But about the "problem" I've been digging your script from the first time that I downloaded, and made a small change in function: _GUICtrlSetGIF(), as it made the problem go away. Very strange, very strange ... Func _GUICtrlSetGIF($iControld, $vGIF, $vAdditionalData = Default, $iRenderingStyle = Default, $iForcedARGB = Default) Local $hWinHwnd = GUICtrlGetHandle($iControld) Local $aCtrlPos = WinGetPos($hWinHwnd) Local $iError, $iGIFId If @error Then Return SetError(6, 0, False) If $vAdditionalData = Default Then $vAdditionalData = "" If $aCtrlPos[2] = 0 Then $aCtrlPos[2] = Default If $aCtrlPos[3] = 0 Then $aCtrlPos[3] = Default _GIF_DeleteGIF($iControld, False) $iGIFId = _GUICtrlCreateGIF($vGIF, $vAdditionalData, $aCtrlPos[0], $aCtrlPos[1], $aCtrlPos[2], $aCtrlPos[3], $iRenderingStyle, $iForcedARGB, $iControld) $iError = @error _GIF_ValidateGIF($iGIFId) Return SetError($iError, @extended, Not $iError) EndFunc ;==>_GUICtrlSetGIF 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...
mesale0077 Posted March 8, 2011 Share Posted March 8, 2011 hi Global $hGIF2 = _GUICtrlCreateGIF(@ScriptDir &"\mydll.dll", "RCData;1;1033", 200, 60) GUICtrlSetTip($hGIF2, "JPG from resource") dont read JPG from mydll.dll file why? thank you nowmydll.dll Link to comment Share on other sites More sharing options...
trancexx Posted March 8, 2011 Author Share Posted March 8, 2011 That would be _GUICtrlCreateGIF(@ScriptDir & "\mydll.dll", "10;1;1033", 200, 60) @jscript, that doesn't make sense. Probably a strange coincidence. Make sure you don+t pass large strings (use binary data in that case). ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
JScript Posted March 8, 2011 Share Posted March 8, 2011 @jscript, that doesn't make sense. Probably a strange coincidence. Make sure you don+t pass large strings (use binary data in that case).Happened again in some circumstances, I'll check better what is happening...I'll zip all the source code of the entire project for you to help me better analyze; (if you have a time, of course!) 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...
trancexx Posted March 8, 2011 Author Share Posted March 8, 2011 Please do. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
mesale0077 Posted March 8, 2011 Share Posted March 8, 2011 (edited) hi this code work _GUICtrlCreateGIF(@ScriptDir & "\mydll.dll", "10;1;1033", 200, 60) thank you Edited March 8, 2011 by mesale0077 Link to comment Share on other sites More sharing options...
tip Posted June 3, 2011 Share Posted June 3, 2011 (edited) Hi trancexx, I have a question about your UDF. Suppose I've created a GUI and placed a pic control with GUICtrlCreatePic then I've set a PNG image with _GUICtrlSetGIF to that control... I'm not an advanced coder but as far I understand your UDF creates a different thread, independent from the script, for animate GIFs, am I right? So if I use GUIDelete to remove the GUI containing the PNG image, but do not exit the script, does it automatically close the thread started by your UDF or is it needed to call _GIF_DeleteGIF prior to deleting the GUI? And the same question goes for the controls created directly by _GUICtrlCreateGIF too... Thanks in advance. Tip Edited June 3, 2011 by tip [center]MsgBox_Tipped: Eye candy msgboxes/inputboxes/loginboxes. | CreateBlankBox: Semi-transparent layers with borders and rounded corners.[/center] Link to comment Share on other sites More sharing options...
trancexx Posted June 3, 2011 Author Share Posted June 3, 2011 (edited) Hi trancexx, I have a question about your UDF. Suppose I've created a GUI and placed a pic control with GUICtrlCreatePic then I've set a PNG image with _GUICtrlSetGIF to that control... I'm not an advanced coder but as far I understand your UDF creates a different thread, independent from the script, for animate GIFs, am I right? So if I use GUIDelete to remove the GUI containing the PNG image, but do not exit the script, does it automatically close the thread started by your UDF or it is needed to call _GIF_DeleteGIF prior to deleting the GUI? And the same question goes for the controls created directly by _GUICtrlCreateGIF too... Thanks in advance.TipUDF works on different levels depending what's to be rendered. For example for PNG image there is no animation and therefore no new thread(s). The same rules as for any GUI control applies here too regarding deletion. If you want to be sure everything is released/deleted properly you will call _GIF_DeleteGIF on control when no longer needed. Edited June 3, 2011 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
tip Posted June 3, 2011 Share Posted June 3, 2011 (edited) UDF works on different levels depending what's to be rendered. For example for PNG image there is no animation and therefore no new thread(s). The same rules as for any GUI control applies here too regarding deletion. If you want to be sure everything is released/deleted properly you will call _GIF_DeleteGIF on control when no longer needed.Thanks RegardsTip Edited June 4, 2011 by tip [center]MsgBox_Tipped: Eye candy msgboxes/inputboxes/loginboxes. | CreateBlankBox: Semi-transparent layers with borders and rounded corners.[/center] 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