RamboMadCow Posted August 7, 2015 Share Posted August 7, 2015 (edited) I just recently got into AutoIt and this past week I've been working on a project that allows me to use hotkeys and loops to spam certain numbers. I use this with World of Warcraft and custom character macros to help me manage my rotations to a limited degree. This has been a very iterative process where I started with something really nity grity and worked up to something I'm quite happy with. In this process, I discovered the ControlSend() and how to grab the WoW window handle. Now the strange behavior.For some odd reason, when using ControlSend(), it was extremely difficult to get any other key press to register in game. For example: It's currently spamming {NUMPAD1} and I need to move left or right. It would take quite a few key presses to begin the move, and this happened with any movement keystroke. My assumption is that it's any generic keystroke. After some testing, I noticed that this problem does not happen if I use Send() instead of ControlSend()While this was an easy work around, I still wanted the functionality of ControlSend() when the rare time comes that I need to read something or manage friends in my teamspeak, without affecting the response in game. I did some sleuthing and found WinActive(), and I used If...Then...Else statements to achieve exactly what I needed/wanted.The question here is: Why is this happening? Does anyone on this forum have enough experience to know what causes ControlSend() to create these issues where as Send() does not? Knowing why this happens (if possible) can help alleviate further time wasted and frustration and we can write scripts correctly the first time.For reference, here's my entire script with my current solution:<snip> Edited August 7, 2015 by Melba23 Code removed Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 7, 2015 Moderators Share Posted August 7, 2015 RamboMadCow,Unfortunately you appear not to have read the Forum rules since you arrived. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts