Jump to content

Search the Community

Showing results for tags 'controlID'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 8 results

  1. I'm trying to make one tray item delete another, but when I do this, all tray items that were created after the deleted item don't work as intended, as if their controlID's were all shifted down one value, and their corresponding tray items now (after deletion) run the code of the tray item before it. Am I missing something? Is there a better way to accomplish what I'm trying to do? #include <TrayConstants.au3> #include <Array.au3> HotKeySet ( "{ESC}", "Abort" ) Opt ( "TrayMenuMode", 3 ) TraySetState($TRAY_ICONSTATE_SHOW) ; Show the tray menu. Global $aTray[8] ; Defines array to hold tray items. $aTray[0] = TrayCreateItem ( "Test 1 (Name Test 5)" ) $aTray[1] = TrayCreateItem ( "Test 2 (Delete Test 5)" ) $aTray[2] = TrayCreateItem ( "Test 3 (Restore Test 5)" ) $aTray[3] = TrayCreateItem ( "Test 4 (Check if Test 5 is blank or space)" ) $aTray[4] = TrayCreateItem ( "Test 5 Delete Me" ) $aTray[5] = TrayCreateItem ( "Test 6 (Check Test 5 Text)" ) $aTray[6] = TrayCreateItem ( "Test 7 (Read Values)" ) $aTray[7] = TrayCreateItem ( "Test 8 (Count Blanks)" ) While 1 Switch TrayGetMsg() Case $aTray[0] ; "Test 1" Change Test 5 Text. If TrayItemGetText ( $aTray[0] ) <> "" Then Global $TrayText = InputBox ( "Test", "Choose text for Test 5", "Test 5 Delete Me" ) TrayItemSetText ( $aTray[4], $TrayText) EndIf Case $aTray[1] ; "Test 2" Deletes "Test 5". If TrayItemGetText ( $aTray[1] ) <> "" Then Global $TrayDeletedName = TrayItemGetText ( $aTray[4] ) TrayItemDelete ( $aTray[4] ) _ArrayInsert ( $aTray, 4 ) EndIf Case $aTray[2] ; "Test 3" Restores "Test 5". If TrayItemGetText ( $aTray[2] ) <> "" Then $aTray[4] = TrayCreateItem ( $TrayDeletedName ) EndIf Case $aTray[3] ; "Test 4" Check if Test 5 value is blank, space, or filled. If TrayItemGetText ( $aTray[3] ) <> "" Then If TrayItemGetText ( $aTray[4] ) = "" Then MsgBox ( 0, "Test", "Test 5 is blank" ) ElseIf TrayItemGetText ( $aTray[4] ) = " " Then MsgBox ( 0, "Test", "Test 5 is not blank (space)" ) Else MsgBox ( 0, "Test", "Test 5 is assigned a value" ) EndIf EndIf Case $aTray[4] ; "Test 5" (Item to test for, during, and after deletion). If TrayItemGetText ( $aTray[4] ) <> "" Then MsgBox ( 0, "Test", "I'm here!" ) EndIf Case $aTray[5] ; "Test 6" Displays Text from Test 5 item. If TrayItemGetText ( $aTray[5] ) <> "" Then $Test5Text = TrayItemGetText ( $aTray[4] ) MsgBox ( 0, "Test", "Test 5 Text: " & $Test5Text ) EndIf Case $aTray[6] ; "Test 7" Displays all item values. If TrayItemGetText ( $aTray[6] ) <> "" Then MsgBox ( 0, "Test", "$aTray[0]: " & $aTray[0] & @CRLF & _ "$aTray[1]: " & $aTray[1] & @CRLF & _ "$aTray[2]: " & $aTray[2] & @CRLF & _ "$aTray[3]: " & $aTray[3] & @CRLF & _ "$aTray[4]: " & $aTray[4] & @CRLF & _ "$aTray[5]: " & $aTray[5] & @CRLF & _ "$aTray[6]: " & $aTray[6] & @CRLF & _ "$aTray[7]: " & $aTray[7] & @CRLF ) EndIf Case $aTray[7] ; "Test 8" Counts all blanks in tray values. If TrayItemGetText ( $aTray[7] ) <> "" Then Global $blankCount = _ArrayFindAll ( $aTray, "" ) If $blankCount = -1 Then If @error = 6 Then MsgBox ( 0, "Test", "Error, No blanks present") EndIf Else MsgBox ( 0, "Test", "# of blanks: " & $blankCount ) EndIf EndIf EndSwitch WEnd Func Abort() Exit EndFunc Here is a test script I created to try to troubleshoot the problem on my own, with no luck. pay specific attention to "Test 2" ($aTray[1]), "Test 5" ($aTray[4]), and how every tray item after "Test 5" ($aTray[4]) behaves after deletion. Clicking "Test 2" will delete tray item "Test 5", after deletion every item runs the code of the tray item that was established before it (ex. "Test 3" and "Test 4" run their respective code, "Test 5" no longer exists, "Test 6" runs "Test 7", "Test 7" runs "Test 8"), and the last item ("Test 8" $aTray[7]) has no effect when the tray item is clicked. I understand that deleting the tray item changes the controlID, but I don't know in what way it does, and therefore how I can fix it to be able to achieve what I want it to. I appreciate any help or guidance with this problem. To clarify, what I'm ultimately trying to do is create a 'while' loop with switch case functions that can exist without necessarily being linked to a tray item, so that I can add and delete them at liberty using the script's functions, without having to differentiate switch case functions with if functions (if $aTray[x] exists, then use this set of switch case functions, etc.). Please, I am in pain. Water come school me again pls
  2. Please help. How to enter text to my C# program textbox? window info " >>>> Window <<<< Title:    Form1 Class:    WindowsForms10.Window.8.app.0.141b42a_r10_ad1 Position:    1922, 615 Size:    553, 680 Style:    0x16CF0000 ExStyle:    0x00050100 Handle:    0x001E0812 >>>> Control <<<< Class:    WindowsForms10.EDIT.app.0.141b42a_r10_ad1 Instance:    4 ClassnameNN:    WindowsForms10.EDIT.app.0.141b42a_r10_ad14 Name:    tbSymbol Advanced (Class):    [NAME:tbSymbol] ID:    2492658 Text:    TSLA Position:    100, 16 Size:    63, 20 ControlClick Coords:    43, 10 Style:    0x560100C0 ExStyle:    0x00000200 Handle:    0x002608F2 >>>> Mouse <<<< Position:    2073, 672 Cursor ID:    0 Color:    0xFFFFFF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< Shars Request SELL BUY 4000 Price Update Money SYMBOL TSLA Disconnect Connect >>>> Hidden Text <<<< " tried everything, $HWnd = WinActivate("Form1")             ControlSend($HWnd,"", "[CLASS:WindowsForms10.EDIT.app.0.141b42a_r10_ad1]", $Symbol)
  3. i am working on a application where if the flashing is success i get a window saying "SUCCESS" and if the flashing failed a window saying "FAILED" and i have to automatically identify pass or fail.the problem is both the windows are having the same control ID. how can i differentiate between both windows? so that i can make use of that in script for automation/// Thanks
  4. I want to click on a button that is inside a custom ToolBar on a nonAutoIT created form. I've been using MouseClick but that fails if the toolbar is detached or if the form is resized. There is no ID associated with the toolbar but there is a handle. I'm thinking that to get the handle I need a ControlID but that only gets me to the toolbar and I'd then need to have a way to identify the position of a button in order to click on it. I'd found a discussion about identifying the position of a noname button by, I believe, it's Tip text back in December but I can't find it now. Memory is a bit fuzzy on how I even got to the topic because at the time I was searching for something else. I'll continue to search but if anyone has seen the topic, or knows of another solution could you please point me in that direction. Thank you.
  5. Hello, I'm developing again (everybody ruuun! ) I would like to develope a script that goes through basicly every user control on a window, and log things that happens, and maybe do some screenshots. I did something like this before. My problem, which I would like to avoid this time (to improve my understanding and skill) , was that when I was unable to get a ControlID or handler or anything, I simply did some math and clicked on the coordinates it should have been (for example, maxing the window, and knowing the initial set up I was ablo to calculate given control position). I know that this is a bad solution for a number of reasons. Now I got authorization to install autoIT here, and i started to the work, AU3Info was unable to find anything on the window (this could be a problem, since autoIT doesn't see anything on it then, if I understood the help file) So I got the SimpleSpy script (source: ) I added a bit of code to the original to display ID as well, what I received is this: Mouse position is retrieved 115-207 At least we have an element title: [ADD] class: [Button] ID: [50000] (<-- coded this to display ID here as well) Having the following values for all properties: Title is: <ADD> Class := <Button> controltype:= <UIA_ButtonControlTypeId> ,<50000> , (0000C350) 10;187;120;35 *** Parent Information top down *** 3: Title is: <Compass> Class := <Window> controltype:= <UIA_WindowControlTypeId> ,<50032> , (0000C370) -8;-8;1936;1056 "Title:=Compass;controltype:=UIA_WindowControlTypeId;class:=Window"" 2: Title is: <> Class := <MainView> controltype:= <UIA_CustomControlTypeId> ,<50025> , (0000C369) 0;23;1920;1017 "Title:=;controltype:=UIA_CustomControlTypeId;class:=MainView"" 1: Title is: <> Class := <TileNavigationView> controltype:= <UIA_CustomControlTypeId> ,<50025> , (0000C369) 0;23;1920;967 "Title:=;controltype:=UIA_CustomControlTypeId;class:=TileNavigationView"" 0: Title is: <> Class := <AreasView> controltype:= <UIA_CustomControlTypeId> ,<50025> , (0000C369) 0;132;1920;858 "Title:=;controltype:=UIA_CustomControlTypeId;class:=AreasView"" so far I wrote this script: WinActivate('Test') ;It works!! :D first official interaction Sleep(1000) ;1 sec sleep to be sure ControlClick('Test', '', '50000') If @error Then MsgBox($MB_SYSTEMMODAL, 'Error', 'ControlClick error') EndIf Sleep(1000) MsgBox(1,"Tracer message", 'ControlClick has happened') ;MouseClick() ;ControlCommand() AutoIt activates the window, but the click on the given button doesnt happen (I tried to write 50000 without ' ' on ID). M'I doing the @error part correctly ? (no error Msg has been displayed), sorry I rarely use AutoIT and seems to forget less and less after each neglect, but still I'm far from a proffessional Any help or suggestion is welcome, thank you for your time and insight!
  6. Hi guys, Trying to map my mouse button 4 (I'm pretty sure it's 4 rather than 5, but I can experiment) to click the back button in a program (screenshot attached). In terms of positioning it sits in the middle of 3 screens if that makes a difference. I assume I can use something like (though I prob don't need the 1st two lines if using ControlClick?): WinActivate("ConnectWise v2016.4 (41139)", "Chrome Legacy Window") WinWaitActive("ConnectWise v2016.4 (41139)", "Chrome Legacy Window") ControlClick("ConnectWise v2016.4 (41139)", "Chrome Legacy Window", "[CLASS:Chrome_RenderWidgetHostHWND; INSTANCE:1]", "Left", 1, 0, 30) When I hover my mouse over the button I get the following information in Window Info >>>> Window <<<< Title: ConnectWise v2016.4 (41139) Class: TabBrowser_MainFrame Position: -8, -8 Size: 1696, 1026 Style: 0x17CF0000 ExStyle: 0x00040100 Handle: 0x0000000000010C56 >>>> Control <<<< Class: Chrome_RenderWidgetHostHWND Instance: 1 ClassnameNN: Chrome_RenderWidgetHostHWND1 Name: Advanced (Class): [CLASS:Chrome_RenderWidgetHostHWND; INSTANCE:1] ID: 315622768 Text: Chrome Legacy Window Position: 0, 30 Size: 1680, 957 ControlClick Coords: 81, 138 Style: 0x56300000 ExStyle: 0x00000020 Handle: 0x0000000000040AC6 >>>> Mouse <<<< Position: 81, 191 Cursor ID: 0 Color: 0x004E7F >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< ConnectWise: My Calendar Chrome Legacy Window >>>> Hidden Text <<<< Chrome Legacy Window
  7. *Spawning a new thread to avoid reopening an Answered question ____________________________________________________________________________ Might be a lil greedy here, but I would like to know if this is doable: So now i'm able to access elements within the group...so i have class NN like Button21, Button22, Button23, Static36, Static37,Static 38 etc. I understand that this is Windows driven. Now, assuming i have access to modify the code of the application, Is there anyway i can add hooks to the application code such that i can get custom Class NNs like "ButtonAdd", "ButtonEdit", "ButtonDel", "TextSum", "TextDiff" and so on. If the answer is yes, what fields must be set in the Application code (developed in C) with standard Windows Controls using Visual Studio.. I'm sure there should be some application developers in here who use AutoIT to test their code.
×
×
  • Create New...