All Activity

This stream auto-updates   

  1. Past hour
  2. 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.
  3. #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
  4. Today
  5. 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
  6. 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
  7. Its not related to repainting, problem is that icon stays pressed and when another icon gets pressed, gui of previously pressed icon also appears
  8. * Your buttons in the video have a name as i see in inspect.exe that it shows the text values and as such you should be able to find them by name with th uiawrapper udf * Your rectangles I would make a small wrapper that you can click relative in percentage either from desktopsize or windowsize testpercentagemove("50%","50%") func testpercentagemove($x,$y) if stringinstr($x,"%") Then $realX=stringreplace($x,"%","") * (@DesktopWidth / 100) $realy=stringreplace($y,"%","") * (@DesktopHeight / 100) mousemove($realX ,$realy) EndIf EndFunc * And to handle above I normally would give something a logical name array/collection in between with a little more logic around it logicalname["triangle1"]="50%,50%" * falling back to findbmp udf or solution(s) like SikuliX I allmost never use as percentages with logical names keep things maintainable (and fast) enough * I can mention a lot of commercial tools but I doubt if any of them are easy in bitmap recognition most fallback on the tesseract engine or similar ones
  9. Maybe trying repainting or blocking the paint event. Saludos
  10. I first tried that, but blocking mouse down prevents icon dragging
  11. Then the reason it probably crashed without admin rights is because flash player, being a third party application and not a windows update, would need admin rights in order to install.
  12. Hello. I would do this: Create the Mouse Hook. Handle handle Mouse Down inputs. Get the Mouse Position to check the systray item clicked. Return 1 for block the mouse down event (This should avoid the pressed stated) then check the Mouse Up. (check position of last mouse Down and maybe time for correct pressed time) Block the event returning 1. then show show custom window. Saludos
  13. Hi All, I am so sorry for replying SUPER late again on my post, but after creating the above thread I quit the Job in few months and hence the project was dropped as I was developing an AutoIT script to help my previous colleagues, from getting shouted at for not logging out of a chat application as it is normal human tendency to simply run out of his/her system and forget to logout of a chat application. I am really thankful for all the active members for guiding me and helping me on the above script which I wanted to create, You all are the best !
  14. Nothing can prevent shutdown for one reason - The user can cut the power to the computer. If you are trying to push a package to the PC - it would be best to have the package install in the background while the user is using the computer. There are many resources that explain how to do it. Google is your friend.
  15. The solution to this is here:
  16. bump. Not possible without dll?
  17. If both are pressed I'll send the Hotkey now. Thank you
  18. @Valuater first of all congratulations for the beautiful work, I can not leave the words without space can you explain to me how to take the spaces? I changed $ Space = 2 to $ Space = 0 but it still has space and I want to leave it like this: V A L U A T E R ==> VALUATER
  19. zauber3r, And so? If you want to detect a mouseclick then that is the way to do it - unless you want to get even more exotic and start registering Windows messages, which is even more code..... M23
  20. Thank you for your answer, but it helped me not. I need instead "ALT + 5" as hotkey, "ALT + LeftMouseClick" I want to pop up a contextmenu. With your way I need a lot of more code to send the hotkey....
  21. zauber3r, Welcome to the AutoIt forums. I would use _IsPressed - look in the Help file for more details. M23
  22. I wish it had been this easy in VB 6 without custom controls. I had to do all the computing based on the screen size
  23. You're sure there was no other thread with a similar question in our forums when you searched? Jos
  24. Hi, I know how to run a function with a special hotkey pressed, like "!5" => ALT + 5. How do I the same, with ALT + Left Mouseclick (or right). I did not find anything on google. thanks in advance
  25. Maybe the space was missing behind the statement. Do "we/others" feel the same need that Tidy gets the option to copy the comments behind #cs/#comment-start to the #ce/#comment-end, similar to #region? Jos
  26. After I ran SMF that Trojan warning triggered
  1. Load more activity