Bert Posted April 14, 2006 Share Posted April 14, 2006 I noticed something happen in my script from time to time, and I can't explain it. I do a simple iniread, and then do a controlsend of that data. Normally it works fine, but every so often, like once every couple of days, instead of it sending what I want, which is CTS-MA, it will send CTS-Ma. I use this function about 50 times a day, so it is very uncommon. This may not seem like a big deal, but the application my script works with is case sensitive. The lower case "a" causes a failure. Has anyone else seen something like this when it comes to iniread and controlsend? I'm not sure this is the correct forum for this, but I may be doing something wrong, and not be aware of it. The code I use for this:$search1 = IniRead("bin\unplus.ini", @UserName, "searchincident", "") Sleep(5) ControlSend("Unicenter ServicePlus Service Desk - Incident Search", "", "Internet Explorer_Server1", $search1, 0) The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Simucal Posted April 14, 2006 Share Posted April 14, 2006 That seems very interesting. Have you tried forcing the string to upper case and running it a few hundred times and see what that does? That doesnt fix the bug but may be a bandaid solution. AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
Valuater Posted April 14, 2006 Share Posted April 14, 2006 bug or not... to help you maybe use this $result = StringUpper("I am 4-word string") MsgBox(0, "String converted to uppercase is:", $result) 8) Link to comment Share on other sites More sharing options...
Bert Posted April 14, 2006 Author Share Posted April 14, 2006 @Val: I have other users using this script, and in some cases, they will have something in lowercase as part of what they send. An example would be BOM-EIS_FL-Facilit_Wh. I have to make sure what is sent is correct. The string being sent is the group the application looks in to find tickets. I was thinking I could put in a check by doing a iniread twice and checking if they match. If they didn't, they would rerun to correct the string. I hate to do that, but I don't know of a better way. Thoughts? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Bert Posted April 14, 2006 Author Share Posted April 14, 2006 (edited) I did notice something else. This is something it is doing omost everytime, and I didn't notice it at first. It is replacing the "-" with "_" when it sends the data. I did a test to see what was being pulled from the ini file with a msgbox. That is working correctly. The problem is with the controlsend. It is sending corrupt data. edit: I changed the controlsend to send, and it worked fine. I changed it back, and the problem returned. I also changed the controlsend to this:ControlSend("Unicenter ServicePlus Service Desk - Incident Search", "", "Internet Explorer_Server1", "CTS-MA", 1)It sent CTS_MA. Would that qualify as a bug? Edited April 14, 2006 by vollyman The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Valuater Posted April 14, 2006 Share Posted April 14, 2006 are you using the last flag in ControlSend ControlSend ( "title", "text", controlID, "string" [, flag]) Parameters title The title of the window to access. text The text of the window to access. controlID The control to interact with. See Controls. string String of characters to send to the control. flag [optional] Changes how "keys" is processed: flag = 0 (default), Text contains special characters like + to indicate SHIFT and {LEFT} to indicate left arrow. flag = 1, keys are sent raw. flag = 1, keys are sent raw. 8) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 14, 2006 Moderators Share Posted April 14, 2006 (edited) That's the 2nd time in 2 weeks that this has been mentioned... Hopefully it will be looked into, but until then, have you tried ControlSetText() to substitute it for a while? Edit: Or try Valuaters suggestion first (but controlsettext() is faster anyway). Edited April 14, 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...
Bert Posted April 14, 2006 Author Share Posted April 14, 2006 I can do send and it should work fine. I rather use controlsend to make it more bulletproof, but I can do a workaround to deal with it. I can do a windowactivate right before I use send. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Developers Jos Posted April 14, 2006 Developers Share Posted April 14, 2006 I can do send and it should work fine. I rather use controlsend to make it more bulletproof, but I can do a workaround to deal with it. I can do a windowactivate right before I use send.What version are you using that is giving this issue ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Bert Posted April 14, 2006 Author Share Posted April 14, 2006 Latest beta. I update every day. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Developers Jos Posted April 14, 2006 Developers Share Posted April 14, 2006 I update every day.No need to do that !!! JP rolls them out regularly but not that often... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Bert Posted April 14, 2006 Author Share Posted April 14, 2006 I just run the update utility each morning to check. Its easier, and saves time from looking it up on the web. The Vollatran project My blog: http://www.vollysinterestingshit.com/ 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