Jump to content

junkew

MVPs
  • Posts

    3,064
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by junkew

  1. Please check out multi dimensionale arrays https://www.autoitscript.com/wiki/Arrays
  2. Create an svg file https://www.w3schools.com/graphics/svg_line.asp
  3. If you read the first post in this thread it will give references on how to start with uia. If not clear then tell what you did so far. 1. Install uia udf 2. Install tool based on uia udf like the spy
  4. Why do you want the trees to be the same? Finding elements on different platforms or versions needs a certain strategy.
  5. Differs due to many different factors like platform version. As inspect.exe is the main ms tool that's the best default tool to check with. And then you also have different tools using different ways of identifying. The uia is a good base from Microsoft but commercial tools like ranorex or testcomplete can give different insights and some helpfull tools look with ocr or ai imaging basically a smart way of bitmap analyzing.
  6. Use inspect.exe to see if it really differs. And the actual tree can be different on different windows versions. It can also differ due to admin user or not. It can differ between 32 and 64 bit applications. It can differ due to ......
  7. Try python on same windows machine to at least see if you locally can connect.
  8. Put the full path in there #include <AutoYOLO3.au3> otherwise read the helpfile to put correct entries in registry on where to find includefiles https://www.autoitscript.com/autoit3/docs/keywords/include.htm
  9. No code sample, no errors leads to no answer
  10. Study more as you are new I would study more before jumping into this library. Post your full code in help request forum and people will help with other directions.
  11. Yes it now uses the True condition as match all. You can create many more complex condition like the not condition. It will be more complicated. Take a look in the forum for more complex condition for filtering.
  12. You woud have to add a static variabele that counts the instancematch as long as its not a match you continue instead of exitloop. Just add a bunch of consolewrites and remove exitloop to learn how the code works.
  13. Did you try JavaMonkey or NVDA screen reader?
  14. Are you saying that it's not possible to get Control ID of elements that don't have anything identifiable frequently controlid will be automationid not every element has an controlid In UIA you have automationid (which can be equal to controlid but not necessarily true) send a hotkey to a specific control This is not possible with uia as thats based on settext/setvalue by using the pattern methods yes, thats based on controlsend which is based on technologies like sendkeys, keybd_event, sendinput, sendmessage (you can google these) Function _WinAPI_GetDlgCtrlID (autoitscript.com) Alternative to try to select chrome tab (not tested) use IAccessible interface Switching tabs in Chrome check example 5 and some others about chrome in the UIA wrappers UDF examples If invoke() is not working then the only options are keyboard send functions click (as part of AutoIt) rely on sendmessage(....) but then you have to find out how it works in detail thru digging in github chromium source code send "ctrl+tab " key and check content of addressbar to select the right tab sorry I do not have a clear working example as thats frequently the problem when GUI automation is needed and the logical actions are not working
  15. Do not mix uia and autoit control ids unless you understand the details on what can and what cannot be mixed. For those hard to unique identify I made uiwrappers to use proporties like index or indexrelative. For chrome tab Just use click. Automating things thru gui in general needs different technologies and all have their own quirks. and frequently controlid will be automationid
  16. Maybe this thread gives some help/direction but QT is limited certainly in the first versions regarding accessibility Automate Qt and QWidgets - AutoIt Example Scripts - AutoIt Forums (autoitscript.com) GitHub - robertknight/Qt-Inspector: Utility to browse the Qt object tree of a running Qt application and edit object properties on the fly. Accessibility | Qt 6.4
  17. "Unfortunately I cannot get it running" is very vague, is it compiling without errors? 1. run the first example and post the output/results 2. experiment with your examples, it seems you want to find something on the desktop 3. post your bmp files The way you save bmp files to disk can already make a huge difference in finding. The slightest mismatch on a pixel will give no result. Describe what your expectations are and make sure you look in FAQ for other solutions
  18. A very rudimentary flowchart example. It will be a lot of effort to make this more functional and defining the node pictures will be a lot of work to define. #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <ColorConstants.au3> Global Const $g_MAXGr = 8 Global $g_aidGraphics[$g_MAXGr + 1] ; 0 and $g_MAXGr entries not used to allow GUICtrlDelete result Global $g_idDel, $g_hcanvas Example() Func Example() Local $idMsg, $iInc, $i GUICreate("My flowchart tool", -1, -1, 100, 100) Local $idDel1 = GUICtrlCreateButton("Open canvas", 50, 200, 150) GUISetState(@SW_SHOW) Createcanvas() $i = 1 $iInc = 1 ;$i=5 ; uncomment to delete starting from last define Graphic control ;$iInc=-1 Do $idMsg = GUIGetMsg() If $idMsg = $idDel1 Then $i = Create($iInc) If $idMsg = $g_idDel Then GUICtrlDelete($g_aidGraphics[$i]) $i = $i + $iInc If $i < 0 Or $i > $g_MAXGr Then Exit EndIf Until $idMsg = $GUI_EVENT_CLOSE EndFunc ;==>Example Func Create($iInc) GUIDelete($g_hcanvas) Createcanvas() If $iInc = -1 Then Return 5 Return 1 EndFunc ;==>Create func drawStartOrEnd($x,$y,$r) local $graphic = GUICtrlCreateGraphic(20, 50, 100, 100) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $COLOR_BLACK, $COLOR_BLACK) GUICtrlSetGraphic(-1, $GUI_GR_PIE, $x, $y, $r, 0, 360) ;~ circle return $graphic EndFunc func drawProcess($x,$y) $graphic = GUICtrlCreateGraphic(20, 50, 100, 100) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $COLOR_BLACK, $COLOR_BLACK) GUICtrlSetGraphic(-1, $GUI_GR_RECT, $x, $y, 60, 20) ;~ rectangle return $graphic EndFunc func drawDiamond($x,$y, $w, $h) $graphic = GUICtrlCreateGraphic(20, 50, 100, 100) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $COLOR_BLACK, $COLOR_BLACK) GUICtrlSetGraphic(-1, $GUI_GR_MOVE, $x , $y+ round($h/2)) GUICtrlSetGraphic(-1, $GUI_GR_LINE, $x+20,$y) GUICtrlSetGraphic(-1, $GUI_GR_LINE, $x+40,$y+ round($h/2)) GUICtrlSetGraphic(-1, $GUI_GR_LINE, $x+20,$y+$h) GUICtrlSetGraphic(-1, $GUI_GR_LINE, $x,$y+round($h/2)) return $graphic EndFunc func drawConnector($x1, $y1, $x2, $y2) $graphic = GUICtrlCreateGraphic(20, 50, 100, 100) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $COLOR_BLACK, $COLOR_BLACK) GUICtrlSetGraphic(-1, $GUI_GR_MOVE, $x1 , $y1) GUICtrlSetGraphic(-1, $GUI_GR_LINE, $x2, $y2) return $graphic EndFunc Func Createcanvas() ;~ If in future we want to drawtoPrinter, drawToVisio, drawToPpt is use variable functions $drawStartOrEnd = drawStartOrEnd $drawProcess = drawProcess $drawDiamond = drawDiamond $drawConnector = drawConnector $g_hcanvas = GUICreate("My canvas",640, 480) $g_idDel = GUICtrlCreateButton("Delete", 50, 165, 50) local $w=120 local $h=40 $g_aidGraphics[1]=$drawStartOrEnd(200,10,$w/9) $g_aidGraphics[2]=$drawProcess(170, 20+$h) $g_aidGraphics[3]=$drawDiamond(180, 30+2*$h,$w,$h) $g_aidGraphics[4]=$drawStartOrEnd(200,60+3*$h,$w/9) $g_aidGraphics[5]=$drawConnector(200,10 , 200, 20+$h) $g_aidGraphics[6]=$drawConnector(200,20+$h , 200, 30+2*$h ) $g_aidGraphics[7]=$drawConnector(200,30+2*$h +$h , 200, 60+3*$h ) GUISetState(@SW_SHOW) EndFunc ;==>Createcanvas
  19. Its just like a hole in my teeth having pain now for 3 days buts its not getting fixed by itself ;-) you have to rethink a little longer Some tips but just like becoming a dentist also programming you are not learning in a few hours. dont use global variables or at least minimize them by using parameters to functions The $s parameter you can also make a textbox control where you set that value Call like you use it can be just written as checkForImage(1) 'or checkForImage(5) use (function) parameters and variables with a decent understandable name Example Func checkForImage($startAtImage) for $i=$startAtImage to $ImgCount Its a better habit to split in functionalities with functions and not jumping around Main program Show GUI checkForImage(1) which returns to main gui when found main gui thens asks "continue yes/no" compared you jump further form checkForImage to localCenters/abroadCenters and then call back checkForImage with a new starting position, this will become spaghetti coding.
  20. You do not need ie to draw a graph. See example https://www.autoitscript.com/autoit3/docs/functions/GUICtrlSetGraphic.htm You Just have to make some shape definition for a square, diamond and draw it on the x y positioning You need.
  21. Try to load in excel 64 bits and make a pivotgraph or table Try it with sqlite.au3
  22. If its relatively simple Just stad within vb https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualbasic.devices.keyboard.sendkeys?view=windowsdesktop-6.0 And yes, AutoIt can do this
  23. Do a mousemove 1,1 or 0,0 before you search. Most likely your screen is changing after a mousemove. You are searching the screen so any pixelchange in either image2search or imagesearchingin will give a mismatch.
  24. How and when is the picture.bmp created? Did you do a pixel compare if its based on screenshots from different pointe in time?
  25. The basic parts are there 1 lexer for the input 2 parse for the visual output It will depend on the requirements how much time it will take and if you want a pure autoit version or parse the output in https://graphviz.org/ layout https://en.m.wikipedia.org/wiki/DOT_(graph_description_language)
×
×
  • Create New...