Jump to content

Problem with ControlSend() and Special Chars "( & ) ' " "


Recommended Posts

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 :D (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. :o

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 :D

Thanks for your guys help.

Edited 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

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))
Link to comment
Share on other sites

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

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 :D 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 by zutto
Link to comment
Share on other sites

Look here:

http://www.autoitscript.com/forum/index.ph...st&p=215501

http://www.autoitscript.com/forum/index.ph...st&p=215442

If it's possible use ControlSetText() instead of ControlSend() or use SetKeyboardLayou() to english keyboard layout

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

*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

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

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 :D 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 :o 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

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 AutoIt

http://www.autoitscript.com/autoit3/files/...-v3.1.0-src.exe

Link to comment
Share on other sites

There are sources for older 3.1.0 version of AutoIt

http://www.autoitscript.com/autoit3/files/...-v3.1.0-src.exe

I 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

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

There are sources for older 3.1.0 version of AutoIt

From 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:

GUI

DllCall

ControlListView

and maybe also these:

InetGet

TCP

Edited by Zedna
Link to comment
Share on other sites

  • 13 years later...

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:

image.png.771b3f212b4aad53bed1287d7c2ea762.png

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 by try67
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...