quielb Posted March 29, 2006 Share Posted March 29, 2006 I have an application that creates and manages users. The people that use this application don't type good. So I decided to create a small autoit program that could parse the Magstripe off a drives license and fill in the forms for them. That way the only thing they have to do is click a few buttons no typing. I have worked out the creating new users apspect by using a combination of WinWait, SetFocus, and send. The editing existing is a bit tricker. The input boxes on the form have a hidden control and a visible control on top of each other. The visible control is ThunderRT5UserControlXX and the hidden control is MSMaskWndClassXX. My first problem is clearing out the existing data in the input box and then filling it in with new data. My first thought was to just SetFocus then Send a CTRL-A then Send the new data. Didn't work. The controls don't respond to CTRL-A. My next thought was ControlSetText. Didn't work. No text shows up in either the hidden or visible control. For giggles I thought I would use ControlGetText just to see what was in the input box. It returns nothing. Using the window info tool also shows the same thing, nothing. But when I look at the screen there is data there. I just can't find the control its contained in. I thought maybe there was a 3rd control so I ControlMoved the other controls and there is nothing else under them. So what's my problem? I can't pull out the stuff in the input box. I can't send anything to the input box. Well thats not entirely true I can use SetFocus, Send and send stuff, but I can't wipe out what is already in the box. I can't even see whats in the box. Where is the data that's store in the box. Why can't I see what is in either control when I look at the text value? Any suggestions, comments, alternatives would be greatly appreciated Link to comment Share on other sites More sharing options...
seandisanti Posted March 29, 2006 Share Posted March 29, 2006 I have an application that creates and manages users. The people that use this application don't type good. So I decided to create a small autoit program that could parse the Magstripe off a drives license and fill in the forms for them. That way the only thing they have to do is click a few buttons no typing. I have worked out the creating new users apspect by using a combination of WinWait, SetFocus, and send.The editing existing is a bit tricker. The input boxes on the form have a hidden control and a visible control on top of each other. The visible control is ThunderRT5UserControlXX and the hidden control is MSMaskWndClassXX.My first problem is clearing out the existing data in the input box and then filling it in with new data. My first thought was to just SetFocus then Send a CTRL-A then Send the new data. Didn't work. The controls don't respond to CTRL-A.My next thought was ControlSetText. Didn't work. No text shows up in either the hidden or visible control. For giggles I thought I would use ControlGetText just to see what was in the input box. It returns nothing. Using the window info tool also shows the same thing, nothing. But when I look at the screen there is data there. I just can't find the control its contained in. I thought maybe there was a 3rd control so I ControlMoved the other controls and there is nothing else under them.So what's my problem? I can't pull out the stuff in the input box. I can't send anything to the input box. Well thats not entirely true I can use SetFocus, Send and send stuff, but I can't wipe out what is already in the box. I can't even see whats in the box. Where is the data that's store in the box. Why can't I see what is in either control when I look at the text value?Any suggestions, comments, alternatives would be greatly appreciatedwelcome to the forum, it sounds like you're doing all of the right troubleshooting already. with the autoit window info tool, do you see any of the control text in the 'window text' area? also, is this happening in a child window? you may have to set Opt("WinSearchChildren",1) if that's the case. what is the name of the program? i only ask because someone may have used/automated it already and may be able to offer better help. Link to comment Share on other sites More sharing options...
quielb Posted March 29, 2006 Author Share Posted March 29, 2006 welcome to the forum, it sounds like you're doing all of the right troubleshooting already. with the autoit window info tool, do you see any of the control text in the 'window text' area? also, is this happening in a child window? you may have to set Opt("WinSearchChildren",1) if that's the case. what is the name of the program? i only ask because someone may have used/automated it already and may be able to offer better help.Yes the existing data I want to replace shows up in the visible window text. When I use ControlSetText and ControlSend they both return 1 meaning success. The funny thing is with ControlSetText the window info tool shows the "text" value is my new data ( from the contol under mouse section ). But the screen doesn't update.And when I click the input box the control under Mouse is MSMaskWndClassXX. But If I send a Setfocus to Thunder... it puts the cursor in the same input box.the app I'm working with is Super Playmate from Aristocrate software. Link to comment Share on other sites More sharing options...
seandisanti Posted March 29, 2006 Share Posted March 29, 2006 Yes the existing data I want to replace shows up in the visible window text. When I use ControlSetText and ControlSend they both return 1 meaning success. The funny thing is with ControlSetText the window info tool shows the "text" value is my new data ( from the contol under mouse section ). But the screen doesn't update.And when I click the input box the control under Mouse is MSMaskWndClassXX. But If I send a Setfocus to Thunder... it puts the cursor in the same input box.the app I'm working with is Super Playmate from Aristocrate software.is it free software that i could download to try to play with it? Link to comment Share on other sites More sharing options...
quielb Posted March 29, 2006 Author Share Posted March 29, 2006 is it free software that i could download to try to play with it?No. In fact its the opposite. Its a very expensive piece of software. Its a gaming industry specific software. Link to comment Share on other sites More sharing options...
seandisanti Posted March 29, 2006 Share Posted March 29, 2006 No. In fact its the opposite. Its a very expensive piece of software. Its a gaming industry specific software.i'll see if i can't get my hands on it. i know some people in gaming Link to comment Share on other sites More sharing options...
quielb Posted March 29, 2006 Author Share Posted March 29, 2006 i'll see if i can't get my hands on it. i know some people in gamingThanks for all your help. Give me a little bit of time and I will run through all the things I have tried. I will post the code snipets and results of each. This may or may not be helpful Link to comment Share on other sites More sharing options...
seandisanti Posted March 30, 2006 Share Posted March 30, 2006 Thanks for all your help. Give me a little bit of time and I will run through all the things I have tried. I will post the code snipets and results of each. This may or may not be helpfulit sounds like you've been pretty thorough with your troubleshooting, and have given it a good effort. i'm sure noone that can help would fault you for lack of trying. i'll see what i can do this evening, but i have a date with the wife, and soccer practice, so probably won't really be able to look at it until tomorrow Link to comment Share on other sites More sharing options...
quielb Posted March 30, 2006 Author Share Posted March 30, 2006 Thanks for all your help. Give me a little bit of time and I will run through all the things I have tried. I will post the code snipets and results of each. This may or may not be helpful These are the two functions I use. Neither of which works. there are 2 controls, one on top of eachother. The MSMaskWndClass92 control is not visible. And I can't make it visible with Controlshow(). ControlSetText("Super-Playmate", "", "ThunderRT5UserControl91", $playerdata[2]) ControlSetText("Super-Playmate", "", "MSMaskWndClass92", $playerdata[2]) ControlSend("Super-Playmate", "", "ThunderRT5UserControl91", $playerdata[2]) ControlSend("Super-Playmate", "", "MSMaskWndClass92", $playerdata[2]) Neither of these functions on either of these controls update what I see on the screen. I thought that maybe the data was being put in the hidden control, thats why I didn't see it. But when I save my changes and then reload the data there are no changes. I'm at a loss. One of these methods should work. I could do it the dirty way. Set focus to the control. Send a bunch of del keystrokes. Then send the new data. But that is dirty. Link to comment Share on other sites More sharing options...
seandisanti Posted March 30, 2006 Share Posted March 30, 2006 I could do it the dirty way. Set focus to the control. Send a bunch of del keystrokes. Then send the new data. But that is dirty.agreed. have you tried ControlCommand() to work with the controls? Link to comment Share on other sites More sharing options...
quielb Posted March 30, 2006 Author Share Posted March 30, 2006 agreed. have you tried ControlCommand() to work with the controls?ControlCommand doesn't do anything either Link to comment Share on other sites More sharing options...
quielb Posted March 30, 2006 Author Share Posted March 30, 2006 I went back to the new player portion of my program ( since it works with controlfocus and send ) and tried the ControlSend and ControlSetText and neither of those functions work there either, for the either the hidden or visible control. Is it possible that I may just have to do this dirty? Link to comment Share on other sites More sharing options...
quielb Posted April 4, 2006 Author Share Posted April 4, 2006 So I decided that the only way to get this to work is send a bunch of del and bs to clear the boxes then send the new data. But the plot thickens There is a check box that I need to get the status of and then uncheck if checked. The control is named ThunderRT5UserControl97. I use ControlCommand("Super-Playmate","","ThunderRT5UserControl97","IsChecked","") to get the status and every time checked or not returns 0. Any suggestions? BTW what language creates ThunderRT5UserControl? Link to comment Share on other sites More sharing options...
MHz Posted April 4, 2006 Share Posted April 4, 2006 (edited) Just uncheck it. You may not need to be concerned of it's status. ControlCommand("Super-Playmate","","ThunderRT5UserControl97","UnCheck","") Edited April 4, 2006 by MHz Link to comment Share on other sites More sharing options...
quielb Posted April 4, 2006 Author Share Posted April 4, 2006 Just uncheck it. You may not need to be concerned of it's status. ControlCommand("Super-Playmate","","ThunderRT5UserControl97","UnCheck","") the control doesn't respond to the Uncheck either Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 4, 2006 Moderators Share Posted April 4, 2006 (edited) I guess the last option is... did you try ControlClick()? There's also a UDF by LxP that may be handy to help you... I'll see if I can dig it up.This may help: http://www.autoitscript.com/forum/index.ph...topic=14323&hl= Edited April 4, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
quielb Posted April 4, 2006 Author Share Posted April 4, 2006 I guess the last option is... did you try ControlClick()? There's also a UDF by LxP that may be handy to help you... I'll see if I can dig it up.The problem with control click is I need to know the state of the control before I click on it. If its already unchecked I may want to leave it that way. Link to comment Share on other sites More sharing options...
herewasplato Posted April 5, 2006 Share Posted April 5, 2006 (edited) You asked, "BTW what language creates ThunderRT5UserControl?"I'm not sure what app made that, but it is probably not "standard".From the help file under Controls:Note: AutoIt only works with standard Microsoft controls - some applications write their own custom controls which may look like a standard MS control but may resist automation. Experiment!...and I would say that you have experimented.The problem with control click is I need to know the state of the control before I click on it. If its already unchecked I may want to leave it that way.From the help file under Send Key List:Send("{+}") Usually checks a checkbox (if it's a "real" checkbox.)Send("{-}") Usually unchecks a checkbox.If its already unchecked and you send "-", the state should not change. Sometimes this works... sometimes not... Experiment!If you must know the state of the checkbox before doing anything - you might be stuck with the Pixel functions... perhaps PixelCheckSum over the entire CheckBox. Edited April 5, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
quielb Posted April 6, 2006 Author Share Posted April 6, 2006 You asked, "BTW what language creates ThunderRT5UserControl?"I'm not sure what app made that, but it is probably not "standard".From the help file under Controls:...and I would say that you have experimented.From the help file under Send Key List:If its already unchecked and you send "-", the state should not change. Sometimes this works... sometimes not... Experiment!If you must know the state of the checkbox before doing anything - you might be stuck with the Pixel functions... perhaps PixelCheckSum over the entire CheckBox.Sending a "+" or "-" does not change the state of the control. I really don't want to do any Pixel functions. So I guess I will make it the responsibility of the user to make sure to change the box if necessary. Link to comment Share on other sites More sharing options...
Confuzzled Posted April 8, 2006 Share Posted April 8, 2006 So I decided that the only way to get this to work is send a bunch of del and bs to clear the boxes then send the new data.But the plot thickensThere is a check box that I need to get the status of and then uncheck if checked. The control is named ThunderRT5UserControl97.I use ControlCommand("Super-Playmate","","ThunderRT5UserControl97","IsChecked","") to get the status and every time checked or not returns 0.Any suggestions?BTW what language creates ThunderRT5UserControl? Thunder is the internal code name used by Microsoft for Visual Basic. It seems you have version 5 code runtime, which has been around for a number of years. 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