Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Today
  3. Ok, so what have you tried that isn't working? Jos
  4. @Letraindusoir I don't have any plans to create such a tool. Besides, you should really get accustomed to using the browser's built-in dev tools. 😛
  5. i mean to get icon handle or something that can be used with TraySetIcon
  6. ...there is access and permissions. Look at permissions. Other than that, I'm out of clues. 😕
  7. Define "Get". Do you mean to display them in a GUI? Jos
  8. @FrancescoDiMuro Doesn't seem to be related to UAC as it worked fine before, disabling it didn't work @argumentum Same result with both tests: C:\Program Files (x86)\AutoIt3>AutoIt3 "\\VBOXSVR\Win10JailBox\Test.au3" C:\Program Files (x86)\AutoIt3>echo %ERRORLEVEL% 0 C:\Program Files (x86)\AutoIt3>AutoIt3 W:\Test.au3 C:\Program Files (x86)\AutoIt3>echo %ERRORLEVEL% 0
  9. Renderer, Take a look at this thread - it might be just what you need. M23
  10. Bitmap351.bmp What function can be used to get icons from this bmp file?
  11. I just want to edit taskbar context menu which is in explorer.exe.mui (menu 205) to remove some context menu entries, i am not aware of any other way to remove them beside editing explorer.exe.mui. But cant edit explorer.exe.mui inside of installed language packs because they are in WindowsApps folder
  12. Hi, I'm starting with GDIPlus functions and I've got problem (of course 😑 ). Here is the code : #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPISysWin.au3> #include <WinAPIGdi.au3> Opt("GUIOnEventMode", 1) Local $hGUI, $hGraphics, $hBackbuffer, $hBitmap Local Const $iX = Int(@DesktopWidth * 0.5), $iY = Int(@DesktopHeight * 0.5) ; Initialize GDI+ _GDIPlus_Startup() Local $GUI_title = "GDI+" $hGUI = GUICreate($GUI_title, $iX, $iY, -1, -1, BitOR($GUI_SS_DEFAULT_GUI,$WS_THICKFRAME,$WS_TABSTOP)) GUISetState() Local $Child_Gui1 = GUICreate("Child1", 200, 200, 50, 50) GUISetBkColor(0x99B4D1) GUISetState() _WinAPI_SetParent($Child_Gui1, $hGUI) Local $Child_Gui2 = GUICreate("Child2", 200, 200, 300, 300) GUISetBkColor(0x99B4D1) GUISetState() _WinAPI_SetParent($Child_Gui2, $hGUI) $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI) $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iX, $iY, $hGraphics) $hBackbuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap) ; Using antialiasing _GDIPlus_GraphicsSetSmoothingMode($hBackbuffer, 2) Local $hPen = _GDIPlus_PenCreate(0xFF000000, 2) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GUIRegisterMsg(0x0216, "WM_MOVING") While 1 Sleep(20) WEnd Func WM_MOVING($hWnd, $Msg, $wParam, $lParam) Local $trect ;~ typedef struct _RECT { ;~ LONG left; ;~ LONG top; ;~ LONG right; ;~ LONG bottom; ;~ } RECT, *PRECT; If $hWnd = $Child_Gui2 Then $winposChild1 = WinGetPos($Child_Gui1) ; absolute coord ; coord conversion absolute to relative for child1 $tPoint_parent = DllStructCreate("int X;int Y") DllStructSetData($tPoint_parent, "X", $winposChild1[0]) DllStructSetData($tPoint_parent, "Y", $winposChild1[1]) _WinAPI_ScreenToClient($hGUI, $tPoint_parent) $X_relative_child1 = DllStructGetData($tPoint_parent, "X") $Y_relative_child1 = DllStructGetData($tPoint_parent, "Y") $trect = DllStructCreate("struct;long left;long top;long right;long bottom;endstruct" ,$lParam) ; absolute ; coord conversion absolute to relative for child2 $tPoint_parent = DllStructCreate("int X;int Y") DllStructSetData($tPoint_parent, "X", DllStructGetData($trect, "left")) DllStructSetData($tPoint_parent, "Y", DllStructGetData($trect, "top")) _WinAPI_ScreenToClient($hGUI, $tPoint_parent) $X_relative_child2 = DllStructGetData($tPoint_parent, "X") $Y_relative_child2 = DllStructGetData($tPoint_parent, "Y") ; Drawing _GDIPlus_GraphicsClear($hBackbuffer, 0xFFFFFFFF) _GDIPlus_GraphicsDrawLine($hBackbuffer, $X_relative_child2, $Y_relative_child2, $X_relative_child1, $Y_relative_child1, $hPen) ; relative coord _GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmap, 0, 0, $iX, $iY) _WinAPI_RedrawWindow($hGUI) EndIf Return 0 EndFunc Func _Exit() ; Clean up _GDIPlus_BrushDispose($hPen) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_GraphicsDispose($hBackbuffer) _GDIPlus_GraphicsDispose($hGraphics) ; Uninitialize GDI+ _GDIPlus_Shutdown() Exit EndFunc Just move the Child2, you should see a line between the 2 childs and this line follow the movement of the child2. The repaint works but it flickers a lot. How can I handle that ? Thanks for your time.
  13. Your code in the above post is actually MSAA code. That's why you through the Select parameter can specify how the selection should take place, eg. with regard to control focus. Well done that you found out. When you perform a selection with pure UI Automation code as in the previous post, it's done as a user would do it manually. Ie. the control gets focus. With UI Automation code you can generally automate tasks that a user can also do manually. It usually does not include setting control styles. But if the control has a window handle then you may be able to set the control style with functions like SetWindowLongPtr and similar functions.
  14. Dear Danp2 , can you do a tool like Au3Info.exe In free time? through WYSIWYG mode,we can automatically get the Xpath and the attributes of the element when place the mouse in the location of the element of the page. It feels a little troublesome and not too convenient to use browser developer tools. Only a master like you can make such a tool.
  15. Thanks Danp2 ! I have solved this problem with the help of _WD_ExecuteScript and javascript.
  16. Hello guys, I've got a small problem. I want to create a selection rectangle within a GUI like in paint. Here's the code I've written, but it doesn't work, unfortunately: #include <misc.au3> global $hWin = GUICreate("Selection rectangle",650,550) GUISetState() while 1 Switch GUIGetMsg() case -3 exitloop endswitch if _IsPressed("1") then $mp = GUIGetCursorInfo($hWin) $dot = GUICtrlCreateGraphic($mp[0],$mp[1],2,2) GUICtrlSetBkColor($dot,0) while _IsPressed("01") $pos = GUIGetCursorInfo($hWin) ControlMove($hWin,"",$dot,$pos[0],$pos[1],$pos[2],$pos[3]) WEnd EndIf wend Have you got any idea about how to do this correctly? Thanks in advance.
  17. @zoel Take a look at Run, StdoutRead, and GUI* functions in the Help file. Post the script if you need any assistance
  18. Hi Melba23 thanks for your reply, I read the book you recommend, I want to built an app that runs some cmd commands and outputs the result in a GUI.
  19. zoel, Which AutoIt book did you read? I would recommend this one: Other than that, what would you like to do with AutoIt? If you have a specific goal in mind it is much easier to understand the limited number steps you need to do it, rather then facing the entire AutoIt function list and being completely bewildered. Over to you. M23
  20. Hi people, as the title suggests I don't understand nothing, I just finished the AutoIT book but I didn't understand nothing, I think programming is not for me, should I giveup? Ho you people learned how to code, do you haveany advices. Thanks in advance!!
  21. This works for me If ProcessExists($PID) Then While ProcessExists($PID) ProcessClose($PID) WEnd StdioClose($PID) EndIf Seems like StdioClose must be called to flush the stream, and processclose alone does not ensure that process is closed when StdioClose is called, so fragments pile up. Ensure that process is closed before the StdioClose call seems to fix this. Whole modified script ; *** Start added by AutoIt3Wrapper *** #include <AutoItConstants.au3> ; *** End added by AutoIt3Wrapper *** #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Add_Constants=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <Misc.au3> $loops = 0 $CleanupRAM = False $aWS = ProcessGetStats() $WSram = $aWS[0] $WSramPeak = $aWS[1] $xMax = 9999 $yMax = 99 Dim $aTest[$xMax + 1][$yMax + 1] AdlibRegister(UpdToolTip) $PID = False $sOutput = "" $GrabOutput = True While 1 If _IsPressed("7B") Then If $GrabOutput = False Then $GrabOutput = True Else $GrabOutput = False EndIf Sleep(100) EndIf $RandX = Random(0, $xMax, 1) $RandY = Random(0, $yMax, 1) $aTest[$RandX][$RandY] = $RandX * $RandY * Random(1, 100) If ProcessExists($PID) Then While ProcessExists($PID) ProcessClose($PID) WEnd StdioClose($PID) EndIf If $GrabOutput Then $PID = Run(@ComSpec & " /c echo hello", @TempDir, @SW_HIDE, $STDERR_MERGED) Else $PID = Run(@ComSpec & " /c echo hello", @TempDir, @SW_HIDE) EndIf $loops += 1 WEnd Func UpdToolTip() $sResult = "Loops: " & $loops & @CRLF $aWS = ProcessGetStats() $WS_TXT = " WorkingSetSize (4k)= " & Round($aWS[0] / 1024 / 4, 2) & @CRLF & "PeakWorkingSetSize (4k)= " & Round($aWS[1] / 1024 / 4, 2) & @CRLF & _ "RAM Delta 4k pages : " & Round(($aWS[0] - $WSram) / 1024 / 4, 2) & @CRLF & _ "Peak Delta 4k pages : " & Round(($aWS[1] - $WSramPeak) / 1024 / 4, 2) If $CleanupRAM Then DllCall("psapi.dll", "int", "EmptyWorkingSet", "long", -1) $aWS = ProcessGetStats() $WS_TXT &= @CRLF & _ "RAM Delta (after cleanup) = " & Round(($aWS[0] - $WSram) / 1024 / 4, 2) & @CRLF & _ "Peak Delta (after cleanup) = " & Round(($aWS[1] - $WSramPeak) / 1024 / 4, 2) EndIf $WSram = $aWS[0] $WSramPeak = $aWS[1] If $GrabOutput Then ToolTip($WS_TXT & @CRLF & $sResult & @CRLF & "With $STDERR_MERGED", 500, 100, "Random Array Fill, loops: " & $loops) Else ToolTip($WS_TXT & @CRLF & $sResult & @CRLF & "Without $STDERR_MERGED", 500, 100, "Random Array Fill, loops: " & $loops) EndIf EndFunc ;==>UpdToolTip
  22. matwachich, You are not quite alone as you can see here. I have tweaked the positions a bit - how does this seem to you? ExtMsgBox_Mod.au3 M23
  23. use the UNC path instead of the mapping ( https://forums.virtualbox.org/viewtopic.php?f=7&t=40036 )
  24. you are running from SciTE, try to run the script from the command line, and see if the same happens.
  25. @TheDcoder Did you try to disable UAC (temporarily)? Your issue seems something (but could not) related to UAC, as stated here
  1. Load more activity
  • Create New...