Jump to content

Send("{enter}") *not working*


ashley
 Share

Recommended Posts

ok send enter not working(only tested on sendF1 function)

its should check the chexbox ($Enter) if ticked then it will send what is in F1 box then press enter... why it not working... please edit the code below and repost it

#include <GUIConstants.au3>
#include <IE.au3>

HotKeySet("{f1}", "Sendf1")
HotKeySet("{f2}", "Sendf2")
HotKeySet("{f3}", "Sendf3")
HotKeySet("{f4}", "Sendf4")
HotKeySet("{f5}", "Sendf5")
HotKeySet("{f6}", "Sendf6")  
HotKeySet("{f7}", "Sendf7")
HotKeySet("{f8}", "Sendf8")
HotKeySet("{f9}", "Sendf9")
HotKeySet("{f10}", "Sendf10")
HotKeySet("{f11}", "Sendf11")

#Region ### START Koda GUI section ### Form=c:\documents and settings\windows\desktop\koda\forms\rs2mainguifree.kxf
$RS2mainGUI = GUICreate("RS2 Auto Talker-FREE VERSION", 287, 263, 247, 183, BitOR($WS_MINIMIZEBOX,$WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS))
$Fkeys = GUICtrlCreateGroup("", 8, 8, 273, 233)
$Input1 = GUICtrlCreateInput("F1", 16, 24, 121, 21)
$Input2 = GUICtrlCreateInput("F2", 152, 24, 121, 21)
$Input3 = GUICtrlCreateInput("F3", 16, 56, 121, 21)
$Input4 = GUICtrlCreateInput("F4", 152, 56, 121, 21)
$Input5 = GUICtrlCreateInput("F5", 16, 88, 121, 21)
$Input6 = GUICtrlCreateInput("F6", 152, 88, 121, 21)
$Input7 = GUICtrlCreateInput("F7", 16, 120, 121, 21)
$Input8 = GUICtrlCreateInput("F8", 152, 120, 121, 21)
$Input9 = GUICtrlCreateInput("F9", 16, 152, 121, 21)
$Input10 = GUICtrlCreateInput("F10", 152, 152, 121, 21)
$Input11 = GUICtrlCreateInput("F11", 16, 184, 121, 21)
$Public = GUICtrlCreateCombo("Public", 152, 184, 121, 25)
GUICtrlSetData(-1, "Clan")
$Enter = GUICtrlCreateCheckbox("Use enter", 16, 216, 97, 17)
GUICtrlSetState(-1,$GUI_CHECKED)    
$About = GUICtrlCreateButton("About", 208, 216, 59, 17)
$AGRORS = GUICtrlCreateButton("AGRORS", 144, 216, 59, 17, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$SITE = GUICtrlCreateLabel("www.agrors.piczo.com", 168, 240, 111, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $AGRORS
_IECreate("www.agrors.piczo.com")   

case $About
#Region --- CodeWizard generated code Start ---
;MsgBox features: Title=Yes, Text=Yes, Buttons=OK, Icon=Warning, Modality=Task Modal
MsgBox(8240,"About Autotalker - AGRORS","Autotalker - AGRORS V.1.2.5" & @CRLF & @CRLF & "Autotalker made to autotalk in runescape." & @CRLF & @CRLF & "If you are not a member of the 'AGRORS Clan' Please go to www.agrors.piczo.com and report were you found this." & @CRLF & @CRLF & "Thank you!")
#EndRegion --- CodeWizard generated code End ---

EndSwitch
WEnd


func Sendf1()
$readf1 = GUICtrlRead($Input1)
If GUICtrlRead($Public) = "Clan" Then
Send("/" & $readf1)
;sends enter-------
If GUICtrlRead($Enter) = $GUI_CHECKED Then
Send("{enter}")
Else
Send($readf1)
EndIf
EndIf
EndFunc

func Sendf2()
$readf2 = GUICtrlRead($Input2)
If GUICtrlRead($Public) = "Clan" Then
Send("/" & $readf2)
Else
Send($readf2)
EndIf
EndFunc

func Sendf3()
$readf3 = GUICtrlRead($Input3)
If GUICtrlRead($Public) = "Clan" Then
Send("/" & $readf3)
Else
Send($readf3)
EndIf
EndFunc

func Sendf4()
$readf4 = GUICtrlRead($Input4)
If GUICtrlRead($Public) = "Clan" Then
Send("/" & $readf4)
Else
Send($readf4)
EndIf
EndFunc

func Sendf5()
$readf5 = GUICtrlRead($Input5)
If GUICtrlRead($Public) = "Clan" Then
Send("/" & $readf5)
Else
Send($readf5)
EndIf
EndFunc

func Sendf6()
$readf6 = GUICtrlRead($Input6)
If GUICtrlRead($Public) = "Clan" Then
Send("/" & $readf6)
Else
Send($readf6)
EndIf
EndFunc

func Sendf7()
$readf7 = GUICtrlRead($Input7)
If GUICtrlRead($Public) = "Clan" Then
Send("/" & $readf7)
Else
Send($readf7)
EndIf
EndFunc

func Sendf8()
$readf8 = GUICtrlRead($Input8)
If GUICtrlRead($Public) = "Clan" Then
Send("/" & $readf8)
Else
Send($readf8)
EndIf
EndFunc

func Sendf9()
$readf9 = GUICtrlRead($Input9)
If GUICtrlRead($Public) = "Clan" Then
Send("/" & $readf9)
Else
Send($readf9)
EndIf
EndFunc

func Sendf10()
$readf10 = GUICtrlRead($Input10)
If GUICtrlRead($Public) = "Clan" Then
Send("/" & $readf10)
Else
Send($readf10)
EndIf
EndFunc

func Sendf11()
$readf11 = GUICtrlRead($Input11)
If GUICtrlRead($Public) = "Clan" Then
Send("/" & $readf11)
Else
Send($readf11)
EndIf
EndFunc
Link to comment
Share on other sites

Generally this is correct way for reading checked status:

Func IsChecked($control)
     Return BitAnd(GUICtrlRead($control),$GUI_CHECKED) = $GUI_CHECKED
 EndFunc

It's because checkbox can have also another status values and then your simplified version will not work.

But I think in your script this is not source of problems.

I post it here for your information only.

Link to comment
Share on other sites

Generally this is correct way for reading checked status:

Func IsChecked($control)
     Return BitAnd(GUICtrlRead($control),$GUI_CHECKED) = $GUI_CHECKED
 EndFunc

It's because checkbox can have also another status values and then your simplified version will not work.

But I think in your script this is not source of problems.

I post it here for your information only.

so how would i add that into my script

Link to comment
Share on other sites

#include <GUIConstants.au3>
#include <IE.au3>

HotKeySet("{f1}", "SendKey")
HotKeySet("{f2}", "SendKey")
HotKeySet("{f3}", "SendKey")
HotKeySet("{f4}", "SendKey")
HotKeySet("{f5}", "SendKey")
HotKeySet("{f6}", "SendKey")
HotKeySet("{f7}", "SendKey")
HotKeySet("{f8}", "SendKey")
HotKeySet("{f9}", "SendKey")
HotKeySet("{f10}", "SendKey")
HotKeySet("{f11}", "SendKey")

Global $Input[12]

#Region ### START Koda GUI section ### Form=c:\documents and settings\windows\desktop\koda\forms\rs2mainguifree.kxf
$RS2mainGUI = GUICreate("RS2 Auto Talker-FREE VERSION", 287, 263, 247, 183, BitOR($WS_MINIMIZEBOX, $WS_SYSMENU, $WS_CAPTION, $WS_POPUP, $WS_POPUPWINDOW, $WS_GROUP, $WS_TABSTOP, $WS_BORDER, $WS_CLIPSIBLINGS))
$Fkeys = GUICtrlCreateGroup("", 8, 8, 273, 233)
$Input[1] = GUICtrlCreateInput("F1", 16, 24, 121, 21)
$Input[2] = GUICtrlCreateInput("F2", 152, 24, 121, 21)
$Input[3] = GUICtrlCreateInput("F3", 16, 56, 121, 21)
$Input[4] = GUICtrlCreateInput("F4", 152, 56, 121, 21)
$Input[5] = GUICtrlCreateInput("F5", 16, 88, 121, 21)
$Input[6] = GUICtrlCreateInput("F6", 152, 88, 121, 21)
$Input[7] = GUICtrlCreateInput("F7", 16, 120, 121, 21)
$Input[8] = GUICtrlCreateInput("F8", 152, 120, 121, 21)
$Input[9] = GUICtrlCreateInput("F9", 16, 152, 121, 21)
$Input[10] = GUICtrlCreateInput("F10", 152, 152, 121, 21)
$Input[11] = GUICtrlCreateInput("F11", 16, 184, 121, 21)
$Public = GUICtrlCreateCombo("Public", 152, 184, 121, 25)
GUICtrlSetData(-1, "Clan|not clan|example")
$Enter = GUICtrlCreateCheckbox("Use enter", 16, 216, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$About = GUICtrlCreateButton("About", 208, 216, 59, 17)
$AGRORS = GUICtrlCreateButton("AGRORS", 144, 216, 59, 17, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$SITE = GUICtrlCreateLabel("www.agrors.piczo.com", 168, 240, 111, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $AGRORS
            _IECreate("www.agrors.piczo.com")
        Case $About
            #Region --- CodeWizard generated code Start ---
            ;MsgBox features: Title=Yes, Text=Yes, Buttons=OK, Icon=Warning, Modality=Task Modal
            MsgBox(8240, "About Autotalker - AGRORS", "Autotalker - AGRORS V.1.2.5" & @CRLF & @CRLF & "Autotalker made to autotalk in runescape." & @CRLF & @CRLF & "If you are not a member of the 'AGRORS Clan' Please go to www.agrors.piczo.com and report were you found this." & @CRLF & @CRLF & "Thank you!")
            #EndRegion --- CodeWizard generated code End ---
    EndSwitch
WEnd

Func SendKey()
    GUISetState(@SW_HIDE, $RS2mainGUI)
    $key = @HotKeyPressed
    $Split = StringSplit("{f1},{f2},{f3},{f4},{f5},{f6},{f7},{f8},{f9},{f10},{f11}", ",")
    For $x = 1 To $Split[0]
        If $key = $Split[$x] Then
            If GUICtrlRead($Public) = "Clan" Then
                Send("/" & GUICtrlRead($Input[$x]))
                If IsChecked($Enter) Then Send("{ENTER}")
            Else
                Send("/" & GUICtrlRead($Input[$x]))
            EndIf
            ExitLoop
        EndIf
    Next
    GUISetState(@SW_SHOW, $RS2mainGUI)
EndFunc   ;==>SendKey

Func IsChecked($control)
    Return BitAND(GUICtrlRead($control), $GUI_CHECKED) = $GUI_CHECKED
EndFunc   ;==>IsChecked

8)

NEWHeader1.png

Link to comment
Share on other sites

#include <GUIConstants.au3>
#include <IE.au3>

HotKeySet("{f1}", "SendKey")
HotKeySet("{f2}", "SendKey")
HotKeySet("{f3}", "SendKey")
HotKeySet("{f4}", "SendKey")
HotKeySet("{f5}", "SendKey")
HotKeySet("{f6}", "SendKey")
HotKeySet("{f7}", "SendKey")
HotKeySet("{f8}", "SendKey")
HotKeySet("{f9}", "SendKey")
HotKeySet("{f10}", "SendKey")
HotKeySet("{f11}", "SendKey")

Global $Input[12]

#Region ### START Koda GUI section ### Form=c:\documents and settings\windows\desktop\koda\forms\rs2mainguifree.kxf
$RS2mainGUI = GUICreate("RS2 Auto Talker-FREE VERSION", 287, 263, 247, 183, BitOR($WS_MINIMIZEBOX, $WS_SYSMENU, $WS_CAPTION, $WS_POPUP, $WS_POPUPWINDOW, $WS_GROUP, $WS_TABSTOP, $WS_BORDER, $WS_CLIPSIBLINGS))
$Fkeys = GUICtrlCreateGroup("", 8, 8, 273, 233)
$Input[1] = GUICtrlCreateInput("F1", 16, 24, 121, 21)
$Input[2] = GUICtrlCreateInput("F2", 152, 24, 121, 21)
$Input[3] = GUICtrlCreateInput("F3", 16, 56, 121, 21)
$Input[4] = GUICtrlCreateInput("F4", 152, 56, 121, 21)
$Input[5] = GUICtrlCreateInput("F5", 16, 88, 121, 21)
$Input[6] = GUICtrlCreateInput("F6", 152, 88, 121, 21)
$Input[7] = GUICtrlCreateInput("F7", 16, 120, 121, 21)
$Input[8] = GUICtrlCreateInput("F8", 152, 120, 121, 21)
$Input[9] = GUICtrlCreateInput("F9", 16, 152, 121, 21)
$Input[10] = GUICtrlCreateInput("F10", 152, 152, 121, 21)
$Input[11] = GUICtrlCreateInput("F11", 16, 184, 121, 21)
$Public = GUICtrlCreateCombo("Public", 152, 184, 121, 25)
GUICtrlSetData(-1, "Clan|not clan|example")
$Enter = GUICtrlCreateCheckbox("Use enter", 16, 216, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$About = GUICtrlCreateButton("About", 208, 216, 59, 17)
$AGRORS = GUICtrlCreateButton("AGRORS", 144, 216, 59, 17, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$SITE = GUICtrlCreateLabel("www.agrors.piczo.com", 168, 240, 111, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $AGRORS
            _IECreate("www.agrors.piczo.com")
        Case $About
            #Region --- CodeWizard generated code Start ---
            ;MsgBox features: Title=Yes, Text=Yes, Buttons=OK, Icon=Warning, Modality=Task Modal
            MsgBox(8240, "About Autotalker - AGRORS", "Autotalker - AGRORS V.1.2.5" & @CRLF & @CRLF & "Autotalker made to autotalk in runescape." & @CRLF & @CRLF & "If you are not a member of the 'AGRORS Clan' Please go to www.agrors.piczo.com and report were you found this." & @CRLF & @CRLF & "Thank you!")
            #EndRegion --- CodeWizard generated code End ---
    EndSwitch
WEnd

Func SendKey()
    GUISetState(@SW_HIDE, $RS2mainGUI)
    $key = @HotKeyPressed
    $Split = StringSplit("{f1},{f2},{f3},{f4},{f5},{f6},{f7},{f8},{f9},{f10},{f11}", ",")
    For $x = 1 To $Split[0]
        If $key = $Split[$x] Then
            If GUICtrlRead($Public) = "Clan" Then
                Send("/" & GUICtrlRead($Input[$x]))
                If IsChecked($Enter) Then Send("{ENTER}")
            Else
                Send("/" & GUICtrlRead($Input[$x]))
            EndIf
            ExitLoop
        EndIf
    Next
    GUISetState(@SW_SHOW, $RS2mainGUI)
EndFunc   ;==>SendKey
sorry but no... i dont under stand that... cound you just make it so i have all 11 functions and working thanks...
Func IsChecked($control)
    Return BitAND(GUICtrlRead($control), $GUI_CHECKED) = $GUI_CHECKED
EndFunc   ;==>IsChecked

8)

Link to comment
Share on other sites

Neaver mind i dont it..

Check out

the autotalker topic... Please help me make it better

You ask for help... I help... then you dont even try it???????

8)

NVM

sorry but no... i dont under stand that... cound you just make it so i have all 11 functions and working thanks...

Normally, people do not respond in the middle of the code, like you did

Edited by Valuater

NEWHeader1.png

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...