Leaderboard
Popular Content
Showing content with the highest reputation on 02/17/2016 in all areas
-
Image animation element running continuously
Rechard_Long reacted to UEZ for a topic
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 EndFunc1 point -
Image animation element running continuously
Rechard_Long reacted to UEZ for a topic
Ok, the animation runs properly. What is your problem now?1 point -
Image animation element running continuously
Rechard_Long reacted to mLipok for a topic
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)1 point -
Image animation element running continuously
Rechard_Long reacted to mikell for a topic
Hum probably mLipok's comment meant also : please post your code1 point -
Image animation element running continuously
Rechard_Long reacted to mLipok for a topic
Please try to make your description of your problem more readable.1 point -
VB6 is a completely different, no longer sold (but still supported) language from VB.NET (which the current version of is VB14). Pointers in VB6 are native pointers. What you need is exactly this: Yes. I suggest you read the AutoIt Helpfile on that topic, which should make this clearer.1 point
-
It should, but not all branches have a datacenter. I tried this: https://support.smartbear.com/viewarticle/72139/ And it worked. I wished that there would be a way to do something like this to avoid that behavior when disconnecting. The only thing I found is so jury-rigged... https://support.smartbear.com/viewarticle/72794/1 point
-
Good point. Fixed. Thanks @JohnOne mLipok1 point
-
Insert image into a field in a ListView control
DinFuv reacted to InunoTaishou for a topic
Something like this? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> #include <GuiImageList.au3> #include <GDIPlus.au3> Global $hGUI = GUICreate("ListView example", 300, 250) Global $progress_width = 100 Global $progress_height = 20 Global $bitmap_path = @ScriptDir & "\Progress\" CreateGdipProgress() Global $hListView = _GUICtrlListView_Create($hGUI, "Progress|Task", 10, 10, 280, 230, $LVS_REPORT, $WS_EX_CLIENTEDGE) Global $ilImageList = _GUIImageList_Create($progress_width, $progress_height, 5, 3) Global $tps_reports[4] = ["TPS Reports", "TPS Reports Started", "TPS Reports Halfway!", "TPS Reports Almost!!!"] _GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_INFOTIP)) _GUICtrlListView_SetColumnOrder($hListView, "1|0") _GUICtrlListView_SetColumn($hListView, 0, "Progress", 120) _GUICtrlListView_SetColumn($hListView, 1, "Task", 120) For $i = 0 to 100 _GUIImageList_AddBitmap($ilImageList, $bitmap_path & $i & ".bmp") Next _GUICtrlListView_SetImageList($hListView, $ilImageList, 1) _GUICtrlListView_AddItem($hListView, "", Random(0, 1, 1)) _GUICtrlListView_AddSubItem($hListView, 0, "TPS Reports", 1) _GUICtrlListView_AddItem($hListView, "", Random(0, 100, 1)) _GUICtrlListView_AddSubItem($hListView, 1, "Cat Photos", 1) _GUICtrlListView_AddItem($hListView, "", Random(0, 100, 1)) _GUICtrlListView_AddSubItem($hListView, 2, "Code", 1) GUISetState(@SW_SHOW, $hGUI) For $i = 1 to 3 Sleep(1200) _GUICtrlListView_SetItem($hListView, "", 0, 0, 25 * $i) _GUICtrlListView_SetItem($hListView, $tps_reports[$i], 0, 1) Next Sleep(1000) _GUICtrlListView_SetItem($hListView, "", 0, 0, 0) _GUICtrlListView_SetItem($hListView, "TPS Reports JK :)", 0, 1) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Func CreateGdipProgress() _GDIplus_Startup() Local $hWnd_graphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) Local $hWnd_bitmap = _GDIPlus_BitmapCreateFromGraphics($progress_width, $progress_height, $hWnd_graphic) Local $hWnd_gdi_buffer = _GDIPlus_ImageGetGraphicsContext($hWnd_bitmap) Local $hWnd_progress_brush = _GDIPlus_BrushCreateSolid(0xFFCACACA) Local $hWnd_font_family = _GDIPlus_FontFamilyCreate("Segoe UI") Local $hWnd_font = _GDIPlus_FontCreate($hWnd_font_family, 10) Local $hWnd_rect = _GDIPlus_RectFCreate(0, 0, $progress_width, $progress_height) Local $hWnd_string_format = _GDIPlus_StringFormatCreate() Local $hWnd_string_brush = _GDIPlus_BrushCreateSolid(0xFF000000) If (Not FileExists($bitmap_path)) Then DirCreate($bitmap_path) _GDIPlus_StringFormatSetAlign($hWnd_string_format, 1) _GDIPlus_StringFormatSetLineAlign($hWnd_string_format, 1) _GDIPlus_GraphicsSetSmoothingMode($hWnd_bitmap, $GDIP_SMOOTHINGMODE_HIGHQUALITY) _GDIPlus_GraphicsSetSmoothingMode($hWnd_graphic, $GDIP_SMOOTHINGMODE_HIGHQUALITY) For $i = 0 to 100 If (FileExists($bitmap_path & $i & ".bmp")) Then ContinueLoop _GDIPlus_GraphicsClear($hWnd_gdi_buffer, 0xFFF0F0F0) _GDIPlus_GraphicsFillRect($hWnd_gdi_buffer, 1, 0, ($i / 100) * 98, $progress_height, $hWnd_progress_brush) _GDIPlus_GraphicsDrawRect($hWnd_gdi_buffer, 0, 0, $progress_width - 1, $progress_height - 1) _GDIplus_GraphicsDrawStringEx($hWnd_gdi_buffer, $i & "%", $hWnd_font, $hWnd_rect, $hWnd_string_format, $hWnd_string_brush) _GDIPlus_ImageSaveToFile($hWnd_bitmap, $bitmap_path & $i & ".bmp") Next _GDIPlus_GraphicsDispose($hWnd_graphic) _GDIPlus_BitmapDispose($hWnd_bitmap) _GDIPlus_BrushDispose($hWnd_progress_brush) _GDIPlus_FontFamilyDispose($hWnd_font_family) _GDIPlus_FontDispose($hWnd_Font) _GDIPlus_StringFormatDispose($hWnd_string_format) _GDIPlus_BrushDispose($hWnd_string_brush) _GDIPlus_Shutdown() EndFunc I used GDI+ to create some progress bars since we don't have your images. You could use what is created by the script using GDI+ or have your own images instead (just make sure they're .bmp files). Someone said that you can only have an image in the first column of a listview but _GUICtrlListView_SetColumnOrder will change the order. Technically the images are still in the first column (_GUICtrlListView_SetColumn($hListView, 0, "Progress", 120) changes column 0, but what's displayed in column 0 is the task) but it's just displayed opposite.1 point -
Hmm this looks like a great confusion between declaring an array, walking through an array [$i] and selecting the first element of an array [0] Please try this one and guess what Edit BTW be careful with the syntax, $a... is for arrays, $s... for strings, and $b... for booleans #include <String.au3> f_e5440Drivers() Func f_e5440Drivers() Local $sRead = InetRead('http://downloads.dell.com/published/pages/latitude-e5450-laptop.html', 1) Local $aDataBIOS = _StringBetween(BinaryToString($sRead), 'Type: BIOS', 'Category: Communications') Local $aDataGraphics = _StringBetween(BinaryToString($sRead), 'Category: Video', 'Type: Firmware') Local $aDataNetwork = _StringBetween(BinaryToString($sRead), 'Category: Network', 'Type: Utility') TrayTip("", "Downloading latest drivers, please wait...", 10, 3) Local $aLinksBIOS = _StringBetween($aDataBIOS[0], '<TR><TD>', '</TD></TR>') Local $aLinksGraphics = _StringBetween($aDataGraphics[0], '<TR><TD>', '</TD></TR>') Local $aLinksNetwork = _StringBetween($aDataNetwork[0], '<TR><TD>', '</TD></TR>') Local $slinksBIOS = "" Local $sLinksGraphics = "" Local $sLinksNetwork = "" For $i = 0 To UBound($aLinksBIOS) - 1 ;~ $aLinksBIOS[$i] = 'http://downloads.dell.com/' & $aLinksBIOS[$i] If StringInStr($aLinksBIOS[$i], "E5450") Then Local $a2LinksBIOS = _StringBetween($aLinksBIOS[$i], '<A HREF="/', '"><IMG') $sLinksBIOS = 'http://downloads.dell.com/' & $a2LinksBIOS[0] ConsoleWrite($sLinksBIOS & @LF) ExitLoop EndIf Next For $i = 0 To UBound($aLinksGraphics) - 1 ;~ $aLinksGraphics[$i] = 'http://downloads.dell.com/' & $aLinksGraphics[$i] If (StringInStr($aLinksGraphics[$i], "Intel HD, HD 4000/4200/4400/4600/5000/5100/5200/5300/5500 Graphics Driver") AND StringInStr($aLinksGraphics[$i], "Windows 7, 8 and 8.1 32-bit OS")) Then Local $a2LinksGraphics = _StringBetween($aLinksGraphics[$i], '<A HREF="/', '"><IMG') $sLinksGraphics = 'http://downloads.dell.com/' & $a2LinksGraphics[0] ConsoleWrite($sLinksGraphics & @LF) ;~ $slink = $aLinks[$i] ExitLoop EndIf Next For $i = 0 To UBound($aLinksNetwork) - 1 ;~ $aLinksNetwork[$i] = 'http://downloads.dell.com/' & $aLinksNetwork[$i] If (StringInStr($aLinksNetwork[$i], "Intel 7265/3165/7260/3160 WiFi Driver") AND StringInStr($aLinksNetwork[$i], "Windows 7 32-bit")) Then Local $a2LinksNetwork = _StringBetween($aLinksNetwork[$i], '<A HREF="/', '"><IMG') $sLinksNetwork = 'http://downloads.dell.com/' & $a2LinksNetwork[0] ConsoleWrite($sLinksNetwork & @LF) ExitLoop EndIf Next EndFunc1 point
-
No worries. At the top of each post, it says Report Post.1 point
-
No, he means click the Report Post link1 point
-
NMap UDF (Beta Version)
PionnerCast reacted to Melba23 for a topic
PionnerCast, When you post code please use Code tags - see here how to do it - so that it is contained in a scrolling box with syntax colouring. M23 Edit: A few spare minutes - so I did it for you.1 point -
Please don't... and use the forum standards. Hope that is not too much to ask. Jos1 point
-
Muriel, My apologies - I misread the OP. I suggest you use something like this to correct the filename: Global $iSubst[10] = [")", "!",'"', "£", "$", "%", "^", "&", "*", "("] ; Original $sFileName = "*###mmm#(#(#(#))).txt" ConsoleWrite($sFilename & @CRLF) ; Extract first number $sFirstNumber = StringLeft($sFileName, 1) For $i = 0 To 9 If $sFirstNumber = $iSubst[$i] Then $sFilename = $i & StringTrimLeft($sFilename, 1) ConsoleWrite($sFileName & @CRLF) EndIf Next ; Make sure first letter of month is uppercase $sFileName = StringMid($sFileName, 1, 4) & StringUpper(StringMid($sFileName, 5, 1)) & StringMid($sFileName, 6) ConsoleWrite($sFileName & @CRLF) M231 point