All Activity

This stream auto-updates   

  1. Past hour
  2. 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
  3. 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.
  4. 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.
  5. Today
  6. @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
  7. you can get a clue of how I did it at https://www.autoitscript.com/forum/topic/189676-timer-thing-yep-another-one/
  8. 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.
  9. 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.
  10. #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
  11. 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
  12. 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
  13. Its not related to repainting, problem is that icon stays pressed and when another icon gets pressed, gui of previously pressed icon also appears
  14. * 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
  15. Maybe trying repainting or blocking the paint event. Saludos
  16. I first tried that, but blocking mouse down prevents icon dragging
  17. 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.
  18. 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
  19. 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 !
  20. 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.
  21. The solution to this is here:
  22. bump. Not possible without dll?
  23. If both are pressed I'll send the Hotkey now. Thank you
  24. @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
  25. 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
  26. 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....
  27. zauber3r, Welcome to the AutoIt forums. I would use _IsPressed - look in the Help file for more details. M23
  1. Load more activity