Jump to content

Vikitorony

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Vikitorony

  1. Maybe it can help me, I give it a try. Thank you.
  2. Hallo @ISI360, Is there any progress with git support? Switching between branches and auto-save makes me sad. Context: I'm working on BranchB, which has different folder and file structure than BranchA. After commiting changes I switch to BranchA. If I don't close opened files, the auto-save function will save/overwrite the opened files, which makes an unwanted change on BranchA. Have a great day! 👋
  3. Hi ISI360, Thanks for your reply. I checked the settings. It seems, that ISN uses the x86 version of AutoIt3.exe. If I use Run Script (x86), it works great. With the x64 version I have the above mentioned issue. In SciTE: >Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "C:\Testing\Project1\test.au3" In Visual Studio Code: >Running:(3.3.14.5):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "c:\Testing\Project1\test.au3" /errorstdout I just checked the Task Manager, my .NET application is x86, so now I understand what's the problem with autoit3_x64.exe and x64 compiler. Thank you for your help.
  4. Hi, I am facing with a major issue. It annoys me because I do not understand the background of it. Long story short: I have a project which is running perfectly when I run it from ISN AutoIt Studio. But if I run it from SciTE (I think it is the bundled version comes with the AutoIt installer), from Visual Studio Code with AutoIt extension (by Damien, v1.0.5), or compile and run as .exe, it will not run properly. Long story long: I would like to test a DotNet application, I have two .au3 files right now. In the Utils.au3 I have a method which finds a TreeView element by it's name. #pragma compile(Console, true) #include <GUIConstantsEx.au3> #include <GuiTreeView.au3> Func OpenMenuByFullName($ElementToFind, $click = True) Local $hWnd = "[REGEXPTITLE:(?i)(.*MyApp\.NET Main Window.*)]" WinActivate($hWnd) Local $TreeName = "[NAME:treeViewMenu]" ;~ This could be: "[CLASSNN:WindowsForms10.SysTreeView32.app.0.d0d20b_p5_aa11]" Local $TreeHandler = ControlGetHandle($hWnd, "", $TreeName) Global $FindTreeElement = _GUICtrlTreeView_FindItemEx($TreeHandler, $ElementToFind, False) Local $SelectTreeElement = _GUICtrlTreeView_SelectItem($TreeHandler, $FindTreeElement) Sleep(500) ; Open selected menu element If $click Then _GUICtrlTreeView_ClickItem($TreeHandler, $FindTreeElement, "", "", 2) Sleep(3000) Else Return $FindTreeElement EndIf EndFunc test.au3's purpose in this example is to open MenuElement9 and all children elements. If I get an error during opening child element, $nERR will be incremented by 1, if child element opens successfully $nOK will be incremented by 1. At the end of the script it writes the number of OKs and errors. #pragma compile(Console, true) #include <GuiTreeView.au3> #include <String.au3> #include <ScreenCapture.au3> #include "Utils.au3" Local $FindTreeElement Local $MenuArray = ["MenuElement1", "MenuElement2", "MenuElement3", "MenuElement4", "MenuElement5", "MenuElement6", "MenuElement7", "MenuElement8", "MenuElement9", "MenuElement10"] Local $MenuName = $MenuArray[8] OpenMenuByFullName($MenuName, False) $sAll = _TreeView_GetAll('[REGEXPTITLE:(?i)(.*MyApp\.NET Main Window.*)]', '', '[NAME:treeViewMenu]', $MenuName) Func _TreeView_GetAll($title, $text, $classNN, $menu, $collapse = True) $sAll = '' $hWnd = ControlGetHandle($title, $text, $classNN) WinActivate($title) If $collapse Then _GUICtrlTreeView_Expand($hWnd, 0, False) ; Collapse All $hItem = $FindTreeElement $i = 1 While $hItem <> 0x00000000 $sItem = _GUICtrlTreeView_GetTree($hWnd, $hItem) $sItemSplit = StringSplit($sItem, "|") Local $nOK Local $nERR If $sItemSplit[1] = $menu Then _GUICtrlTreeView_SelectItem($hWnd, $hItem) _GUICtrlTreeView_ClickItem($hWnd, $hItem, "", "", 2) Sleep(2000) ;~ ***some other magic*** Else ConsoleWrite(@CRLF & "------------------------------------------------" & @CRLF) ConsoleWrite($MenuName & " test finished." & @CRLF) ConsoleWrite("OK: " & $nOK & @CRLF & "ERR: " & $nERR) Sleep(500) Exit (20) EndIf WEnd Return $sAll EndFunc As I observed, if I use SciTE/VSC/compiled .exe, $FindTreeElement's value did not pass from Utils.au3 to test.au3. $FindTreeElement's value is 0x0000000000000000 in test.au3, so the While loop will be skipped. What am I not noticing? Why is this code working in ISN AIS, and why not working in other Editors / command line?
×
×
  • Create New...