Autoit bot(Craft/Fish) - Simple bot

06/14/2011 03:20 13ouncer#181
Quote:
Originally Posted by Bliizzz View Post
Oh man >.> it seems it does not like me? my resolution is 1280x720, Fishthing is up left, bot is down right, I click on record resolution, click on fish and it says Pixel error @ depth. why?
Maybe because you have not recorded all the pixels?
06/14/2011 03:23 13ouncer#182
Quote:
Originally Posted by ovusian View Post
I haven't seen much in the way of this by anybody else but I usually use it while working so I can keep an eye on any messages and anything that's going on with the game. As I don't AFK bot for many reasons this may be a minority issue but here goes.

Sometimes the bot will trigger or trip my caps lock, and act as if it's holding down the caps lock or shift key. To the point that "," will become "<" as well as all the other issues coming from holding down shift such as selecting large amounts of text or multiple files on the computer.

Mostly this can be solved simply by tapping the shift key again or holding it and typing or tapping the caps lock. This is no way a human error, i am not in any way hitting the caps lock key on my keyboard and it's happened across multiple computers with others using them. I wondered if there is any way to stop it? It seems whenever this occurs the caps lock LED on the keyboards will light up as if it's been pressed, every time the bot does an action with synthesis or jigging.

Additionally if you try to correct it too fast it bot seems to almost "fight" with you and force the text back to the shift enabled variant, and eventually it can lead to a glitch where despite closing out the bot, the shift key is still seemingly held down by the computer, and only a restart seems to fix it.

I've had no other issues with the bot and it works perfectly and I would like to express my thanks for the hard work you've put into this, I was just curious if this was a known bug or issue, or if it's something that hasn't really been known yet. Is it fixable by minimizing the screen or some other small seemingly simple task? I make sure the directs are followed, and I've never tried minimizing or covering the left half of the screen (figured they needed to be seen for pixel detection to work) so I am unsure as to what I could do that would fix it if it's an error on my end. I would like to note that I am using 5.4e, I am now trying 5.4f and I'll edit this post if the issue resolves itself.

Any help would be greatly appreciated!

EDIT: Forgot to mention, the bot also completely disables the use of the "-" key, though the "-" key on the numpad works fine.
Yes, I know about this and it pisses me off every time it happens. I have no idea how to fix it. I believe it is related to sending a control to a window that is not active.

It is strange that the bot takes control of shift and caps locks because nowhere in the bot does it press shift or caps locks.
06/14/2011 03:25 13ouncer#183
there is also a new bug I found last night. When your gear turns red/orange or any damaged color the pixel color of your gear will change when changing bait so the bot will just stall when changing gear if your gear is damaged.
06/14/2011 05:19 Trubass#184
Hey 13ouncer
The final realease did not fix the problem with the bot shutting down right before the synth. Thing is it only did it with certain crafts. I listed my mods to show what fixed it. it works great clear cross the board.

Added:
"SleepSynth=7000" to the INI file. Set the variable "$Sleep_Open_Synth" and called "Sleepsynth" from the INI to $Sleep_Open_Synth
then changed
line 2686 from "Sleep ($Sleep_Open_Window)" to "Sleep ($Sleep_Open_Synth)" and the same for line 2807, otherwise for some reason, the bot would not find the craft border pixel after the synth finishes. But only sometimes.

Suggestions. I have modded the script to do nothing but "Rapid Synth" all the time for my low level crafts. no sense in using hasty hand and getting even less SP if the bot can just use rapid. So my thaught is a check box or something to Rapid Synth. Just a thaught.

Thank you!
06/14/2011 05:56 13ouncer#185
Quote:
Originally Posted by Trubass View Post
Hey 13ouncer
The final realease did not fix the problem with the bot shutting down right before the synth. Thing is it only did it with certain crafts. I listed my mods to show what fixed it. it works great clear cross the board.

Added:
"SleepSynth=7000" to the INI file. Set the variable "$Sleep_Open_Synth" and called "Sleepsynth" from the INI to $Sleep_Open_Synth
then changed
line 2686 from "Sleep ($Sleep_Open_Window)" to "Sleep ($Sleep_Open_Synth)" and the same for line 2807, otherwise for some reason, the bot would not find the craft border pixel after the synth finishes. But only sometimes.

Suggestions. I have modded the script to do nothing but "Rapid Synth" all the time for my low level crafts. no sense in using hasty hand and getting even less SP if the bot can just use rapid. So my thaught is a check box or something to Rapid Synth. Just a thaught.

Thank you!
I can do the rapid synth no problem. I cannot find the issue you are referring to with synth. I try to get mine to do what yours is doing, but i cannot reproduce it.
06/14/2011 07:51 13ouncer#186
Quote:
Originally Posted by Trubass View Post
Hey 13ouncer
The final realease did not fix the problem with the bot shutting down right before the synth. Thing is it only did it with certain crafts. I listed my mods to show what fixed it. it works great clear cross the board.

Added:
"SleepSynth=7000" to the INI file. Set the variable "$Sleep_Open_Synth" and called "Sleepsynth" from the INI to $Sleep_Open_Synth
then changed
line 2686 from "Sleep ($Sleep_Open_Window)" to "Sleep ($Sleep_Open_Synth)" and the same for line 2807, otherwise for some reason, the bot would not find the craft border pixel after the synth finishes. But only sometimes.

Suggestions. I have modded the script to do nothing but "Rapid Synth" all the time for my low level crafts. no sense in using hasty hand and getting even less SP if the bot can just use rapid. So my thaught is a check box or something to Rapid Synth. Just a thaught.

Thank you!
I can add that sleep synth to the bot. That should not be a problem at all. I just finished adding the option to craft a certain recipe using bold/rapid/standard. I will release it soon. Hopefully it will fix that issue you are referring too.
06/14/2011 11:51 Bliizzz#187
@13ouncer How do I record all the pixels :S? Sorry if this is a stupid question but I really don't know because it worked one time and I don't know what I'm doing wrong
06/14/2011 12:37 Trubass#188
i am weaver crafting dyed canvas when i get the error. when i am alchemist crafting shards , the bot works fine as is. i will post a youtube video tonight. i can add the Sleep_synth to the code if i am the only one. just seems odd that it is not random for me. it is consistant with jusy that one craft. rapid mod sounds fantastis. thanks again
06/14/2011 12:57 lucid#189
Quote:
Originally Posted by 13ouncer View Post
Yes, I know about this and it pisses me off every time it happens. I have no idea how to fix it. I believe it is related to sending a control to a window that is not active.

It is strange that the bot takes control of shift and caps locks because nowhere in the bot does it press shift or caps locks.
This happens due to the difference in how messages are send to a window via the Windows API.

You can hook keyboard input using various methods, but autoit avoids using SendInput and other methods because they trigger the LLKHF_INJECTED flag, which is commonly used for detecting cheats.

Pressing special system keys require different input via SendMessage/PostMessage, and there is probably a bug in the way the keys are pressed or depressed.

SendMessage: [Only registered and activated users can see links. Click Here To Register...]
WM_KEYDOWN: [Only registered and activated users can see links. Click Here To Register...]
WM_KEYUP: [Only registered and activated users can see links. Click Here To Register...]
WM_CHAR: [Only registered and activated users can see links. Click Here To Register...]

5 messages are sent to represent a single MODIFIER+KEY combination, so if any of the press or depress messages are malformed, it will puke. This might be a bug in your program where you are sending mismatched key combinations (CTRL DOWN + KEY DOWN + KEY UP, without CTRL UP, for example). It could also have some problem at a deeper level within the message structure, but the problem would be unfortunately difficult to debug without a concrete example to reproduce the problem.

Computers which are playing the game and running a bot with 100% CPU usage might miss messages for other reasons, once your computer's resources are completely utilized all kinds of anomalies could occur. Are the people having this problem using dual core processors?

The problem sounds like wParam/lParam weren't completely cleared before some other key press was added, and after bitwise operations, it evaluates to the caps lock or other unexpected VK signal.

Unfortunately I don't have any experience with your specific bot, but I hope this helps come to some sort of a resolution!
06/14/2011 13:13 13ouncer#190
Quote:
Originally Posted by lucid View Post
This happens due to the difference in how messages are send to a window via the Windows API.

You can hook keyboard input using various methods, but autoit avoids using SendInput and other methods because they trigger the LLKHF_INJECTED flag, which is commonly used for detecting cheats.

Pressing special system keys require different input via SendMessage/PostMessage, and there is probably a bug in the way the keys are pressed or depressed.

SendMessage: [Only registered and activated users can see links. Click Here To Register...]
WM_KEYDOWN: [Only registered and activated users can see links. Click Here To Register...]
WM_KEYUP: [Only registered and activated users can see links. Click Here To Register...]
WM_CHAR: [Only registered and activated users can see links. Click Here To Register...]

5 messages are sent to represent a single MODIFIER+KEY combination, so if any of the press or depress messages are malformed, it will puke. This might be a bug in your program where you are sending mismatched key combinations (CTRL DOWN + KEY DOWN + KEY UP, without CTRL UP, for example). It could also have some problem at a deeper level within the message structure, but the problem would be unfortunately difficult to debug without a concrete example to reproduce the problem.

Computers which are playing the game and running a bot with 100% CPU usage might miss messages for other reasons, once your computer's resources are completely utilized all kinds of anomalies could occur. Are the people having this problem using dual core processors?

The problem sounds like wParam/lParam weren't completely cleared before some other key press was added, and after bitwise operations, it evaluates to the caps lock or other unexpected VK signal.

Unfortunately I don't have any experience with your specific bot, but I hope this helps come to some sort of a resolution!
I know it is not due to KEYUP followed by a KEYDOWN. The only time this type of Send is done is when the bot is changing professions.

Your other theory regarding wParam/lParam seems like the case. How would I go about "clearing" before another key is pressed. As far as I know autoit does not have some sort of "Clear" after sending a key.
06/14/2011 13:16 lucid#191
Quote:
Originally Posted by 13ouncer View Post
I know it is not due to KEYUP followed by a KEYDOWN. The only time this type of Send is done is when the bot is changing professions.

Your other theory regarding wParam/lParam seems like the case. How would I go about "clearing" before another key is pressed. As far as I know autoit does not have some sort of "Clear" after sending a key.
I think I know what your problem is, I will post a proposed fix.
06/14/2011 13:16 13ouncer#192
Quote:
Originally Posted by Bliizzz View Post
@13ouncer How do I record all the pixels :S? Sorry if this is a stupid question but I really don't know because it worked one time and I don't know what I'm doing wrong
Check out the youtube page [Only registered and activated users can see links. Click Here To Register...]

It should give you a general idea on how to record pixels.
06/14/2011 13:18 13ouncer#193
Quote:
Originally Posted by lucid View Post
I think I know what your problem is, I will post a proposed fix.
Sounds great. Cannot wait to see.
06/14/2011 13:27 13ouncer#194
One thing I really wanted to do was to be able to send a mouse command to the FF XIV window, but unfortunately the window will not accept control mouse commands unless it is a normal mouseclick and not a control mouseclick.
06/14/2011 13:31 lucid#195
They're also sent using the same commands, have special parameters, constants, etc. It is not a straightforward kind of thing by any means.

Those same commands are capable of highlighting text and doing a variety of other things as well, such as opening menus or clicking specific buttons without regard to the position those elements (not a mock key press or mouse click, but actually sends the command to do something).

I'm in the process of porting my personal-use bots to VB, struggling to work with the commands directly; but I have only been working on it for a couple of days.