StrategicX Posted April 7, 2009 Share Posted April 7, 2009 (edited) Hey guys, I know Im not usually the one to ask a small question like this, but this has simple got me stuck! Im working on a New Fly bot for world of warcraft that farms all herbs/veins in outlands or northrend, and it uses protected lua to cast spells using CastSpellByName() and has a combat feature that uses the blocked target LUA ex: "ClearTarget(), AttackTarget() etc" But the problem is that my bot does everything WITHOUT Injecting ASM into the process (including Interacting with the nodes which is usually done with injecting ASM) Anyway I the case of casting a spell with the protected lua, My bot will do it just as a human would, by typing it, So the bot needs to type this: "/script CastSpellByName('Tawny Wind Rider')" But when im trying to use ControlSend() Function to send this string it comes out like this "/script CastSpellByName9'tawny Wind Rider'0" (using the the number instead of symbols) not this here is a problem, and im currently having to use the normal Send() command with WinActivate() to activate the wow window and send the strings which does work and sends the symbols, but the problem there is, that I want a Background mode for my bot so the user can be doing Homework,surfing the net, etc while the bot is farming nodes, This cannot be done with regular Send() function. Ive tryed a few things like ClipPut() the String and Ctrl+V with ControlSend() and it still puts out the # and not the symbol! Arggg! So if someone knows how to get controlsend to properly send this string "/script CastSpellByName('Tawny Wind Rider')" PLEASE post the technique used to do so, I tryed the Shift code for it but it didnt seem to work, still showed the Number instead Thanks for your guys help. Edited April 10, 2009 by StrategicX *WoW Dev Projects: AFK Tele Bot development journalSimple Player Pointer Scanner + Z-Teleport*My Projects: coming soon.Check out my WoW Dev wiki for patch 3.0.9!http://www.wowdev.wikidot.com Link to comment Share on other sites More sharing options...
KaFu Posted April 7, 2009 Share Posted April 7, 2009 Did you try to set the raw flag on controlsend? This works for me on a WordPad Edit-Control: ConsoleWrite(ControlSend( "New Text ", "","[CLASS:RICHEDIT50W; INSTANCE:1]", "/script CastSpellByName('Tawny Wind Rider')",1)) OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
StrategicX Posted April 8, 2009 Author Share Posted April 8, 2009 Did you try to set the raw flag on controlsend? This works for me on a WordPad Edit-Control: ConsoleWrite(ControlSend( "New Text ", "","[CLASS:RICHEDIT50W; INSTANCE:1]", "/script CastSpellByName('Tawny Wind Rider')",1)) Damn, I tryed that just now and its still sending the number 9 for ( and 0 for ) >< DOES ANYONE ELSE HAVE ANY IDEAS?! I really need this... *WoW Dev Projects: AFK Tele Bot development journalSimple Player Pointer Scanner + Z-Teleport*My Projects: coming soon.Check out my WoW Dev wiki for patch 3.0.9!http://www.wowdev.wikidot.com Link to comment Share on other sites More sharing options...
zutto Posted April 9, 2009 Share Posted April 9, 2009 (edited) Damn, I tryed that just now and its still sending the number 9 for ( and 0 for ) >< DOES ANYONE ELSE HAVE ANY IDEAS?! I really need this... "/script CastSpellByName+8'Tawny Wind Rider'+9" try that + is shift [atleast in send] works for me but i use send for that crap instead of controlsend... btw, you're using writeprocessmemory to set rotation, right? EDIT: if shift+8 and shift+9 isnt for () then change it to correct keys. that was for scandi KB Edited April 9, 2009 by zutto Link to comment Share on other sites More sharing options...
Zedna Posted April 9, 2009 Share Posted April 9, 2009 (edited) Look here:http://www.autoitscript.com/forum/index.ph...st&p=215501http://www.autoitscript.com/forum/index.ph...st&p=215442If it's possible use ControlSetText() instead of ControlSend() or use SetKeyboardLayou() to english keyboard layout Edited April 9, 2009 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
StrategicX Posted April 9, 2009 Author Share Posted April 9, 2009 Look here:http://www.autoitscript.com/forum/index.ph...st&p=215501http://www.autoitscript.com/forum/index.ph...st&p=215442If it's possible use ControlSetText() instead of ControlSend() or use SetKeyboardLayou() to english keyboard layoutDamn none suggested works >< does ANYONE know any othwer language functions that send keys/strings into a window thats not active, I need this for a background mode, Im sending {ENTER} to the Game window to enable chat dialog box, then need to send "/script CastSpellByName('Tawny Wind Rider')" and {ENTER} again while window isnt active, this way the user can be doing other stuff while my bot is farming sot he window doesnt need to become active to type stuff.So if anyone knows a C++ or C# function that is used in the same way as ControlSend() I can make a small DLL and call that function since theres a BUG in autoits function...and since it seems im not the only one with this problem and it hasnt been fixed yet, and im guessing it never will be the rate of updates with Au3 is going.. Ill have to use something else. Thanks for your help,oh and I tryed ControlSetText() and it changed World of warcraft in the game window title to "/script CastSpellByName('Tawny Wind Rider')" (lol) so thats not gonna work. I even tryed to Ctrl+V with ClipPut() of the string and its still returning the number instead of the char... its just a stupid bug that SHOULD be fixed.thanks for everyones help.. any other suggests for anouther language ControlSend() like function would be very helpfulk thanks *WoW Dev Projects: AFK Tele Bot development journalSimple Player Pointer Scanner + Z-Teleport*My Projects: coming soon.Check out my WoW Dev wiki for patch 3.0.9!http://www.wowdev.wikidot.com Link to comment Share on other sites More sharing options...
RampagerX Posted April 9, 2009 Share Posted April 9, 2009 Can you not have your users just internally keybind a macro for the functions you need like getting on their mount. Bind "p" AutoItSetOption("SendKeyDownDelay", 50) AutoItSetOption ("MouseClickDelay", 0) $WoWAppName = "World of Warcraft" While 1 WinWaitActive($WoWAppName) ControlSend($WoWAppName, "", "", "{p}") Wend Func MyExit() Exit EndFunc Damn none suggested works >< does ANYONE know any othwer language functions that send keys/strings into a window thats not active, I need this for a background mode, Im sending {ENTER} to the Game window to enable chat dialog box, then need to send "/script CastSpellByName('Tawny Wind Rider')" and {ENTER} again while window isnt active, this way the user can be doing other stuff while my bot is farming sot he window doesnt need to become active to type stuff. So if anyone knows a C++ or C# function that is used in the same way as ControlSend() I can make a small DLL and call that function since theres a BUG in autoits function...and since it seems im not the only one with this problem and it hasnt been fixed yet, and im guessing it never will be the rate of updates with Au3 is going.. Ill have to use something else. Thanks for your help, oh and I tryed ControlSetText() and it changed World of warcraft in the game window title to "/script CastSpellByName('Tawny Wind Rider')" (lol) so thats not gonna work. I even tryed to Ctrl+V with ClipPut() of the string and its still returning the number instead of the char... its just a stupid bug that SHOULD be fixed. thanks for everyones help.. any other suggests for anouther language ControlSend() like function would be very helpfulk thanks Link to comment Share on other sites More sharing options...
StrategicX Posted April 10, 2009 Author Share Posted April 10, 2009 Can you not have your users just internally keybind a macro for the functions you need like getting on their mount. Bind "p" AutoItSetOption("SendKeyDownDelay", 50) AutoItSetOption ("MouseClickDelay", 0) $WoWAppName = "World of Warcraft" While 1 WinWaitActive($WoWAppName) ControlSend($WoWAppName, "", "", "{p}") Wend Func MyExit() Exit EndFunc hmm.. this is a good idea mate.. Thanks for the idea The only thing is to make this a Noob friendly as possible... and believe it or not, that is deemed "hard" by noobs, Im thinkin a setup window or something, unless i can memory write a macro or make an addon to do it Does anyone know exact DLL calls that send keys to inactive windows? Like id like to see what Autoit uses for ControlSend() and modify it myself but it doesnt seem to be in the UDFs folders.... any ideas? *WoW Dev Projects: AFK Tele Bot development journalSimple Player Pointer Scanner + Z-Teleport*My Projects: coming soon.Check out my WoW Dev wiki for patch 3.0.9!http://www.wowdev.wikidot.com Link to comment Share on other sites More sharing options...
Zedna Posted April 10, 2009 Share Posted April 10, 2009 Does anyone know exact DLL calls that send keys to inactive windows? Like id like to see what Autoit uses for ControlSend() and modify it myself but it doesnt seem to be in the UDFs folders.... any ideas?There are sources for older 3.1.0 version of AutoIthttp://www.autoitscript.com/autoit3/files/...-v3.1.0-src.exe Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
StrategicX Posted April 10, 2009 Author Share Posted April 10, 2009 There are sources for older 3.1.0 version of AutoIthttp://www.autoitscript.com/autoit3/files/...-v3.1.0-src.exeI couldnt find the function for controlsend in that, just header file with it being defined, Damn no one knows how to send a string in keys to an inactive window with a dif language?can i get one of the developers to respond here? a way to get around this bug in the API would be grwat from the developers... *WoW Dev Projects: AFK Tele Bot development journalSimple Player Pointer Scanner + Z-Teleport*My Projects: coming soon.Check out my WoW Dev wiki for patch 3.0.9!http://www.wowdev.wikidot.com Link to comment Share on other sites More sharing options...
StrategicX Posted April 11, 2009 Author Share Posted April 11, 2009 Can i please get an answer from a developer or someone that knows how to avoid this bug in Au3 API?? Please im really in need one this for background mode, any methods, functions or w,e, or a code snippet in C++ that can send a string like "/script CastSpellByName("Tawny Wind Rider')" to an inactive window, Thanks for any help offered, *WoW Dev Projects: AFK Tele Bot development journalSimple Player Pointer Scanner + Z-Teleport*My Projects: coming soon.Check out my WoW Dev wiki for patch 3.0.9!http://www.wowdev.wikidot.com Link to comment Share on other sites More sharing options...
Zedna Posted April 11, 2009 Share Posted April 11, 2009 (edited) There are sources for older 3.1.0 version of AutoItFrom sources of older 3.1.0 version of AutoIt were removed some parts due to previously stolen code.I don't remember which parts were exactly removed but these ones:GUIDllCallControlListViewand maybe also these:InetGetTCP Edited April 11, 2009 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
try67 Posted November 9, 2022 Share Posted November 9, 2022 (edited) I'm having a similar issue. Here's the line of code (notice the flag parameter is set to 1 = ie. RAW): ControlSend( "Open" , "File &name:" , "Edit1", "C:\Users\GiladD\Downloads\000 Table of Contents - 3.pdf",1) And here's the error message it caused: Note there's a semi-colon instead of a colon in the file-path, after "C". Something here is not working properly... I'm using AutoIt 3.3.16.1 on Windows 10, by the way. EDIT: Just wanted to clarify that sometimes that same command works fine, and other times it doesn't... It's inconsistent. Edited November 9, 2022 by try67 Link to comment Share on other sites More sharing options...
Zedna Posted November 10, 2022 Share Posted November 10, 2022 As I wrote 13 years before: Quote use ControlSetText() instead of ControlSend() In FileOpen dialog it's absolutely best/working solution. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Zedna Posted November 10, 2022 Share Posted November 10, 2022 For more detailed info about ControlSend() problems/limitations & workarounds look here Resources UDF ResourcesEx UDF AutoIt Forum Search 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