
Bobbins
Members-
Posts
4 -
Joined
-
Last visited
Bobbins's Achievements

Seeker (1/7)
0
Reputation
-
Hey guys does anyone know how to retrieve this text from Arduino? What I am trying to do is to trigger a popup when Arduino is finished uploading a program. With help from others I tried to find the string but could not find it. #include <Constants.au3> WinWaitActive("[CLASS:SunAwtFrame]") Send("^u") While 3 Local $sText = WinGetText("[CLASS:SunAwtFrame]") Local $iEvaluate = StringInStr ($sText, "Done uploading.", 0) if $iEvaluate > 0 Then WinClose("[CLASS:SunAwtFrame]") MsgBox(0,0,0); just as indicator Exit EndIf WEnd Someone recommended using IUIAutomation MS framework but I still could not find the "Done Uploading" string Also I used the simplespy script to try look for a difference between before upload and after upload but I don't see a difference that I could use to trigger the popup. Before upload: Mouse position is retrieved 630-339 At least we have an element [Mac_reader | Arduino 1.0.6][SunAwtFrame] Having the following values for all properties: Title is: <Mac_reader | Arduino 1.0.6> Class := <SunAwtFrame> controltype:= <UIA_WindowControlTypeId> ,<50032> , (0000C370) 433;84;500;600 *** Parent Information top down *** 0: Title is: <Desktop> Class := <#32769> controltype:= <UIA_PaneControlTypeId> ,<50033> , (0000C371) 0;0;1366;768 "Title:=Desktop;controltype:=UIA_PaneControlTypeId;class:=#32769" ;~ *** Standard code *** #include "UIAWrappers.au3" AutoItSetOption("MustDeclareVars", 1) _UIA_setVar("Mac_reader|Arduino1.0.6.mainwindow","title:=Mac_reader | Arduino 1.0.6;classname:=SunAwtFrame") _UIA_action("Mac_reader|Arduino1.0.6.mainwindow","setfocus") *** Detailed properties of the highlighted element *** UIA_title:= <Mac_reader | Arduino 1.0.6> UIA_text:= <Mac_reader | Arduino 1.0.6> UIA_regexptitle:= <Mac_reader | Arduino 1.0.6> UIA_class:= <SunAwtFrame> UIA_regexpclass:= <SunAwtFrame> UIA_iaccessiblechildId:= <0> UIA_handle:= <329456> UIA_RuntimeId:= <42;329456> UIA_BoundingRectangle:= <433;84;500;600> UIA_ProcessId:= <988> UIA_ControlType:= <50032> UIA_LocalizedControlType:= <window> UIA_Name:= <Mac_reader | Arduino 1.0.6> UIA_HasKeyboardFocus:= <True> UIA_IsKeyboardFocusable:= <True> UIA_IsEnabled:= <True> UIA_ClassName:= <SunAwtFrame> UIA_Culture:= <0> UIA_IsControlElement:= <True> UIA_IsContentElement:= <True> UIA_IsPassword:= <False> UIA_NativeWindowHandle:= <329456> UIA_IsOffscreen:= <False> UIA_Orientation:= <0> UIA_FrameworkId:= <Win32> UIA_IsRequiredForForm:= <False> UIA_IsDockPatternAvailable:= <False> UIA_IsExpandCollapsePatternAvailable:= <False> UIA_IsGridItemPatternAvailable:= <False> UIA_IsGridPatternAvailable:= <False> UIA_IsInvokePatternAvailable:= <False> UIA_IsMultipleViewPatternAvailable:= <False> UIA_IsRangeValuePatternAvailable:= <False> UIA_IsScrollPatternAvailable:= <False> UIA_IsScrollItemPatternAvailable:= <False> UIA_IsSelectionItemPatternAvailable:= <False> UIA_IsSelectionPatternAvailable:= <False> UIA_IsTablePatternAvailable:= <False> UIA_IsTableItemPatternAvailable:= <False> UIA_IsTextPatternAvailable:= <False> UIA_IsTogglePatternAvailable:= <False> UIA_IsTransformPatternAvailable:= <True> UIA_IsValuePatternAvailable:= <False> UIA_IsWindowPatternAvailable:= <True> UIA_ValueIsReadOnly:= <True> UIA_RangeValueValue:= <0> UIA_RangeValueIsReadOnly:= <True> UIA_RangeValueMinimum:= <0> UIA_RangeValueMaximum:= <0> UIA_RangeValueLargeChange:= <0> UIA_RangeValueSmallChange:= <0> UIA_ScrollHorizontalScrollPercent:= <0> UIA_ScrollHorizontalViewSize:= <100> UIA_ScrollVerticalScrollPercent:= <0> UIA_ScrollVerticalViewSize:= <100> UIA_ScrollHorizontallyScrollable:= <False> UIA_ScrollVerticallyScrollable:= <False> UIA_SelectionCanSelectMultiple:= <False> UIA_SelectionIsSelectionRequired:= <False> UIA_GridRowCount:= <0> UIA_GridColumnCount:= <0> UIA_GridItemRow:= <0> UIA_GridItemColumn:= <0> UIA_GridItemRowSpan:= <1> UIA_GridItemColumnSpan:= <1> UIA_DockDockPosition:= <5> UIA_ExpandCollapseExpandCollapseState:= <3> UIA_MultipleViewCurrentView:= <0> UIA_WindowCanMaximize:= <True> UIA_WindowCanMinimize:= <True> UIA_WindowWindowVisualState:= <0> UIA_WindowWindowInteractionState:= <2> UIA_WindowIsModal:= <False> UIA_WindowIsTopmost:= <False> UIA_SelectionItemIsSelected:= <False> UIA_TableRowOrColumnMajor:= <2> UIA_ToggleToggleState:= <2> UIA_TransformCanMove:= <True> UIA_TransformCanResize:= <True> UIA_TransformCanRotate:= <False> UIA_IsLegacyIAccessiblePatternAvailable:= <True> UIA_LegacyIAccessibleChildId:= <0> UIA_LegacyIAccessibleName:= <Mac_reader | Arduino 1.0.6> UIA_LegacyIAccessibleRole:= <10> UIA_LegacyIAccessibleState:= <1048580> UIA_IsDataValidForForm:= <False> UIA_ProviderDescription:= <[pid:9904,hwnd:0x506F0 Main:Nested [pid:988,hwnd:0x506F0 Annotation(parent link):Microsoft: Annotation Proxy (unmanaged:uiautomationcore.dll); Main:Microsoft: MSAA Proxy (unmanaged:uiautomationcore.dll)]; Nonclient:Microsoft: Non-Client Proxy (unmanaged:uiautomationcore.dll); Hwnd(parent link):Microsoft: HWND Proxy (unmanaged:uiautomationcore.dll)]> UIA_IsItemContainerPatternAvailable:= <False> UIA_IsVirtualizedItemPatternAvailable:= <False> UIA_IsSynchronizedInputPatternAvailable:= <False> After upload: Mouse position is retrieved 605-403 At least we have an element [Mac_reader | Arduino 1.0.6][SunAwtFrame] Having the following values for all properties: Title is: <Mac_reader | Arduino 1.0.6> Class := <SunAwtFrame> controltype:= <UIA_WindowControlTypeId> ,<50032> , (0000C370) 433;84;500;600 *** Parent Information top down *** 0: Title is: <Desktop> Class := <#32769> controltype:= <UIA_PaneControlTypeId> ,<50033> , (0000C371) 0;0;1366;768 "Title:=Desktop;controltype:=UIA_PaneControlTypeId;class:=#32769" ;~ *** Standard code *** #include "UIAWrappers.au3" AutoItSetOption("MustDeclareVars", 1) _UIA_setVar("Mac_reader|Arduino1.0.6.mainwindow","title:=Mac_reader | Arduino 1.0.6;classname:=SunAwtFrame") _UIA_action("Mac_reader|Arduino1.0.6.mainwindow","setfocus") *** Detailed properties of the highlighted element *** UIA_title:= <Mac_reader | Arduino 1.0.6> UIA_text:= <Mac_reader | Arduino 1.0.6> UIA_regexptitle:= <Mac_reader | Arduino 1.0.6> UIA_class:= <SunAwtFrame> UIA_regexpclass:= <SunAwtFrame> UIA_iaccessiblechildId:= <0> UIA_handle:= <329456> UIA_RuntimeId:= <42;329456> UIA_BoundingRectangle:= <433;84;500;600> UIA_ProcessId:= <988> UIA_ControlType:= <50032> UIA_LocalizedControlType:= <window> UIA_Name:= <Mac_reader | Arduino 1.0.6> UIA_HasKeyboardFocus:= <True> UIA_IsKeyboardFocusable:= <True> UIA_IsEnabled:= <True> UIA_ClassName:= <SunAwtFrame> UIA_Culture:= <0> UIA_IsControlElement:= <True> UIA_IsContentElement:= <True> UIA_IsPassword:= <False> UIA_NativeWindowHandle:= <329456> UIA_IsOffscreen:= <False> UIA_Orientation:= <0> UIA_FrameworkId:= <Win32> UIA_IsRequiredForForm:= <False> UIA_IsDockPatternAvailable:= <False> UIA_IsExpandCollapsePatternAvailable:= <False> UIA_IsGridItemPatternAvailable:= <False> UIA_IsGridPatternAvailable:= <False> UIA_IsInvokePatternAvailable:= <False> UIA_IsMultipleViewPatternAvailable:= <False> UIA_IsRangeValuePatternAvailable:= <False> UIA_IsScrollPatternAvailable:= <False> UIA_IsScrollItemPatternAvailable:= <False> UIA_IsSelectionItemPatternAvailable:= <False> UIA_IsSelectionPatternAvailable:= <False> UIA_IsTablePatternAvailable:= <False> UIA_IsTableItemPatternAvailable:= <False> UIA_IsTextPatternAvailable:= <False> UIA_IsTogglePatternAvailable:= <False> UIA_IsTransformPatternAvailable:= <True> UIA_IsValuePatternAvailable:= <False> UIA_IsWindowPatternAvailable:= <True> UIA_ValueIsReadOnly:= <True> UIA_RangeValueValue:= <0> UIA_RangeValueIsReadOnly:= <True> UIA_RangeValueMinimum:= <0> UIA_RangeValueMaximum:= <0> UIA_RangeValueLargeChange:= <0> UIA_RangeValueSmallChange:= <0> UIA_ScrollHorizontalScrollPercent:= <0> UIA_ScrollHorizontalViewSize:= <100> UIA_ScrollVerticalScrollPercent:= <0> UIA_ScrollVerticalViewSize:= <100> UIA_ScrollHorizontallyScrollable:= <False> UIA_ScrollVerticallyScrollable:= <False> UIA_SelectionCanSelectMultiple:= <False> UIA_SelectionIsSelectionRequired:= <False> UIA_GridRowCount:= <0> UIA_GridColumnCount:= <0> UIA_GridItemRow:= <0> UIA_GridItemColumn:= <0> UIA_GridItemRowSpan:= <1> UIA_GridItemColumnSpan:= <1> UIA_DockDockPosition:= <5> UIA_ExpandCollapseExpandCollapseState:= <3> UIA_MultipleViewCurrentView:= <0> UIA_WindowCanMaximize:= <True> UIA_WindowCanMinimize:= <True> UIA_WindowWindowVisualState:= <0> UIA_WindowWindowInteractionState:= <2> UIA_WindowIsModal:= <False> UIA_WindowIsTopmost:= <False> UIA_SelectionItemIsSelected:= <False> UIA_TableRowOrColumnMajor:= <2> UIA_ToggleToggleState:= <2> UIA_TransformCanMove:= <True> UIA_TransformCanResize:= <True> UIA_TransformCanRotate:= <False> UIA_IsLegacyIAccessiblePatternAvailable:= <True> UIA_LegacyIAccessibleChildId:= <0> UIA_LegacyIAccessibleName:= <Mac_reader | Arduino 1.0.6> UIA_LegacyIAccessibleRole:= <10> UIA_LegacyIAccessibleState:= <1048580> UIA_IsDataValidForForm:= <False> UIA_ProviderDescription:= <[pid:9904,hwnd:0x506F0 Main:Nested [pid:988,hwnd:0x506F0 Annotation(parent link):Microsoft: Annotation Proxy (unmanaged:uiautomationcore.dll); Main:Microsoft: MSAA Proxy (unmanaged:uiautomationcore.dll)]; Nonclient:Microsoft: Non-Client Proxy (unmanaged:uiautomationcore.dll); Hwnd(parent link):Microsoft: HWND Proxy (unmanaged:uiautomationcore.dll)]> UIA_IsItemContainerPatternAvailable:= <False> UIA_IsVirtualizedItemPatternAvailable:= <False> UIA_IsSynchronizedInputPatternAvailable:= <False> Could someone please suggest a way to identify when it's done uploading? Thanks in advance.
-
-
I have made a code for getting the string but when it launches nothing occurs. Did i make a mistake somewhere? This is my code and the window I'm trying to get the string from #include <Constants.au3> WinWaitActive("[CLASS:SunAwtFrame]") Send("^u") Local $sText = WinGetText("[CLASS:SunAwtFrame]") Local $iEvaluate = StringInStr ($sText, "Done uploading.", 0) if $iEvaluate > 0 Then WinClose("[CLASS:SunAwtFrame]") Exit EndIf
-
I am trying to get autoit to notify me and give a popup message of some kind once arduino finishes compiling. I have seen that you can detect when windows are opened or closed so is there perhaps anyway that autoit can detect changes in programs like a change in text written in the program, or even better when upload state changes to finish. If there is anyway to approach this I would appreciate it. Thanks in advance!