Saagar Posted June 16, 2010 Posted June 16, 2010 i need help to read text and display in message box. for ex: multiplication using calculator and read the output and show in message box. Pls help how to read the text displayed in calculator edit box
Thatsgreat2345 Posted June 16, 2010 Posted June 16, 2010 Use the autoit window info tool which you can get the control, then use ControlGetText and there you go.
Moderators Melba23 Posted June 16, 2010 Moderators Posted June 16, 2010 Ratna,Welcome to the AutoIt forum. You need to use the ControlGetText command, after having used the Au3 Window Info tool to identify the edit control in Calulator.This script shows how it works:#include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) $hButton = GUICtrlCreateButton("Read", 10, 10, 80, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hButton If Not WinExists("Calculator") Then MsgBox(0, "Error", "Please Start Calculator") Else $sContent = ControlGetText("Calculator", "", "[CLASS:Edit;INSTANCE:1]") MsgBox(0, "Calc Read", "Calculator is reading: " & $sContent) EndIf EndSwitch WEndStart Calculator (the script reminds you if you do not!) and when you are ready to read the result, press the "Read" button.Ask if anything is unclear. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
hornet Posted June 21, 2010 Posted June 21, 2010 What other functions could I use to read text from a list box? When using the window info tool there is no visible or hidden text that is found.
Moderators Melba23 Posted June 21, 2010 Moderators Posted June 21, 2010 hornet. What does the Window Info tool tell you about the window and the listbox control? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
hornet Posted June 21, 2010 Posted June 21, 2010 Hey M23, this is what the info tool shows me. I have tried to run _GUICtrlListBox_GetText and it returns "0". I have also tried _GUICtrlListBox_FindInText and _GUICtrlListBox_FindString with no luck. I have tried various _GUICtrlListView_ functions as well. Any further help or direction is greatly appreciated. >>>> Window <<<< Title: Lobby Class: #32770 Position: 112, 317 Size: 825, 608 Style: 0x94CF0004 ExStyle: 0x00010100 Handle: 0x01020550 >>>> Control <<<< Class: ListClass Instance: 1 ClassnameNN: ListClass1 Name: Advanced (Class): [CLASS:ListClass; INSTANCE:1] ID: Text: Position: 9, 201 Size: 554, 227 ControlClick Coords: 269, 70 Style: 0x54210000 ExStyle: 0x00000000 Handle: 0x01E70520 >>>> Mouse <<<< Position: 394, 638 Cursor ID: 0 Color: 0xF7F7F7 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< >>>> Hidden Text <<<<
Moderators Melba23 Posted June 21, 2010 Moderators Posted June 21, 2010 hornet, This "Lobby" window would not be the lobby in Zynga poker, which your friend Phenom has been trying to read and been warned off here, would it? I would hate to think you were trying to get round the ban on getting help to break an EULA. Do you want a holiday from here that much? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
hornet Posted June 22, 2010 Posted June 22, 2010 Number 1, I have never spoke to Phenom before seeing his post...it just appears that he and I are looking for the same type of information. Number 2, just because it's a "Lobby" does not mean it's a poker lobby. And besides that, just like Phenom said in his post Zynga is not for real money, they don't consider bots cheating, and if I wanted a Zynga bot I would just download the one that is already available. So I would really like to find the information I am looking for just as Phenom probably is as well. Is this something that is too complicated for the massive volume of users in this forum? -hornet
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now