Jump to content

Recommended Posts

Posted
Currently they have 51 so- called same image is BF_001.PNG By BF_0051.PNG . Now when you want to create GUI opens its first load runs continuously ( think Sleep ( 80 ) is it rather a new image ) is dc but I did it twitched. I give up with this ,

Thanks for all :(
Posted

Please try to make your description of your problem more readable.

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

I'm Polish.
I'm using Google Translate too (very often, but less and less - matter of practice).

Just you must try to use other wording, and try to organize them in horizontal not vertical statement.

 

@mikell is quite right.

If you had problem with english try to use AutoIt language to describe what you want to do.
Of course you must add comments to your example code.

 

btw.
In this case combination of AutoIt+English is much more universal language in comparition to English ;)

 

EDIT2:

If you want a good use GOOGLE Translate

then you need to do multiple translation.
VIETNAMESE> ENGLISH> VIETNAMESE

Then you'll see what others see (those reading)

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 2/17/2016 at 1:09 PM, mLipok said:

I'm Polish.
I'm using Google Translate too.

Just you must try to use other wording, and try to organize them in horizontal not vertical statement.

 

@mikell is quite right.

If you had problem with english try to use AutoIt language to describe what you want to do.
Of course you must add comments to your example code.

 

btw.
In this case combination of AutoIt+English is much more universal language in comparition to English ;)

Expand  

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Icons.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 438, 192, 124)

$ANIMATED = GUICtrlCreatePic("", 30, 30, 264, 90)
_SETIMAGE(-1, @ScriptDir & "\REZ_Systems\UI\UI_BI_FX\BI_FX001.PNG")
GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###
$time = TimerInit()
$id_gui = 1
While 1
   $nMsg = GUIGetMsg()
   Switch $nMsg
      Case $GUI_EVENT_CLOSE
         Exit

   EndSwitch
   If TimerDiff($time) > 70 Then ; 3s loading image
      $id_gui += 1
      If $id_gui = 52 Then $id_gui = 1
      $time = TimerInit()
      _SETIMAGE($ANIMATED,@ScriptDir & "\REZ_Systems\UI\UI_BI_FX\BI_FX0" & $id_gui & ".PNG")
   EndIf
WEnd
 

aaUntitled.png

Posted

Please read this:

 How to post code on the forum 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Hmm, your operating system is in English but you don't understand English.

 

Maybe you can provide also the images in a zip archive.

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Posted

Try this:

#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 438, 192, 124)

$ANIMATED = GUICtrlCreatePic("", 30, 30, 264, 90)
GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

Global Const $STM_SETIMAGE = 0x0172
_GDIPlus_Startup()
Global $i, $aFrames[51]
For $i = 1 To 51
    $aFrames[$i - 1] = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\REZ_Systems\UI\UI_BI_FX\BI_FX0" & $i & ".PNG")
Next
Global $iClear = 0xFFF0F0F0
Global $hBitmap = _GDIPlus_BitmapCreateFromScan0(264, 90), $hGfx = _GDIPlus_ImageGetGraphicsContext($hBitmap)
AdlibRegister("Play_Anim", 70)


While 1
   $nMsg = GUIGetMsg()
   Switch $nMsg
       Case $GUI_EVENT_CLOSE
            AdlibUnRegister("Play_Anim")
            GUIDelete()
            For $i = 0 To 50
                _GDIPlus_ImageDispose($aFrames[$i])
            Next
            _GDIPlus_GraphicsDispose($hGfx)
            _GDIPlus_ImageDispose($hBitmap)
            _GDIPlus_Shutdown()
            Exit
   EndSwitch
WEnd

Func Play_Anim()
    Local Static $iFrame = 0
    _GDIPlus_GraphicsClear($hGfx, $iClear)
    _GDIPlus_GraphicsDrawImageRect($hGfx, $aFrames[$iFrame], 0, 0, 264, 90)
    Local $hGDIBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
    _WinAPI_DeleteObject(GUICtrlSendMsg($ANIMATED, $STM_SETIMAGE, $IMAGE_BITMAP, $hGDIBitmap))
    _WinAPI_DeleteObject($hGDIBitmap)
    $iFrame += 1
    If $iFrame > 50 Then $iFrame = 0
EndFunc

 

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Posted

@UEZ  Interesting implementation.

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 2/17/2016 at 2:13 PM, UEZ said:

Try this:

#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 438, 192, 124)

$ANIMATED = GUICtrlCreatePic("", 30, 30, 264, 90)
GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

Global Const $STM_SETIMAGE = 0x0172
_GDIPlus_Startup()
Global $i, $aFrames[51]
For $i = 1 To 51
    $aFrames[$i - 1] = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\REZ_Systems\UI\UI_BI_FX\BI_FX0" & $i & ".PNG")
Next
Global $iClear = 0xFFF0F0F0
Global $hBitmap = _GDIPlus_BitmapCreateFromScan0(264, 90), $hGfx = _GDIPlus_ImageGetGraphicsContext($hBitmap)
AdlibRegister("Play_Anim", 70)


While 1
   $nMsg = GUIGetMsg()
   Switch $nMsg
       Case $GUI_EVENT_CLOSE
            AdlibUnRegister("Play_Anim")
            GUIDelete()
            For $i = 0 To 50
                _GDIPlus_ImageDispose($aFrames[$i])
            Next
            _GDIPlus_GraphicsDispose($hGfx)
            _GDIPlus_ImageDispose($hBitmap)
            _GDIPlus_Shutdown()
            Exit
   EndSwitch
WEnd

Func Play_Anim()
    Local Static $iFrame = 0
    _GDIPlus_GraphicsClear($hGfx, $iClear)
    _GDIPlus_GraphicsDrawImageRect($hGfx, $aFrames[$iFrame], 0, 0, 264, 90)
    Local $hGDIBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
    _WinAPI_DeleteObject(GUICtrlSendMsg($ANIMATED, $STM_SETIMAGE, $IMAGE_BITMAP, $hGDIBitmap))
    _WinAPI_DeleteObject($hGDIBitmap)
    $iFrame += 1
    If $iFrame > 50 Then $iFrame = 0
EndFunc

 

Expand  

 

Thank you in advance for the code , but when you run it an error ?

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "F:\Dot Kich\Tester.au3"    
"F:\Dot Kich\Tester.au3" (50) : ==> Unknown function name.:
Global $hBitmap = _GDIPlus_BitmapCreateFromScan0(264, 90), $hGfx = _GDIPlus_ImageGetGraphicsContext($hBitmap)
Global $hBitmap = ^ ERROR
>Exit code: 1    Time: 1.951

 

Posted (edited)
  Quote

In this topic , you gave me a standard source , and I should add , " this is important " that the background is transparent , and the present I do not know how handle @@ !

Expand  

Handling transparent images is not easy. You have to adjust the $iClear value according to the background color.

$iClear must be in format ARGB -> AlphaRedGreenBlue

Further it is much easier to handle the color value in hex decimal format -> $iClear = 0xFFF0F0F0

Each color channel must be in the range of 0x00 until 0xFF which is in decimal 0 - 255. 0x is the prefix for hex decimal numbers.

If you clear the picture image first it will start to twitsching again.

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Posted
  On 2/18/2016 at 8:19 AM, UEZ said:

Handling transparent images is not easy. You have to adjust the $iClear value according to the background color.

$iClear must be in format ARGB -> AlphaRedGreenBlue

Further it is much easier to handle the color value in hex decimal format -> $iClear = 0xFFF0F0F0

Each color channel must be in the range of 0x00 until 0xFF which is in decimal 0 - 255. 0x is the prefix for hex decimal numbers.

If you clear the picture image first it will start to twitsching again.

Expand  
Sorry. in my project , these elements it must be transparent , what I need is not being tugged it as source code I did, I hope you help me once again , I thank you very much

:'(

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...