KenNichols Posted February 9, 2011 Share Posted February 9, 2011 I am trying to read the text of a static control and it only shows the text as "Static" What am I doing wrong? See sample code below. Thanks in advance! $StaticTxt = ControlGetText("VZAccess Manager","",1007) MsgBox(1,"Static Text", $StaticTxt) [topic="21048"]New to AutoIt? Check out AutoIt 1-2-3![/topic] Need to make a GUI? You NEED KODA FormDesigner! Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 9, 2011 Share Posted February 9, 2011 Post the information on the Summary tab of AU3Info while pointed at that control, so we can see the class and context. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
KenNichols Posted February 9, 2011 Author Share Posted February 9, 2011 >>>> Window <<<< Title: VZAccess Manager Class: #32770 Position: 390, 86 Size: 640, 520 Style: 0x160B004C ExStyle: 0x00010000 Handle: 0x0000000000020286 >>>> Control <<<< Class: Static Instance: 3 ClassnameNN: Static3 Name: Advanced (Class): [CLASS:Static; INSTANCE:3] ID: 1007 Text: Static Position: 345, 447 Size: 167, 62 ControlClick Coords: 122, 35 Style: 0x5002210D ExStyle: 0x00000004 Handle: 0x000000000002028C >>>> Mouse <<<< Position: 857, 568 Cursor ID: 0 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< Sys __ [ ] X &Start VPN &Disconnect Static Static Static &Usage &My Verizon &Get Access D&etect Device >>>> Hidden Text <<<< &Network Selection GPS Se&ttings &Search: C&ategory: C&ountry: St&ate/Province: C&ity: &Compose &Get New &Reply For&ward &Delete Delete &All View All 0.00 31.2 KB 28.29 0.00 74.4 KB 123.05 75.202.112.78 00:00:52 IP Address: Duration: RX Rate (kbps): Max RX Rate (kbps): RX bytes: Max TX Rate (kbps): TX Rate (kbps): TX bytes: Static R&eset &Apply Help [topic="21048"]New to AutoIt? Check out AutoIt 1-2-3![/topic] Need to make a GUI? You NEED KODA FormDesigner! Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 10, 2011 Share Posted February 10, 2011 The AU3Info tool says the text is "Static" too. I assume you see something else, but it might be an owner-drawn graphic rather than actual text. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
KenNichols Posted February 10, 2011 Author Share Posted February 10, 2011 Take a look at the attached pics, Static3 is circled in Red. If this control can trully not be read, can I detect if the Connect button on the bottom right corner is enabled? [topic="21048"]New to AutoIt? Check out AutoIt 1-2-3![/topic] Need to make a GUI? You NEED KODA FormDesigner! Link to comment Share on other sites More sharing options...
KenNichols Posted February 10, 2011 Author Share Posted February 10, 2011 I figured it out. Rather than reading the text of the Static, I am waiting until the button is enabled before clicking on it. ControlCommand ("VZAccess Manager","", 1003,"IsEnabled","") Thanks again for the help! [topic="21048"]New to AutoIt? Check out AutoIt 1-2-3![/topic] Need to make a GUI? You NEED KODA FormDesigner! Link to comment Share on other sites More sharing options...
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