-
Posts
15 -
Joined
-
Last visited
Everything posted by BigOneWay
-
Image fading to transparent
BigOneWay replied to BigOneWay's topic in AutoIt General Help and Support
Only now I have reset the browser, dns problems. I thank you again for the time you have dedicated me, I have a small project for the head but I can not tell you, you would do it in 5 minutes and I would have nothing to do anymore. For me, for the moment ........., that's enough Thanks again. -
Image fading to transparent
BigOneWay replied to BigOneWay's topic in AutoIt General Help and Support
Completed mission, sensei, now I can walk head high, toward sunset on the horizon. Yep, yep, the important thing is to believe it Please do not ask me if I really understood it, I would say a lie. but it works, and I had no doubts. Case 1 ;left to right For $iY = 0 To $iH - 1 $iRowOffset = $iY * $iW + 1 For $iX = 0 To $iW - 1 $iRGB = BitAND(DllStructGetData($tPixel, 1, $iRowOffset + $iX), 0x00FFFFFF) $iAlpha = BitAND(BitShift(DllStructGetData($tPixel, 1, $iRowOffset + $iX), 24), 0xFF) $iAlpha_new = 255 / $iW * $iX $iAlpha_new = $iAlpha_new > $iAlpha ? $iAlpha : $iAlpha_new DllStructSetData($tPixel, 1, BitShift($iAlpha_new, -24) + $iRGB, $iRowOffset + $iX) Next Next Case 2 ;right to left For $iY = 0 To $iH - 1 $iRowOffset = $iY * $iW + 1 For $iX = 0 To $iW - 1 $iRGB = BitAND(DllStructGetData($tPixel, 1, $iRowOffset + $iX), 0x00FFFFFF) $iAlpha = BitAND(BitShift(DllStructGetData($tPixel, 1, $iRowOffset + $iX), 24), 0xFF) $iAlpha_new = 255 - 255 / $iW * $iX $iAlpha_new = $iAlpha_new > $iAlpha ? $iAlpha : $iAlpha_new DllStructSetData($tPixel, 1, BitShift($iAlpha_new, -24) + $iRGB, $iRowOffset + $iX) Next Next Case 3 ;down to up For $iY = 0 To $iH - 1 $iRowOffset = $iY * $iW + 1 For $iX = 0 To $iW - 1 $iRGB = BitAND(DllStructGetData($tPixel, 1, $iRowOffset + $iX), 0x00FFFFFF) $iAlpha = BitAND(BitShift(DllStructGetData($tPixel, 1, $iRowOffset + $iX), 24), 0xFF) $iAlpha_new = 255 / $iH * $iY $iAlpha_new = $iAlpha_new > $iAlpha ? $iAlpha : $iAlpha_new DllStructSetData($tPixel, 1, BitShift($iAlpha_new, -24) + $iRGB, $iRowOffset + $iX) Next Next Case 4 ;up to down For $iY = 0 To $iH - 1 $iRowOffset = $iY * $iW + 1 For $iX = 0 To $iW - 1 $iRGB = BitAND(DllStructGetData($tPixel, 1, $iRowOffset + $iX), 0x00FFFFFF) $iAlpha = BitAND(BitShift(DllStructGetData($tPixel, 1, $iRowOffset + $iX), 24), 0xFF) $iAlpha_new = 255 - 255 / $iH * $iY $iAlpha_new = $iAlpha_new > $iAlpha ? $iAlpha : $iAlpha_new DllStructSetData($tPixel, 1, BitShift($iAlpha_new, -24) + $iRGB, $iRowOffset + $iX) Next Next P.S. Sorry, but now I'm using a proxy that does not allow me to use the tag code Another huge wall was broken to make another small step. Your advice is always precious. Thanks, Marco -
Image fading to transparent
BigOneWay replied to BigOneWay's topic in AutoIt General Help and Support
sorry for the delay, Sensei. put wax, removed wax, like 'Karate Kid'. between work and the other, I did this. Case 2 ;right to left For $iY = 0 To $iH - 1 $iRowOffset = $iY * $iW + 1 For $iX = $iW - 1 To 0 step - 1 $iRGB = BitAND(DllStructGetData($tPixel, 1, $iRowOffset + $iW - 1 - $iX), 0x00FFFFFF) $iAlpha = BitAND(BitShift(DllStructGetData($tPixel, 1, $iRowOffset + $iW - 1 - $iX), 24), 0xFF) $iAlpha_new = 255 / $iW * $iX $iAlpha_new = $iAlpha_new > $iAlpha ? $iAlpha : $iAlpha_new DllStructSetData($tPixel, 1, BitShift($iAlpha_new, -24) + $iRGB, $iRowOffset + $iW - 1 - $iX) Next Next Case 3 ;down to up ;~ For $iX = 0 To $iW - 1 ;~ For $iY = 0 To $iH - 1 ;~ $iRowOffset = $iY * $iW + 1 ;~ $iRGB = BitAND(DllStructGetData($tPixel, 1, $iRowOffset + $iX), 0x00FFFFFF) ;~ $iAlpha = BitAND(BitShift(DllStructGetData($tPixel, 1, $iRowOffset + $iX), 24), 0xFF) ;~ $iAlpha_new = 255 / $iH * $iY ;~ $iAlpha_new = $iAlpha_new > $iAlpha ? $iAlpha : $iAlpha_new ;~ DllStructSetData($tPixel, 1, BitShift($iAlpha_new, -24) + $iRGB, $iRowOffset + $iX) ;~ Next ;~ Next ;Or For $iY = 0 To $iH - 1 $iRowOffset = $iY * $iW + 1 For $iX = 0 To $iW - 1 $iRGB = BitAND(DllStructGetData($tPixel, 1, $iRowOffset + $iX), 0x00FFFFFF) $iAlpha = BitAND(BitShift(DllStructGetData($tPixel, 1, $iRowOffset + $iX), 24), 0xFF) $iAlpha_new = 255 / $iH * $iY $iAlpha_new = $iAlpha_new > $iAlpha ? $iAlpha : $iAlpha_new DllStructSetData($tPixel, 1, BitShift($iAlpha_new, -24) + $iRGB, $iRowOffset + $iX) Next Next Case 4 ;up to down For $iX = 0 To $iW - 1 For $iY = $iH - 1 To 0 step - 1 $iRowOffset = $iY * $iW + 1 $iRGB = BitAND(DllStructGetData($tPixel, 1, $iRowOffset + $iX), 0x00FFFFFF) $iAlpha = BitAND(BitShift(DllStructGetData($tPixel, 1, $iRowOffset + $iX), 24), 0xFF) $iAlpha_new = 255 / $iH * $iY $iAlpha_new = $iAlpha_new > $iAlpha ? $iAlpha : $iAlpha_new DllStructSetData($tPixel, 1, BitShift($iAlpha_new, -24) + $iRGB, $iRowOffset + $iX) Next Next I miss Up to Down. Now I come home and after the work of my father and husband complete my mission. Anyway, I knew you had the answer. Thank you -
Goodmorning everyone Houston have a problem, or rather, I have a problem, I'm trying to turn a bitmap image into an image gradient towards transparency, the code below uses two PNG images I attach, the first is the source image, the second is how it should become. I thought I had found the solution here: https://www.autoitscript.com/forum/topic/152668-gdi-rotate-trasparency-gradient/ But the result was not the right one. I tried to figure out if you could use GDIPlus's FX, WinAPI_AlphaBlend, _WinAPI_GradientFill, _GDIPlus_PathTranslate, and so many others, but it's too much for me. You are my last resource, if you do not know it, it means that it is impossible #include <WindowsConstants.au3> #include <GDIPlus.au3> Global $width = 220 Global $height = 150 $X = (@DesktopWidth - $width)/2 $Y = (@DesktopHeight - $height)/2 Global $graphics, $backbuffer, $bitmap, $Pen, $arrTxt1, $arrTxt2, $fontsize_txt1, $fontsize_txt2 Global $ScreenDc, $dc, $tSize, $pSize, $tSource, $pSource, $tBlend, $pBlend, $tPoint, $pPoint, $gdibitmap $hwnd = GUICreate('', $width, $height, $X, $Y, 0, $WS_EX_LAYERED) _GDIPlus_Startup() $graphics = _GDIPlus_GraphicsCreateFromHWND($hwnd) $bitmap = _GDIPlus_BitmapCreateFromGraphics($width, $height, $graphics) $backbuffer = _GDIPlus_ImageGetGraphicsContext($bitmap) _GDIPlus_GraphicsSetSmoothingMode($backbuffer, 2) $ScreenDc = _WinAPI_GetDC($hWnd) $gdibitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($bitmap) $dc = _WinAPI_CreateCompatibleDC($ScreenDc) _WinAPI_SelectObject($dc, $gdibitmap) ; _WinAPI_UpdateLayeredWindow parameters $tSize = DllStructCreate($tagSIZE) $pSize = DllStructGetPtr($tSize) DllStructSetData($tSize, "X", $width) DllStructSetData($tSize, "Y", $height) $tSource = DllStructCreate($tagPOINT) $pSource = DllStructGetPtr($tSource) $tBlend = DllStructCreate($tagBLENDFUNCTION) $pBlend = DllStructGetPtr($tBlend) Global $alpha = 255 Global $alpha_steps = 5 DllStructSetData($tBlend, "Alpha", $alpha) DllStructSetData($tBlend, "Format", 1) $tPoint = DllStructCreate($tagPOINT) $pPoint = DllStructGetPtr($tPoint) DllStructSetData($tPoint, "X", 0) DllStructSetData($tPoint, "Y", 0) GUISetState() $hOmage = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\Autoit.png') $hOmage = _GDIPlus_ImageResize($hOmage, 70, 70) $hOmage1 = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\Autoit1.png') $hOmage1 = _GDIPlus_ImageResize($hOmage1, 70, 70) _GDIPlus_GraphicsDrawImage ($backbuffer, $hOmage, 15, 70) _GDIPlus_GraphicsDrawImage ($backbuffer, $hOmage1, 85, 70) $gdibitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($bitmap) _WinAPI_SelectObject($dc, $gdibitmap) _WinAPI_UpdateLayeredWindow($hWnd, $ScreenDc, 0, $pSize, $dc, $pSource, 0, $pBlend, 2) _WinAPI_DeleteObject($gdibitmap) while 1 Sleep(100) wend I thank everyone who wants to help me AutoitPNG.zip
-
Refresh GDIPlus graphic and button after minimize
BigOneWay replied to BigOneWay's topic in AutoIt GUI Help and Support
You did me not even give me time to say I'm wrong, you're too fast, and I'm too old for these things. I have seen that _GDIPlus_RegionCombineRect lists normal objects, in fact, if there are no objects, it generates an error. However, if you want to take a look at an old project that goes very slowly, just to tell me if it's time lost or not. I've always been a passionate about the button style etched of access, and I wanted to try to do it in autoit. _GDIBStyle.au3 _GDIButton.au3 Demo.au3 -
Refresh GDIPlus graphic and button after minimize
BigOneWay replied to BigOneWay's topic in AutoIt GUI Help and Support
Thanks for the quick response. Autoit is a program Simply Exceptional and exceptionally simple, except when you put your hands on it. I'm joking, you always have my greatest respect. Correct if I'm wrong, you created a child gui as a layer, So, the update is the sum of the normal window and the secondary window that contains the graphics gdi .. no I did not understand, I must study it still long time. In any case, 'GUIRegisterMsg (0x000F, "WM_PAINT")' is no longer needed. Thanks again. -
Hi Under an old Malkey's script, posted in 2012, runs the refresh after minimizing a GDI+ graphic mask, but the button and the listview disappear. How to refresh the GDI+ graphics and the normal buttons. Excuse my bad English. #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <GDIPlus.au3> #include <GuiListView.au3> Global $hBMPBuff, $hGraphicGUI _Main() Func _Main() Local $hGUI, $hEndCap, $hGraphic $hGUI = GUICreate("GDI+", 400, 300, -1, -1, BitOR($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX)) GUISetState() $CheckBox = GUICtrlCreateButton('Example', 10, 10, 70, 40) $ListV1= GUICtrlCreateListView('', 150, 10, 100, 100 ) _GUICtrlListView_SetBkColor($ListV1, 0x00FFFF) _GUICtrlListView_SetTextBkColor($ListV1, 0x00FFFF) _GUICtrlListView_SetExtendedListViewStyle($ListV1, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES)) _GUICtrlListView_InsertColumn($ListV1, 0, "Column 1", 100) _GUICtrlListView_AddItem($ListV1, "Hello", 1) _GDIPlus_Startup() $hGraphicGUI = _GDIPlus_GraphicsCreateFromHWND($hGUI) $hBMPBuff = _GDIPlus_BitmapCreateFromGraphics(400, 300, $hGraphicGUI) ; Create bitmap the same size as the graphics of the GUI. $hGraphic = _GDIPlus_ImageGetGraphicsContext($hBMPBuff) ; Create graphics for bitmap, $hBMPBuff. (where the graphics is like the canvas of the bitmap) $hPen = _GDIPlus_PenCreate(0xFFFF0000, 2) ; Hex colour format 0xAARRGGBB - Alpha (transparency), Red, Green, Blue. $hEndCap = _GDIPlus_ArrowCapCreate(3, 6) _GDIPlus_PenSetCustomEndCap($hPen, $hEndCap) ; Draw arrows to bitmap _GDIPlus_GraphicsDrawLine($hGraphic, 10, 120, 390, 120, $hPen) _GDIPlus_PenSetWidth($hPen, 4) _GDIPlus_GraphicsDrawLine($hGraphic, 10, 150, 390, 150, $hPen) _GDIPlus_PenSetWidth($hPen, 6) _GDIPlus_GraphicsDrawLine($hGraphic, 10, 180, 390, 180, $hPen) _GDIPlus_GraphicsDrawImage($hGraphicGUI, $hBMPBuff, 0, 0) ; Draw bitmap to GUI (graphics). ; Loop until user exits GUIRegisterMsg(0x000F, "WM_PAINT") ;$WM_PAINT Do Until GUIGetMsg() = $GUI_EVENT_CLOSE ; Clean up resources _GDIPlus_ArrowCapDispose($hEndCap) _GDIPlus_PenDispose($hPen) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_GraphicsDispose($hGraphicGUI) _WinAPI_DeleteObject($hBMPBuff) _GDIPlus_Shutdown() EndFunc ;==>_Main Func WM_PAINT($hGUI, $iMsg, $wParam, $lParam) _GDIPlus_GraphicsDrawImage($hGraphicGUI, $hBMPBuff, 0, 0) _WinAPI_RedrawWindow($hGUI, 0, 0, $RDW_VALIDATE) Return 'GUI_RUNDEFMSG' EndFunc ;==>WM_PAINT Thanks in advance.
-
Hi, I created a small utilty called MF-Link and I wanted to know what is needed to put it in your downloads. When I compile the log file some errors are reported. I have to correct them or I can send it as is My English always comes from google translator. log generated: >"F:\Portable\AutoIt\SciTE4AutoIt3\AutoIt3Wrapper\AutoIt3Wrapper.exe" /ShowGui /in "F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3" +>10:08:33 Starting AutoIt3Wrapper v.2.0.1.22 Environment(Language:0410 Keyboard:00000410 OS:WIN_XP/Service Pack 2 CPU:X64 OS:X86) -> 1 Change(s) made. >Running AU3Check (1.54.14.0) from:F:\Portable\AutoIt F:\Portable\AutoIt\Include\ModernMenuRaw.au3(92,72) : ERROR: $NIM_ADD previously declared as a 'Const' If Not IsDeclared("NIM_ADD") Then Global Const $NIM_ADD = 0x00000000 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(93,78) : ERROR: $NIM_MODIFY previously declared as a 'Const' If Not IsDeclared("NIM_MODIFY") Then Global Const $NIM_MODIFY = 0x00000001 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(94,78) : ERROR: $NIM_DELETE previously declared as a 'Const' If Not IsDeclared("NIM_DELETE") Then Global Const $NIM_DELETE = 0x00000002 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(95,81) : ERROR: $NIM_SETFOCUS previously declared as a 'Const' If Not IsDeclared("NIM_SETFOCUS") Then Global Const $NIM_SETFOCUS = 0x00000003 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(96,85) : ERROR: $NIM_SETVERSION previously declared as a 'Const' If Not IsDeclared("NIM_SETVERSION") Then Global Const $NIM_SETVERSION = 0x00000004 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(98,79) : ERROR: $NIF_MESSAGE previously declared as a 'Const' If Not IsDeclared("NIF_MESSAGE") Then Global Const $NIF_MESSAGE = 0x00000001 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(99,74) : ERROR: $NIF_ICON previously declared as a 'Const' If Not IsDeclared("NIF_ICON") Then Global Const $NIF_ICON = 0x00000002 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(100,72) : ERROR: $NIF_TIP previously declared as a 'Const' If Not IsDeclared("NIF_TIP") Then Global Const $NIF_TIP = 0x00000004 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(101,76) : ERROR: $NIF_STATE previously declared as a 'Const' If Not IsDeclared("NIF_STATE") Then Global Const $NIF_STATE = 0x00000008 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(102,74) : ERROR: $NIF_INFO previously declared as a 'Const' If Not IsDeclared("NIF_INFO") Then Global Const $NIF_INFO = 0x00000010 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(103,81) : ERROR: $NIF_REALTIME previously declared as a 'Const' If Not IsDeclared("NIF_REALTIME") Then Global Const $NIF_REALTIME = 0x00000040 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(104,79) : ERROR: $NIF_SHOWTIP previously declared as a 'Const' If Not IsDeclared("NIF_SHOWTIP") Then Global Const $NIF_SHOWTIP = 0x00000080 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(106,78) : ERROR: $NIS_HIDDEN previously declared as a 'Const' If Not IsDeclared("NIS_HIDDEN") Then Global Const $NIS_HIDDEN = 0x00000001 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(107,85) : ERROR: $NIS_SHAREDICON previously declared as a 'Const' If Not IsDeclared("NIS_SHAREDICON") Then Global Const $NIS_SHAREDICON = 0x00000002 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(109,76) : ERROR: $NIIF_NONE previously declared as a 'Const' If Not IsDeclared("NIIF_NONE") Then Global Const $NIIF_NONE = 0x00000000 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(110,76) : ERROR: $NIIF_INFO previously declared as a 'Const' If Not IsDeclared("NIIF_INFO") Then Global Const $NIIF_INFO = 0x00000001 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(111,81) : ERROR: $NIIF_WARNING previously declared as a 'Const' If Not IsDeclared("NIIF_WARNING") Then Global Const $NIIF_WARNING = 0x00000002 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(112,78) : ERROR: $NIIF_ERROR previously declared as a 'Const' If Not IsDeclared("NIIF_ERROR") Then Global Const $NIIF_ERROR = 0x00000003 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(113,76) : ERROR: $NIIF_USER previously declared as a 'Const' If Not IsDeclared("NIIF_USER") Then Global Const $NIIF_USER = 0x00000004 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(114,85) : ERROR: $NIIF_ICON_MASK previously declared as a 'Const' If Not IsDeclared("NIIF_ICON_MASK") Then Global Const $NIIF_ICON_MASK = 0x0000000F ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(115,81) : ERROR: $NIIF_NOSOUND previously declared as a 'Const' If Not IsDeclared("NIIF_NOSOUND") Then Global Const $NIIF_NOSOUND = 0x00000010 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(116,86) : ERROR: $NIIF_LARGE_ICON previously declared as a 'Const' If Not IsDeclared("NIIF_LARGE_ICON") Then Global Const $NIIF_LARGE_ICON = 0x00000020 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(122,81) : ERROR: $IDI_APPLICATION previously declared as a 'Const' If Not IsDeclared("IDI_APPLICATION") Then Global Const $IDI_APPLICATION = 32512 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(123,69) : ERROR: $IDI_HAND previously declared as a 'Const' If Not IsDeclared("IDI_HAND") Then Global Const $IDI_HAND = 32513 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(124,76) : ERROR: $IDI_QUESTION previously declared as a 'Const' If Not IsDeclared("IDI_QUESTION") Then Global Const $IDI_QUESTION = 32514 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(125,81) : ERROR: $IDI_EXCLAMATION previously declared as a 'Const' If Not IsDeclared("IDI_EXCLAMATION") Then Global Const $IDI_EXCLAMATION = 32515 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(126,76) : ERROR: $IDI_ASTERISK previously declared as a 'Const' If Not IsDeclared("IDI_ASTERISK") Then Global Const $IDI_ASTERISK = 32516 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(127,74) : ERROR: $IDI_WINLOGO previously declared as a 'Const' If Not IsDeclared("IDI_WINLOGO") Then Global Const $IDI_WINLOGO = 32517 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(133,77) : ERROR: $WM_MOUSEMOVE previously declared as a 'Const' If Not IsDeclared("WM_MOUSEMOVE") Then Global Const $WM_MOUSEMOVE = 0x0200 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Portable\AutoIt\Include\ModernMenuRaw.au3(135,77) : ERROR: $WM_LBUTTONUP previously declared as a 'Const' If Not IsDeclared("WM_LBUTTONUP") Then Global Const $WM_LBUTTONUP = 0x0202 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(370,45) : WARNING: $ItemMenu: possibly used before declaration. $var = IniReadSection($Path, $ItemMenu[0]) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(372,32) : WARNING: $ObjList: possibly used before declaration. If $ObjX = $ObjList[$N][0] Then ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(514,33) : WARNING: $ObjTist: possibly used before declaration. GUICtrlDelete ($ObjTist[$N] ) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(1758,25) : WARNING: $Group1: possibly used before declaration. GUICtrlSetState($Group1, ~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(1763,31) : WARNING: $Col: possibly used before declaration. GUICtrlSetState($Col[$Cont], ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(1767,28) : WARNING: $L: possibly used before declaration. GUICtrlSetState($L[$Cont], ~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(1769,26) : WARNING: $sliderR: possibly used before declaration. GUICtrlSetState($sliderR, ~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(1770,26) : WARNING: $sliderG: possibly used before declaration. GUICtrlSetState($sliderG, ~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(1771,26) : WARNING: $sliderB: possibly used before declaration. GUICtrlSetState($sliderB, ~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(1772,27) : WARNING: $SliderRT: possibly used before declaration. GUICtrlSetState($SliderRT, ~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(1773,27) : WARNING: $SliderGT: possibly used before declaration. GUICtrlSetState($SliderGT, ~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(1774,27) : WARNING: $SliderBT: possibly used before declaration. GUICtrlSetState($SliderBT, ~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(1775,27) : WARNING: $VideoRGB: possibly used before declaration. GUICtrlSetState($VideoRGB, ~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(1776,27) : WARNING: $ColorLab: possibly used before declaration. GUICtrlSetState($ColorLab, ~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(1777,23) : WARNING: $HexT: possibly used before declaration. GUICtrlSetState($HexT, ~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(1782,25) : WARNING: $Group3: possibly used before declaration. GUICtrlSetState($Group3, ~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(1783,26) : WARNING: $checkLB: possibly used before declaration. GUICtrlSetState($checkLB, ~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(1784,26) : WARNING: $checkCN: possibly used before declaration. GUICtrlSetState($checkCN, ~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(1785,26) : WARNING: $checkSC: possibly used before declaration. GUICtrlSetState($checkSC, ~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(1786,26) : WARNING: $SequeLB: possibly used before declaration. GUICtrlSetState($SequeLB, ~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(1787,25) : WARNING: $Pictur: possibly used before declaration. GUICtrlSetState($Pictur, ~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(2433,21) : WARNING: $GScroll: possibly used before declaration. GUISwitch($GScroll) ~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(2434,28) : WARNING: $Text: possibly used before declaration. GUICtrlCreateLabel($Text, ~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3(2325,98) : WARNING: $GScroll: declared global in function only. Prefer top of file. Global $GScroll = GUICreate("Child", 276, 80, 10, 90, BitOR($WS_CHILD,$WS_DLGFRAME), -1, $GInfo) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ F:\Access\AU3\MF-Link\MF-Link8ChildGUI.au3 - 30 error(s), 24 warning(s)
-
Sorry sorry! Scythian = Scite Sorry again
-
Hello, excuse my English, I use google translator. In a utility I use my ModernMenuRaw created by Holger Kotschis, the problem is when I do the syntaxcheck or compile with Scythian, tells me that some variables are already dimensioned by Constants.au3. This is a problem or not? #include <Constants.au3> #include <ModernMenuRaw.au3>;Holger Kotsch #include <GUIConstantsEx.au3> $GUI = GUICreate("Hello", 300, 300) GUISetState() do $msg = GUIGetMsg() until $msg = $GUI_EVENT_CLOSE
-
sorry again but you also disable ConsoleWrite('@GUI_DragID: ' & @GUI_DragID & @CRLF) otherwise continues to generate an error
-
sorry Note that with $HProc _WinAPI_SetWindowLong = ($ahIcons0, $GWL_WNDPROC, $pDll) work function: _WinProc changes with Note that with $HProc _WinAPI_SetWindowLong = ($GUI, $GWL_WNDPROC, $pDll) work function: _WinProc
-
I know, infact I came here because the AutoIt forums of my country did not arrive ideas He had also found something that I function #include <GUIConstants.au3> #Include <WinAPIEx.au3> Global Const $WM_DROPFILES = 0x0233 Global $hForm, $Msg, $Check, $Edit, $hEdit, $hDll, $pDll, $hProc $GUI = GUICreate('Drop a file in the edit', 200, 200);, -1, -1, -1, $WS_EX_ACCEPTFILES) ;~ GUICtrlSetState(-1, $GUI_DROPACCEPTED) $ahIcons0 = GUICtrlCreateIcon(@SystemDir & '\shell32.dll' , -5, 85, 85) GUICtrlSetTip(-1,'Ciccio','',1,1) GuiCtrlSetState($ahIcons0 ,$GUI_DROPACCEPTED) $hDll = DllCallbackRegister('_WinProc', 'ptr', 'hwnd;uint;wparam;lparam') $pDll = DllCallbackGetPtr($hDll) $hProc = _WinAPI_SetWindowLong($GUI, $GWL_WNDPROC, $pDll) ;~ $hProc = _WinAPI_SetWindowLong($ahIcons0, $GWL_WNDPROC, $pDll) _WinAPI_DragAcceptFiles($GUI) _WinAPI_DragAcceptFiles($ahIcons0) GUISetState() While 1 $gm = GUIGetMsg() Switch $gm Case $GUI_EVENT_DROPPED ConsoleWrite('@GUI_DragID: ' & @GUI_DragID & @CRLF & '@GUI_DropID: ' & @GUI_DropID & @CRLF & '@GUI_DragFile: ' & @GUI_DragFile & @CRLF) Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Func _WinProc($hWnd, $iMsg, $wParam, $lParam) Switch $iMsg Case $WM_DROPFILES Local $FileList = _WinAPI_DragQueryFileEx($wParam) If (Not @error) And ($FileList[0] = 1) Then ConsoleWrite('@GUI_DragFile: ' & $FileList[1] & @CRLF) ConsoleWrite('@GUI_DragID: ' & @GUI_DragID & @CRLF) EndIf _WinAPI_DragFinish($wParam) Return 0 EndSwitch Return _WinAPI_CallWindowProc($hProc, $hWnd, $iMsg, $wParam, $lParam) EndFunc ;==>_WinProc Note that with $HProc _WinAPI_SetWindowLong = ($ahIcons0, $GWL_WNDPROC, $pDll) work function: _WinProc if active: $HProc _WinAPI_SetWindowLong = ($ahIcons0, $GWL_WNDPROC, $pDll) disabling that for the GUI _WinProc function is turned off and starts working on: Case $ GUI_EVENT_DROPPED in più con la Gui attivata l'icona non viene più individuata e le variabili: @GUI_DragID @GUI_DropID @GUI_DragFile rimangono inutilizzate se individuasse sia icone che finestra sarebbe ottimo. idee? Sorry for my English
-
Yes I have the 3.3 portable version. If I run the drag & drop over the icon it's OK, but I also need to run the drag & drop over the window to a different management of the link. I also tried inserting a picture as background, the result is that the image hides the object icon even if the icon is over the image I also tried to use the WinAPIEx.au3 but I did not understand much
-
Hi am new to the forum, sorry if my English is not so good, i use google translator, and now the question: how do I make the recognition of a drag & drop in a window eg. I drag an icon from the desktop and release on a window, how to catch the values of all objects in the window, including the window. #include <GUIConstants.au3> Opt("GUIOnEventMode", 1) $GUI = GUICreate('Drop a file in the edit', 400, 400, -1, -1, -1, $WS_EX_ACCEPTFILES) $ahIcons0 = GUICtrlCreateIcon(@SystemDir & '\shell32.dll' , -5, 10, 20) GUICtrlSetTip(-1,'Ciccio','',1,1) GuiCtrlSetState($ahIcons0 ,$GUI_DROPACCEPTED) GUISetOnEvent($GUI_EVENT_DROPPED, "Drop") GUISetOnEvent($GUI_EVENT_CLOSE, "Quit") GUISetState() While 1 Sleep(2000) WEnd Func Quit() GUIDelete($GUI) Exit EndFunc Func Drop() ConsoleWrite('@GUI_DropID: ' & @GUI_DropID & ' @GUI_DragFile: ' & @GUI_DragFile & ' @GUI_DragID: ' & @GUI_DragID & @CRLF) EndFunc Any suggestions Thank you