All Activity

This stream auto-updates   

  1. Past hour
  2. Based on following image, it is hard to find the source link related to Excel file for download. So it is hard to find where to start. I cannot even find following function exportFutures() at all. function() { that._exportFutures(); } Could you please give me any hint? Thanks, to everyone very much for any suggestions (^v^)
  3. I know this is a old topic from but I think there are users who can help me. I want to use this to make a list of pictures to a video (Timelaps) How to get the right image to the video? This is what I Have for now but this produce a black avi and not a slideshow? #include <ScreenCapture.au3> #include "AVIWriter.au3" _StartAviLibrary() $avi = _CreateAvi(@DesktopDir & "\test.avi", 5, 200, 200) For $i = 1 To 50 $hImage = _GDIPlus_BitmapCreateFromFile(@DesktopDir & "\Time_lapse_temp\" & $i & ".jpg") $hBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) _AddHBitmapToAvi($avi, $hBMP) _WinAPI_DeleteObject($hBmp) _GDIPlus_ImageDispose($hImage) Next _CloseAvi($avi) _StopAviLibrary() Exit
  4. Have you done as proposed and looked at ... Doubt anybody will code it for you unless you give it a start yourself first and have something to show us. The other option could be to check out WinHttp.au3 by @trancexx. Jos
  5. Today
  6. I prefer powershell or batchfile, could this downloaded task be implemented by scripting? Please help Do you have any suggestions? Thanks, to everyone very much for any suggestions (^v^)
  7. So what do you want to use: AutoIt3 or powershell since you cross posted the same question in both? Jos
  8. Thank you! I'd found your post yet, and then I tried another way and solved my problems
  9. vectorize the raster. Good luck, as I don't know how. I did not understand the question at first. The title is misleading. I guess the amount of pixels to represent 2.jpg gives undesired results. The only way is to have greater a resolution. More pixels.
  10. thank you Danyfirex and water
  11. I want to replace the specified area of picture 1.jpg with picture 2.jpg. my code is as follow: #AutoIt3Wrapper_UseX64 = n #include <GDIPlus.au3> _GDIPlus_Startup() Local $hBitmap = _GDIPlus_ImageLoadFromFile(@ScriptDir&'\1.jpg') Local $hImage_replace = _GDIPlus_ImageLoadFromFile(@ScriptDir&'\2.jpg') ;set the quality Local $iJPGQual = 100 Local $sCLSID = _GDIPlus_EncodersGetCLSID("JPG") Local $tParams = _GDIPlus_ParamInit(10) Local $tData = DllStructCreate("int Quality") DllStructSetData($tData, "Quality", $iJPGQual) Local $pData = DllStructGetPtr($tData) _GDIPlus_ParamAdd($tParams, $GDIP_EPGQUALITY, 1, $GDIP_EPTLONG, $pData) Local $pParams = DllStructGetPtr($tParams) Local $hGraphic = _GDIPlus_ImageGetGraphicsContext($hBitmap) _GDIPlus_GraphicsDrawImageRect($hGraphic, $hImage_replace, 98, 98, 60, 60) _GDIPlus_ImageSaveToFileEx($hBitmap, (@ScriptDir&'\out.jpg'), $sCLSID, $pParams) ;Dispose _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_BitmapDispose($hImage_replace) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_Shutdown() however, i find the out.jpg 's quality is not very good , can anyone help me ? ==================== this is 1.jpg ======================= this is 2.jpg
  12. Do you have any sample on how IUIAutomation do this similar task? so I can study this approach. Do you have any suggestions? Thank you very much for any suggestions (^v^)
  13. or... #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ;~ gone to ;~ https://www.autoitscript.com/wiki/Snippets_(_GUI_)#Animate_Display ;~ for simplicity Global $g_hGui, $g_aGuiPos, $g_hPic, $g_aPicPos, $trans = 0, $iPic, $hPic Example() Func Example() $g_hGui = GUICreate("test Animate Display", 200, 100) WinSetTrans($g_hGui, "", 150) ; i know, not needed. $g_hPic = GUICreate("", 68, 71, 10, 20, $WS_POPUp, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $g_hGui) $iPic = GUICtrlCreatePic(StringLeft(@AutoItExe,StringInStr(@AutoItExe,"\", 0, -1)) & "Examples\GUI\merlin.gif",0,0,0,0) $hPic = GUICtrlGetHandle($iPic) GUISetState(@SW_SHOW, $g_hPic) GUISetState(@SW_SHOW, $g_hGui) HotKeySet("{ESC}", "Main") HotKeySet("{Left}", "Left") HotKeySet("{Right}", "Right") HotKeySet("{Down}", "Down") HotKeySet("{Up}", "Up") HotKeySet("{PGUP}", "TransUp") HotKeySet("{PGDN}", "TransDown") $g_aPicPos = WinGetPos($g_hPic) $g_aGuiPos = WinGetPos($g_hGui) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete($g_hPic) GUIDelete($g_hGui) ExitLoop EndSwitch WEnd HotKeySet("{ESC}") HotKeySet("{Left}") HotKeySet("{Right}") HotKeySet("{Down}") HotKeySet("{Up}") EndFunc ;==>Example Func Main() $g_aGuiPos = WinGetPos($g_hGui) WinMove($g_hGui, "", $g_aGuiPos[0] + 10, $g_aGuiPos[1] + 10) EndFunc ;==>Main Func Left() $g_aPicPos = WinGetPos($g_hPic) WinMove($g_hPic, "", $g_aPicPos[0] - 10, $g_aPicPos[1]) EndFunc ;==>Left Func Right() $g_aPicPos = WinGetPos($g_hPic) WinMove($g_hPic, "", $g_aPicPos[0] + 10, $g_aPicPos[1]) EndFunc ;==>Right Func Down() $g_aPicPos = WinGetPos($g_hPic) WinMove($g_hPic, "", $g_aPicPos[0], $g_aPicPos[1] + 10) EndFunc ;==>Down Func Up() $g_aPicPos = WinGetPos($g_hPic) WinMove($g_hPic, "", $g_aPicPos[0], $g_aPicPos[1] - 10) EndFunc ;==>Up Func TransUp() ;~ $trans -= 15 ;~ If $trans < 15 Then $trans = 15 ;~ If $trans > 255 Then $trans = 255 ;~ WinSetTrans($g_hPic, "", $trans) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $g_hPic, "int", 1000, "long", 0x00050010) ; fade-in EndFunc Func TransDown() ;~ $trans += 15 ;~ If $trans < 0 Then $trans = 0 ;~ If $trans > 255 Then $trans = 255 ;~ WinSetTrans($g_hPic, "", $trans) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $g_hPic, "int", 1000, "long", 0x00040010) ; fade-out EndFunc
  14. Look up IUIAutomation.
  15. Referring to following attached image and given link, I would like to know on how to download those files, such as PowerShell or Excel VBA There is no direct link to be copied. https://www.hkex.com.hk/Market-Data/Futures-and-Options-Prices/Equity-Index/Hang-Seng-Index-Futures-and-Options?sc_lang=en#&product=HSI Does anyone have any suggestions? Thanks in advance for any suggestions
  16. Yesterday
  17. Just had a play and added the option to copy the comments with the current available Tidy version in Beta: Jos
  18. Try this out https://www.autoitscript.com/forum/topic/190926-solved-gdi-transparence-problem-by-image-overlapping/?do=findComment&comment=1370883
  19. Referring to following attached image and given link, There is a that.exportFutures() function to download file, I would like to know on how to code Powershell Script to download those files. function() { that._exportFutures(); } https://www.hkex.com.hk/Market-Data/Futures-and-Options-Prices/Equity-Index/Hang-Seng-Index-Futures-and-Options?sc_lang=en#&product=HSI Does anyone have any suggestions? Thanks in advance for any suggestions
  20. I am creating a script to lock PC's after a given time in hopes of training some staff on locking their PC when they leave their desks. If the script has to lock the PC, the given time is decreased. If the user locks it, it increases. I am having an issue figuring out a way to determine if the user locks the PC. I looked for a way to see if I could setup a hotkey for WIN + L but that got me no where. I've thought about doing some sort of key logging but I am not really interested in going that route unless it is the last resort. I have tried doing a combination of checking if the computer is locked and if it is, check the idle timer, but I couldn't get it accurate enough. Any thoughts or suggestions would be greatly appreciated, thank you. Edit: Found a solution here:
  21. Just trying to display this news site into a GUI with an embedded IE instance: https://news.sky.com/ It looks terrible. Videos won't play. Is there a current way around this? Thank you in advance.
  22. @Elku, Guess you have missed the part where we have changed our forum rules (quite some years ago) and don't allow any topics for game automation anymore. Please read them now. Jos
  23. you can get a clue of how I did it at https://www.autoitscript.com/forum/topic/189676-timer-thing-yep-another-one/
  24. I googled and looked everywhere, couldn't find an answer to this issue. I want to make a macro that works on an inactive (but not minimized) game called Life is Feudal (where the devs have said that macroing is 100% fine). Here is the core of the code; $winhandle=0 $process= InputBox("Process","Enter the PID") $Windowlist=WinList("Life is Feudal: MMO") For $i = 1 to $Windowlist[0][0] If WinGetProcess($Windowlist[$i][1])= $process Then $winhandle=$Windowlist[$i][1] EndIf Next while (1=1) Controlsend($winhandle,"","","e") sleep(100) WEnd Now, this works flawlessly if the game is active, if I alt-tab, it will still try to send "e" to the window (I checked), but the game won't receive it. I've tried all kinds of many but it's just not working. The same code works for pretty much any games I've tried, just not this one, not sure why.
  25. AMSPeople, Please stick to just the one thread. And you need to allow the resizing event to return before resetting the column width: #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> Global $bSized = False $hGUI = GUICreate('---', 950, 765, Default, Default, BitOR($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX, $WS_SIZEBOX)) $idCatalog = GUICtrlCreateListView("Code|Name|Mnf|Price", 210, 40, 720, 353) GUICtrlSetResizing(-1, 102) _GUICtrlListView_SetColumnWidth($idCatalog, 0, 50) _GUICtrlListView_SetColumnWidth($idCatalog, 1, 495) _GUICtrlListView_SetColumnWidth($idCatalog, 2, 100) _GUICtrlListView_SetColumnWidth($idCatalog, 3, 70) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) GUIRegisterMsg($WM_SIZE, "MY_WM_SIZE") GUIRegisterMsg($WM_GETMINMAXINFO, "_WM_GETMINMAXINFO") ; Monitors resizing of the GUI While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch If $bSized Then _GUICtrlListView_SetColumnWidth($idCatalog, 1, ControlGetPos($hGUI, '', $idCatalog)[2] - 230) $bSized = False EndIf WEnd Func _WM_GETMINMAXINFO($hWnd, $Msg, $wParam, $lParam) ; used to limit the minimum size of the GUI #forceref $hWnd, $Msg, $wParam, $lParam If $hWnd = $hGUI Then Local $tagMaxinfo = DllStructCreate("int;int;int;int;int;int;int;int;int;int", $lParam) DllStructSetData($tagMaxinfo, 7, 964) ; min width DllStructSetData($tagMaxinfo, 8, 800) ; min height ConsoleWrite(WinGetPos(ControlGetHandle($hGUI, "", $idCatalog))[2] & @CRLF) ConsoleWrite(ControlGetPos($hGUI, '', $idCatalog)[2] & @CRLF) _GUICtrlListView_SetColumnWidth($idCatalog, 1, ControlGetPos($hGUI, '', $idCatalog)[2] - 230) Return $GUI_RUNDEFMSG EndIf EndFunc ;==>_WM_GETMINMAXINFO Func MY_WM_SIZE($hWnd, $iMsg, $iwParam, $ilParam) $bSized = True Return $GUI_RUNDEFMSG EndFunc ;==>MY_WM_SIZE M23 Edit: Or as argumentum has done above, use the built-in events - the methodology is the same.
  26. #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> $hGUI = GUICreate('---', 950, 765, Default, Default, BitOR($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX, $WS_SIZEBOX)) $idCatalog = GUICtrlCreateListView("Code|Name|Mnf|Price", 210, 40, 720, 353) GUICtrlSetResizing(-1, 102) _GUICtrlListView_SetColumnWidth($idCatalog, 0, 50) _GUICtrlListView_SetColumnWidth($idCatalog, 1, 495) _GUICtrlListView_SetColumnWidth($idCatalog, 2, 100) _GUICtrlListView_SetColumnWidth($idCatalog, 3, 70) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) ;~ GUIRegisterMsg($WM_SIZE, "MY_WM_SIZE") ;~ GUIRegisterMsg($WM_GETMINMAXINFO, "_WM_GETMINMAXINFO") ; Monitors resizing of the GUI While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUIDelete() Exit Case $GUI_EVENT_RESIZED, $GUI_EVENT_MAXIMIZE, $GUI_EVENT_RESTORE SetColumnWidth() EndSwitch WEnd Func SetColumnWidth() ConsoleWrite(WinGetPos(ControlGetHandle($hGUI, "", $idCatalog))[2] & @CRLF) ConsoleWrite(ControlGetPos($hGUI, '', $idCatalog)[2] & @CRLF) _GUICtrlListView_SetColumnWidth($idCatalog, 1, ControlGetPos($hGUI, '', $idCatalog)[2] - 230) EndFunc ;~ Func _WM_GETMINMAXINFO($hWnd, $Msg, $wParam, $lParam) ; used to limit the minimum size of the GUI ;~ #forceref $hWnd, $Msg, $wParam, $lParam ;~ If $hWnd = $hGUI Then ;~ Local $tagMaxinfo = DllStructCreate("int;int;int;int;int;int;int;int;int;int", $lParam) ;~ DllStructSetData($tagMaxinfo, 7, 964) ; min width ;~ DllStructSetData($tagMaxinfo, 8, 800) ; min height ;~ SetColumnWidth() ;~ Return $GUI_RUNDEFMSG ;~ EndIf ;~ EndFunc ;==>_WM_GETMINMAXINFO ;~ Func MY_WM_SIZE($hWnd, $iMsg, $iwParam, $ilParam) ;~ SetColumnWidth() ;~ Return $GUI_RUNDEFMSG ;~ EndFunc ;==>MY_WM_SIZE
  27. Actions: ConsoleWrite(WinGetPos(ControlGetHandle($hGUI, "", $idCatalog))[2] & @CRLF) ConsoleWrite(ControlGetPos($hGUI, '', $idCatalog)[2] & @CRLF) do not get the correct width of idCatalogobject when I maximized the GUI. #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> $hGUI = GUICreate('---', 950, 765, Default, Default, BitOR($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX, $WS_SIZEBOX)) $idCatalog = GUICtrlCreateListView("Code|Name|Mnf|Price", 210, 40, 720, 353) GUICtrlSetResizing(-1, 102) _GUICtrlListView_SetColumnWidth($idCatalog, 0, 50) _GUICtrlListView_SetColumnWidth($idCatalog, 1, 495) _GUICtrlListView_SetColumnWidth($idCatalog, 2, 100) _GUICtrlListView_SetColumnWidth($idCatalog, 3, 70) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) GUIRegisterMsg($WM_SIZE, "MY_WM_SIZE") GUIRegisterMsg($WM_GETMINMAXINFO, "_WM_GETMINMAXINFO") ; Monitors resizing of the GUI While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _WM_GETMINMAXINFO($hWnd, $Msg, $wParam, $lParam) ; used to limit the minimum size of the GUI #forceref $hWnd, $Msg, $wParam, $lParam If $hWnd = $hGUI Then Local $tagMaxinfo = DllStructCreate("int;int;int;int;int;int;int;int;int;int", $lParam) DllStructSetData($tagMaxinfo, 7, 964) ; min width DllStructSetData($tagMaxinfo, 8, 800) ; min height ConsoleWrite(WinGetPos(ControlGetHandle($hGUI, "", $idCatalog))[2] & @CRLF) ConsoleWrite(ControlGetPos($hGUI, '', $idCatalog)[2] & @CRLF) _GUICtrlListView_SetColumnWidth($idCatalog, 1, ControlGetPos($hGUI, '', $idCatalog)[2] - 230) Return $GUI_RUNDEFMSG EndIf EndFunc ;==>_WM_GETMINMAXINFO Func MY_WM_SIZE($hWnd, $iMsg, $iwParam, $ilParam) _GUICtrlListView_SetColumnWidth($idCatalog, 1, ControlGetPos($hGUI, '', $idCatalog)[2] - 230) Return $GUI_RUNDEFMSG EndFunc ;==>MY_WM_SIZE
  28. Referring to following attached image and given link, I would like to know on how to code Powershell Script to download those files. There is no direct link to be copied. https://www.hkex.com.hk/Market-Data/Futures-and-Options-Prices/Equity-Index/Hang-Seng-Index-Futures-and-Options?sc_lang=en#&product=HSI Does anyone have any suggestions? Thanks in advance for any suggestions
  1. Load more activity