-
Posts
107 -
Joined
-
Last visited
About davidkim
- Birthday 04/13/1962
Profile Information
-
Location
Korea Seoul
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
davidkim's Achievements
Adventurer (3/7)
2
Reputation
-
davidkim reacted to a post in a topic: Using ObjCreateInterface() and ObjectFromTag() Functions
-
davidkim reacted to a post in a topic: Using ObjCreateInterface() and ObjectFromTag() Functions
-
davidkim reacted to a post in a topic: Using ObjCreateInterface() and ObjectFromTag() Functions
-
Using ObjCreateInterface() and ObjectFromTag() Functions
davidkim replied to LarsJ's topic in AutoIt Example Scripts
thank you Chimp The executescript function has a JavaScript return value of 0. <script> function calc(x,y){ return x + y; } </script> au3 call... Local $re = $oCoreWebView2.ExecuteScript('calc(5,2);' , Null); $pCoreWebView2ExecuteScriptCompletedHandler) ;Local $ob = json_decode($re) ;Local $info = json_get($ob,'info') MsgBox(0,'', $re ) MsgBox(0,'',String($re) ) $re is return value is 0 -
davidkim reacted to a post in a topic: Using ObjCreateInterface() and ObjectFromTag() Functions
-
Using ObjCreateInterface() and ObjectFromTag() Functions
davidkim replied to LarsJ's topic in AutoIt Example Scripts
thank you LarsJ add question is webview2 support [ ExecutScriptAsync ] method ? https://docs.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.wpf.webview2.executescriptasync?view=webview2-dotnet-1.0.774.44 public System.Threading.Tasks.Task<string> ExecuteScriptAsync (string javaScript); -
Using ObjCreateInterface() and ObjectFromTag() Functions
davidkim replied to LarsJ's topic in AutoIt Example Scripts
Thank your for sharing this excellent UDF. I'm sure many AutoIt-Users are looking at your work with a great expectaion. I have run your examples and they all run as expected. Here I have a couple of questions. My first question is: how do I get the event id when I interface with Edge, clicking a button for example? ex html: <div id="exit">exit</exit> <div id="button_action">action</exit> id:exit or id:button_action click event receved function not search... ----------------------- ie using objevent . Local $oEventsDoc = ObjEvent($oIE.document, "ie_", "HTMLDocumentEvents2") Volatile Func ie_onclick($oEvtObj) If IsObj($oEvtObj) Then Local $sId = $oEvtObj.srcElement.id & "" ConsoleWrite($sId & @CRLF) Switch $sId Case "exit" Exit Case "start_action" ;start_action func EndSwitch EndIf EndFunc ------------------------- Second, how can I inject a jQuery in webview2. In IE, for example, I could use $jQuery = $oIE.document.parentWindow.jQuery. Can I do this in webview2 as well? -
davidkim changed their profile photo
-
use font Download use png Download #include <WindowsConstants.au3> #include <WINAPI.au3> #include <GDIPlus.au3> Global Const $FR_PRIVATE = 0x10 HotKeySet("ESC", "_Exit") _GDIPlus_Startup() ;https://www.dropbox.com/s/j3jh9kluew5i5an/input.png Local $hBitmap = _GDIPlus_BitmapCreateFromFile(@ScriptDir & "\input.png") ;https://www.dropbox.com/s/5oydb9tmb21gwlx/HANSomaM.ttf _WinAPI_AddFontResourceEx(@ScriptDir & '\HANSomaM.ttf', $FR_PRIVATE) Global $mFontname = _WinAPI_GetFontResourceInfo(@ScriptDir & '\HANSomaM.ttf',1) $BackGroundGUI = GUICreate("", 400, 300, -1, -1, $WS_POPUP, $WS_EX_LAYERED) GUISetState(@SW_SHOW,$BackGroundGUI) SetBitmap($BackGroundGUI,$hBitmap,255) $ControlGUI = GUICreate("", 400, 300, 0, 0, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD),$BackGroundGUI) GUISetBkColor(0x003842, $ControlGUI) ;0x003842 _WinAPI_SetLayeredWindowAttributes($ControlGUI, 0x003842, 255) GUISetState(@SW_SHOW,$ControlGUI) GUICtrlCreateInput("test text 1 ", 50, 35,284,20,-1,0) ; Transparent Input Can Cursor and Can Clicked!!! GUIctrlSetBkColor(-1,0x003842) GUICtrlSetFont(-1, 11, 400, 0, $mFontname, 4) GUICtrlSetColor(-1,0xffffff) GUICtrlCreateInput("test text 2", 50, 80,284,20,-1,0) ; Transparent Input Can Cursor and Can Clicked!!! GUIctrlSetBkColor(-1,0x003842) GUICtrlSetFont(-1, 11, 400, 0, $mFontname, 4) GUICtrlSetColor(-1,0xffffff) GUICtrlCreateInput("", 50, 80+42,284,20,-1,0) ; not Transparent Input Can Cursor and Can Clicked!!! ;~ GUIctrlSetBkColor(-1,0x003842) GUICtrlSetFont(-1, 11, 400, 0, $mFontname, 4) ;~ GUICtrlSetColor(-1,0xffffff) GUICtrlCreateInput("", 50, 80+87,284,20,-1,0) ; <== Transparent / Can not Cursor and Can not Clicked!!! GUIctrlSetBkColor(-1,0x003842) GUICtrlSetFont(-1, 11, 400, 0, $mFontname, 4) GUICtrlSetColor(-1,0xffffff) GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST") While 1 Sleep(10) WEnd Func WM_NCHITTEST($hWnd, $iMsg, $iwParam, $ilParam) If ($hWnd = $BackGroundGUI) And ($iMsg = $WM_NCHITTEST) Then Return $HTCAPTION EndFunc ;==>WM_NCHITTEST Func _WinAPI_AddFontResourceEx($sFont, $iFlag = 0, $fNotify = 0) Local $Ret = DllCall('gdi32.dll', 'int', 'AddFontResourceExW', 'wstr', $sFont, 'dword', $iFlag, 'ptr', 0) If (@error) Or (Not $Ret[0]) Then Return SetError(1, 0, 0) EndIf If $fNotify Then DllCall('user32.dll', 'none', 'SendMessage', 'hwnd', 0xFFFF, 'uint', 0x001D, 'wparam', 0, 'lparam', 0) EndIf Return $Ret[0] EndFunc ;==>_WinAPI_AddFontResourceEx Func _WinAPI_GetFontResourceInfo($sFont, $fForce = 0) If $fForce Then If Not _WinAPI_AddFontResourceEx($sFont, 0x20) Then Return SetError(1, 0, '') EndIf EndIf Local $Ret = DllCall('gdi32.dll', 'int', 'GetFontResourceInfoW', 'wstr', $sFont, 'dword*', 4096, 'wstr', '', 'dword', 0x01) If (@error) Or (Not $Ret[0]) Then $Ret = 0 EndIf If $fForce Then _WinAPI_RemoveFontResourceEx($sFont, 0x20) EndIf If Not IsArray($Ret) Then Return SetError(1, 0, '') EndIf Return $Ret[3] EndFunc ;==>_WinAPI_GetFontResourceInfo Func _WinAPI_RemoveFontResourceEx($sFont, $iFlag = 0, $fNotify = 0) Local $Ret = DllCall('gdi32.dll', 'int', 'RemoveFontResourceExW', 'wstr', $sFont, 'dword', $iFlag, 'ptr', 0) If (@error) Or (Not $Ret[0]) Then Return SetError(1, 0, 0) EndIf If $fNotify Then DllCall('user32.dll', 'none', 'SendMessage', 'hwnd', 0xFFFF, 'uint', 0x001D, 'wparam', 0, 'lparam', 0) EndIf Return 1 EndFunc ;==>_WinAPI_RemoveFontResourceEx Func _Exit() Exit EndFunc Func SetBitmap($hGUI, $hImage, $iOpacity) Local Const $AC_SRC_ALPHA = 1 Local Const $ULW_ALPHA = 2 Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend $hScrDC = _WinAPI_GetDC(0) $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC) $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap) $tSize = DllStructCreate($tagSIZE) $pSize = DllStructGetPtr($tSize) DllStructSetData($tSize, "X", _GDIPlus_ImageGetWidth($hImage)) DllStructSetData($tSize, "Y", _GDIPlus_ImageGetHeight($hImage)) $tSource = DllStructCreate($tagPOINT) $pSource = DllStructGetPtr($tSource) $tBlend = DllStructCreate($tagBLENDFUNCTION) $pBlend = DllStructGetPtr($tBlend) DllStructSetData($tBlend, "Alpha", $iOpacity) DllStructSetData($tBlend, "Format", $AC_SRC_ALPHA) _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA) _WinAPI_ReleaseDC(0, $hScrDC) _WinAPI_SelectObject($hMemDC, $hOld) _WinAPI_DeleteObject($hBitmap) _WinAPI_DeleteDC($hMemDC) EndFunc ;==>SetBitmap ; not Transparent Input Can Cursor and Can Clicked!!! how to can Transparent ?
-
Thanks BuckMaster added LangFile=Korean.lng
-
server php source....is save to upload.php ------------------------------------------------------------------------------------------ <html> <head> <title>File Upload</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" > </head> <body> <form enctype="multipart/form-data" action="upload.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="4000000"> <input name="upfile" type="file"><br> <input type="submit" name="submit" value="Upload"> </form> </body> <?php if (isset($_POST['submit']) && !empty($_FILES["upfile"]) && move_uploaded_file($_FILES['upfile']['tmp_name'], "up/".basename($_FILES['upfile']['name']))) { echo "move ok "."up/".basename($_FILES['upfile']['name']); } else { echo "not move ".$_FILES['upfile']['error']." ->".$_FILES['upfile']['tmp_name']." ->".$_FILES['upfile']['type']; } ?> --------------------------------------------------------------------------------------------------- upload.au3 source..... #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_Language=1042 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include "WinHttp.au3" Global Const $Adresas = "test_website.com" $subdomain = "/upload.php" $file = @scriptdir & "tttt.txt" Global $test = _WinHttpCreateUrl($Adresas) Global $hOpen = _WinHttpOpen("Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1") Global $hConnect = _WinHttpConnect($hOpen, $Adresas) $Token = _WinHttpSimpleRequest($hConnect, "POST") Global $sHTM = _WinHttpSimpleFormFill($hConnect, $subdomain, "index:0", "name:upfile", $file ,"X-Atlassian-Token: nocheck") _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen) ConsoleWrite($sHTM ) it's tttt.txt is upload......Successfully uploaded. but $file = @scriptdir & "tttt.jpg" or $file = @scriptdir & "tttt.zip" don't upload....... echo $_FILES['upfile']['error'] ==> value is 3... how to can image or zip file upload????
-
_GUICtrlListView_AddItem icon bug?
davidkim replied to davidkim's topic in AutoIt GUI Help and Support
wow .... not image index number set icon ??? -
_GUICtrlListView_AddItem not insert icon want how ? #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <GuiImageList.au3> #include <WindowsConstants.au3> _Main() Func _Main() Local $hGui, $listview, $hImage ;~ Local $exStyles = BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES) Local $exStyles = BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES, $LVS_EX_GRIDLINES, $LVS_EX_CHECKBOXES, $LVS_EX_DOUBLEBUFFER) $hGui = GUICreate("ImageList AddIcon", 400, 300) $listview = GUICtrlCreateListView( "", 2, 2, 394, 268, BitOR($LVS_SHOWSELALWAYS, $LVS_NOSORTHEADER, $LVS_REPORT)) _GUICtrlListView_SetExtendedListViewStyle($listview, $exStyles) GUISetState() ; Load images $hImage = _GUIImageList_Create(16, 16, 5, 3) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 110) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 131) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 165) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 168) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 137) _GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 146) _GUICtrlListView_SetImageList($listview, $hImage, 1) ; Add columns _GUICtrlListView_AddColumn($listview, "Column 1", 120) _GUICtrlListView_AddColumn($listview, "Column 2", 100) _GUICtrlListView_AddColumn($listview, "Column 3", 100) ; Add items _GUICtrlListView_AddItem($listview, "",-1) _GUICtrlListView_AddSubItem($listview, 0, "", 1) _GUICtrlListView_AddSubItem($listview, 0, "", 2, 2) _GUICtrlListView_AddItem($listview, "") _GUICtrlListView_AddSubItem($listview, 1, "", 1) _GUICtrlListView_AddItem($listview, "") _GUICtrlListView_AddItem($listview, "") _GUICtrlListView_AddItem($listview, "") _GUICtrlListView_AddSubItem($listview, 4, "", 1) _GUICtrlListView_AddItem($listview, "") _GUICtrlListView_AddSubItem($listview, 5, "", 1) _GUICtrlListView_AddSubItem($listview, 5, "", 2, 3) ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc First enters the index icon. To remove this??? i want insert icon to sub index #2 not insert index... help...me
-
How to use $_FILES Global Var? i'm use code... <?php $error = ""; $msg = ""; $fileElementName = 'fileToUpload'; if(!empty($_FILES[$fileElementName]['error'])) { switch($_FILES[$fileElementName]['error']) { case '1': $error = 'The uploaded file exceeds the upload_max_filesize directive in php.ini'; break; case '2': $error = 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form'; break; case '3': $error = 'The uploaded file was only partially uploaded'; break; case '4': $error = 'No file was uploaded.'; break; case '6': $error = 'Missing a temporary folder'; break; case '7': $error = 'Failed to write file to disk'; break; case '8': $error = 'File upload stopped by extension'; break; case '999': default: $error = 'No error code avaiable'; } }elseif(empty($_FILES['fileToUpload']['tmp_name']) || $_FILES['fileToUpload']['tmp_name'] == 'none') { $error = 'No file was uploaded..'; }else { $msg .= " File Name: " . $_FILES['fileToUpload']['name'] . ", "; $msg .= " File Size: " . @filesize($_FILES['fileToUpload']['tmp_name']); //for security reason, we force to remove all uploaded file @unlink($_FILES['fileToUpload']); } echo "{"; echo "error: '" . $error . "',n"; echo "msg: '" . $msg . "'n"; echo "}"; ?> how convert FASTCGI code??
-
Thank UEZ. Round the dial button and drag to rotate I want to run smoothly. drag round dial turn action to backup is $mode = 3 set.. setpng_back($tick_back_png, 0, 3, $fDegree) Func setpng_back($png, $hper, $mode = 0, $fAngle = 0) If $fAngle < -123 Then $fAngle = -123 If $fAngle > 57 Then $fAngle = 57 Local $graph, $hImage, $hHBitmap $hImage = _GDIPlus_ImageClone($png) $graph = _GDIPlus_ImageGetGraphicsContext($hImage) ; create memory blank area If $mode = 3 Then Set_Progress_H($graph, $tick, $tick_hi) Set_Progress_W($graph, $button, $tick_wi) EndIf If $mode = 2 Then Set_Progress_W($graph, $hper, $tick_wi) Set_Progress_H($graph, $tick, $tick_hi) EndIf If $mode = 1 Then Set_Progress_H($graph, $hper, $tick_hi) Set_Progress_W($graph, $button, $tick_wi) EndIf
-
bresenham algorithm : How to ?????? it can dragable dial button???
-
jaberwacky reacted to a post in a topic: GDI Slider
-
mesale0077 reacted to a post in a topic: GDI Slider
-
Dial Butto is Hard...
-
http://ho82.kr/au3/slide.swf Preview 1 Preview 2 slider download Download is valid until 2013/10/23 code #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_icon=C:\AutoIt3\Aut2Exe\Icons\SETUP09.ICO #AutoIt3Wrapper_UseX64=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #Include <GDIPlus.au3> #Include <WindowsConstants.au3> #include <WinAPI.au3> #include <GUIConstantsEx.au3> Global Const $tagBITMAP = 'long bmType;long bmWidth;long bmHeight;long bmWidthBytes;ushort bmPlanes;ushort bmBitsPixel;ptr bmBits;' Global Const $SC_DRAGMOVE = 0xF012 Global $tick_back_png,$tick_hi,$tick_wi,$tick1_png,$tick2_png,$bu1_png,$bu2_png Global $tick = 295 ,$button = 0 Global $tx3 = 430 Global $y3 Global $bx3 Global $by3 = 341 Global $fDragging = False HotKeySet("{ESC}",'_exit_') _GDIPlus_Startup() _LoadTick() $tick_back_form = GUICreate('', 591, 395, -1, -1, $WS_POPUP, $WS_EX_LAYERED) GUISetState() setpng_back($tick_back_png,0) $tick_form = GUICreate("", 54, 55, 430 , 295,$WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $tick_back_form) GUISetState() setpng_tick($tick_form,$tick1_png) $button_form = GUICreate('', 54, 55, 50,341 ,$WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $tick_back_form) GUISetState() setpng_tick($button_form,$bu1_png) ; if form movement size display/move limit GUIRegisterMsg($WM_WINDOWPOSCHANGING, "WM_WINDOWPOSCHANGING") ;~ $SPI_GETDRAGFULLWINDOWS = 38 ;~ $SPI_SETDRAGFULLWINDOWS = 37 Global $result = DllStructCreate("int") ; system value backup DllCall("User32.dll", "int", "SystemParametersInfo", "int", 38, "int", 0, "ptr", DllStructGetPtr($result), "int", 0) ;windows move / mouse down and drag set value DllCall("User32.dll", "int", "SystemParametersInfo", "int", 37, "int", 1, "ptr", 0, "int", 0) While 1 _ReduceMemory(@AutoItPID) $aMsg = GUIGetMsg(1) Switch $aMsg[1] Case $tick_back_form Switch $aMsg[0] Case $GUI_EVENT_PRIMARYDOWN $fDragging = False ;no tick/button to $WM_WINDOWPOSCHANGING _SendMessage($tick_back_form, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) ;move can EndSwitch Case $tick_form Switch $aMsg[0] Case $GUI_EVENT_PRIMARYDOWN setpng_tick($tick_form,$tick2_png) ; Lamp ON $fDragging = True ; yes tick/button to $WM_WINDOWPOSCHANGING $pos = WinGetPos($tick_back_form,'') $tpos = WinGetPos($tick_form,'') $y3 = $tpos[1]-$pos[1] _SendMessage($tick_form, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) ; move can Case $GUI_EVENT_PRIMARYUP setpng_tick($tick_form,$tick1_png) ; Lamp OFF $fDragging = False EndSwitch Case $button_form Switch $aMsg[0] Case $GUI_EVENT_PRIMARYDOWN setpng_tick($button_form,$bu2_png) ; Lamp ON $fDragging = True ; yes tick/button to $WM_WINDOWPOSCHANGING $pos = WinGetPos($tick_back_form,'') $bpos = WinGetPos($button_form) $bx3 = $bpos[0] - $pos[0] _SendMessage($button_form, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) Case $GUI_EVENT_PRIMARYUP setpng_tick($button_form,$bu1_png); Lamp OFF $fDragging = False EndSwitch EndSwitch WEnd Func _exit_() DllCall("User32.dll", "int", "SystemParametersInfo", "int", 37, "int", DllStructGetData($result, 1), "ptr", 0, "int", 0) _GDIPlus_Shutdown() Exit EndFunc Func WM_WINDOWPOSCHANGING($hWnd, $Msg, $wParam, $lParam) If $hWnd = $tick_form And $fDragging = True Then ; move tick $pos = WinGetPos($tick_back_form,'') $tpos = WinGetPos($tick_form) Local $iY = $tpos[1] ; now Y Pos Local $iY_Min = $pos[1]+90 ; y min Local $iY_Max = $pos[1]+300 ; y max Local $stWinPos = DllStructCreate("uint;uint;int;int;int;int;uint", $lParam) Local $NowPosition = $pos[0]+$tx3 Local $iLeft = DllStructGetData($stWinPos, 3) Local $iTop = DllStructGetData($stWinPos, 4) setpng_back($tick_back_png,210-($iY_Max-$iY),1) ; move area calc $tick = 210-($iY_Max-$iY) ; Last Position Store If $iTop < $iY_Min Then DllStructSetData($stWinPos, 4, $iY_Min) If $iTop > $iY_Max Then DllStructSetData($stWinPos, 4, $iY_Max) If $iLeft <> $NowPosition Then DllStructSetData($stWinPos, 3, $pos[0]+$tx3) ; x position fixed EndIf If $hWnd = $button_form And $fDragging = True Then $pos = WinGetPos($tick_back_form,'') $bpos = WinGetPos($button_form) Local $iX = $bpos[0] ; now X Pos Local $iX_Min = $pos[0]+50 ; x min Local $iX_Max = $pos[0]+481 ; x max Local $stWinPos = DllStructCreate("uint;uint;int;int;int;int;uint", $lParam) Local $NowPosition = $pos[1]+$by3 Local $iLeft = DllStructGetData($stWinPos, 3) Local $iTop = DllStructGetData($stWinPos, 4) setpng_back($tick_back_png, 451-($iX_Max-$iX),2) ; move area calc $button = 451-($iX_Max-$iX) ; Last Position Store If $iLeft < $iX_Min Then DllStructSetData($stWinPos, 3, $iX_Min) If $iLeft > $iX_Max Then DllStructSetData($stWinPos, 3, $iX_Max) If $iTop <> $NowPosition Then DllStructSetData($stWinPos, 4, $pos[1]+$by3) ; y position fixed EndIf EndFunc 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 Func setpng_back($png,$hper,$mode = 0) Local $graph, $hImage $hImage = _GDIPlus_ImageClone($png) $graph = _GDIPlus_ImageGetGraphicsContext($hImage) ; create memory blank area If $mode = 2 Then Set_Progress_W($graph,$hper,$tick_wi) Set_Progress_H($graph,$tick,$tick_hi) EndIf If $mode = 1 Then Set_Progress_H($graph,$hper,$tick_hi) Set_Progress_W($graph,$button,$tick_wi) EndIf _WinAPI_UpdateLayeredWindowEx($tick_back_form, _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage), 255, 1) _GDIPlus_GraphicsSetSmoothingMode($graph, 4) _GDIPlus_GraphicsDispose($graph) _GDIPlus_ImageDispose($hImage) EndFunc Func Set_Progress_W($graph,$ct,$png) _GDIPlus_GraphicsDrawImageRectRect($graph, $png, _ 0, 0 ,$ct,12, _ 70, 355 ,$ct ,12) EndFunc Func Set_Progress_H($graph,$ct,$png) _GDIPlus_GraphicsDrawImageRectRect($graph, $png, _ 0, $ct ,12,240-$ct , _ 450, $ct+95, 12 ,240-$ct) EndFunc Func setpng_tick($hForm,$png) Local $graph, $hImage $hImage = _GDIPlus_ImageClone($png) $graph = _GDIPlus_ImageGetGraphicsContext($hImage) _WinAPI_UpdateLayeredWindowEx($hForm, _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage), 255, 1) _GDIPlus_GraphicsSetSmoothingMode($graph, 4) _GDIPlus_GraphicsDispose($graph) _GDIPlus_ImageDispose($hImage) EndFunc Func _GDIPlus_ImageClone($hImage) Local $aResult = DllCall($ghGDIPDll, 'uint', 'GdipCloneImage', 'ptr', $hImage, 'ptr*', 0) If @error Then Return SetError(1, 0, 0) Else If $aResult[0] Then Return SetError($aResult[0], 0, 0) EndIf EndIf Return $aResult[2] EndFunc ;==>_GDIPlus_ImageClone Func _WinAPI_UpdateLayeredWindowEx($hWnd, $hBitmap, $iOpacity = 255, $fDelete = 0) Local $Ret, $tSIZE, $tPOINT, $tBLENDFUNCTION, $hDC, $hDestDC, $hDestSv $Ret = DllCall('user32.dll', 'hwnd', 'GetDC', 'hwnd', $hWnd) $hDC = $Ret[0] $Ret = DllCall('gdi32.dll', 'hwnd', 'CreateCompatibleDC', 'hwnd', $hDC) $hDestDC = $Ret[0] $Ret = DllCall('gdi32.dll', 'hwnd', 'SelectObject', 'hwnd', $hDestDC, 'ptr', $hBitmap) $hDestSv = $Ret[0] $tSIZE = _WinAPI_GetBitmapDimension($hBitmap) $tPOINT = DllStructCreate($tagPOINT) $tBLENDFUNCTION = DllStructCreate($tagBLENDFUNCTION) DllStructSetData($tBLENDFUNCTION, 'Alpha', $iOpacity) DllStructSetData($tBLENDFUNCTION, 'Format', 1) $Ret = DllCall('user32.dll', 'int', 'UpdateLayeredWindow', 'hwnd', $hWnd, 'hwnd', $hDC, 'ptr', 0, 'ptr', DllStructGetPtr($tSIZE), 'hwnd', $hDestDC, 'ptr', DllStructGetPtr($tPOINT), 'dword', 0, 'ptr', DllStructGetPtr($tBLENDFUNCTION), 'dword', 0x02) DllCall('user32.dll', 'int', 'ReleaseDC', 'hwnd', $hWnd, 'hwnd', $hDC) DllCall('gdi32.dll', 'ptr', 'SelectObject', 'hwnd', $hDestDC, 'ptr', $hDestSv) DllCall('gdi32.dll', 'int', 'DeleteDC', 'hwnd', $hDestDC) If Not $Ret[0] Then Return SetError(1, 0, 0) EndIf If $fDelete Then _WinAPI_DeleteObject($hBitmap) EndIf Return 1 EndFunc ;==>_WinAPI_UpdateLayeredWindowEx Func _WinAPI_GetBitmapDimension($hBitmap) Local $tObj = DllStructCreate($tagBITMAP) Local $Ret = DllCall('gdi32.dll', 'int', 'GetObject', 'int', $hBitmap, 'int', DllStructGetSize($tObj), 'ptr', DllStructGetPtr($tObj)) If (@error) Or (Not $Ret[0]) Then Return SetError(1, 0, 0) EndIf Local $tSIZE = DllStructCreate($tagSIZE) DllStructSetData($tSIZE, 1, DllStructGetData($tObj, 'bmWidth')) DllStructSetData($tSIZE, 2, DllStructGetData($tObj, 'bmHeight')) Return $tSIZE EndFunc ;==>_WinAPI_GetBitmapDimension Func _LoadTick() $tick_back_png = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\tick_back.png') $tick_hi = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\tick_hi.png') $tick_wi = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\tick_wi.png') $tick1_png = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\tick_1.png') $tick2_png = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\tick_2.png') $bu1_png = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\bu_1.png') $bu2_png = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\bu_2.png') EndFunc
-
Download compressed file is error... original size is 681kb ...downloaded size 181 kb... The file is corrupted. Antivirus is turned off. Damage even a few times.