Jump to content

ControlSend does send 7 instead of /


PiroX
 Share

Recommended Posts

You're missing a closing quote, but I assume that's a posting typo.

Use the "Raw Flag":

ControlSend("World of Warcraft", "", 0, "/blubb", 1)

:)

P.S. Is '0' a valid control ID? Seems unlikely. Is it valid as null "" for sending to the window in WoW?

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

this doesn't work always. It still post 7 instead of / like before

This works for me regardless of whether I use the 'raw' flag or not:

#include <guiconstants.au3>

Opt("GuiOnEventMode", 1)
$hGUI = GUICreate("World of Warcraft", 300, 200)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Quit")
$Input = GUICtrlCreateInput("", 10, 10, 280, 20)
GUICtrlCreateButton("Send", 100, 160, 100, 30)
GUICtrlSetOnEvent(-1, "_SendIt")
GUISetState()

While 1
    Sleep(20)
WEnd

Func _SendIt()
    ControlFocus("World of Warcraft", "", $Input)
    ControlSend("World of Warcraft", "", "", "/blubb")
EndFunc   ;==>_SendIt

Func _Quit()
    Exit
EndFunc   ;==>_Quit

I don't think the problem is AutoIt's. Your app is interpreting "/" or "/b" as something and showing "7". Coincidentally, the ASCII code for BEL (bell) is 0x07. Maybe it sees "/b" as an escape sequence for BEL?

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Hi

Sometimes ControlSend does send 7 instead of / to the window

ControlSend("World of Warcraft", "", 0, "/blubb)

it sends often 7blubb

Do u know why?

mfg PiroX

Run("Notepad.exe", "", @SW_MAXIMIZE)
sleep(1000)
$title = WinGetTitle("", "")
MsgBox(4096, "WinGetTitle", "WinGetTitle ==> " & $title, 10)
$handle = ControlGetHandle($title, "", "")
MsgBox(4096, "ControlGetHandle",  "ControlGetHandle ==> " & $handle, 10)
$var = ControlGetText($title, "",$handle)
MsgBox(4096, "ControlGetText", "ControlGetText ==> " & $var, 10)
$flag = 0
ControlSend ( $title, $var, $handle, "string", $flag)

#include <GUIConstants.au3>
$Form1 = GUICreate("AForm1", 418, 284, 172, 93)
$Button1 = GUICtrlCreateButton("ControlSend", 8, 8, 209, 49, 0)
$Edit1 = GUICtrlCreateEdit("", 8, 72, 401, 193)
GUICtrlSetData(-1, "Wolf")
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
$title = WinGetTitle("", "")
MsgBox(4096, "WinGetTitle",  "WinGetTitle ==> " & $title, 10)
$var = ControlGetText($title,"",$Edit1)
MsgBox(4096, "ControlGetText", "ControlGetText ==> " & $var, 10)
ControlFocus ($title,$var,$Edit1)
ControlSend ( $title,$var,$Edit1, "This is a line of text in the $Edit1" , 0)
    EndSwitch
WEnd

صرح السماء كان هنا

 

Link to comment
Share on other sites

k here is the code for you guys

Func request_pause()
    Opt("MouseCoordMode", 1)
    $trayPause = 0
    disableKeys()
    ControlSend($win_title, "", 0, "{SPACE}")
    Sleep(Random(90, 110))

    If $modus = 1 Then
        ClipPut("/" & $inGameCommand & " off")
        ControlSend($win_title, "", 0, "{enter}")
        Sleep(Random(50, 75))
        If WinActive($win_title) Then
            ControlSend($win_title, "", 0, "^v")
        Else
            ControlSend($win_title, "", "", "/" & $inGameCommand & " off",1)
        EndIf
        Sleep(Random(20, 25))
        ControlSend($win_title, "", 0, "{enter}")
    EndIf
    
    
EndFunc ;==>request_pause

The full code u can download here.

This function is in line 3960 and the controlsend line 3987

$win_title = WoW handle

$ingameCommand = a command like blubb or psalty, just to control the addon of wow. it is no emote!

This bug will just appear if the window is not activ. I can avoid it if the window is activ with clipput.

If u run this WoW Bot, u need wow :) and click on trayicon on pause, the var $traypause is set to 1. I can't jump out to request_pause because i can't use the tray function anymore after jumping out of this tray function, i don't know why.

if traypause = 1 it will call request_pause. And if u use mode 1 it sould send to wow "/blubb off" but it send "7blubb off". If u click on tray wow is automatically inactiv, and yes i can reactivate bei winactivate, but i don't wanna use this.

www.pirox.de

PiroX

Edited by PiroX
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...