Sign in to follow this  
Followers 0
Bert

Bug?

12 posts in this topic

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)

:think:

Share this post


Link to post
Share on other sites



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)

Share this post


Link to post
Share on other sites

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)


NEWHeader1.png

Share this post


Link to post
Share on other sites

@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?

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by vollyman

Share this post


Link to post
Share on other sites

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)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#7 ·  Posted (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 by SmOke_N

[center]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.[/center]

Share this post


Link to post
Share on other sites

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 ?

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0