Sign in to follow this  
Followers 0
jphillips2

Changed the speed of send output

11 posts in this topic

I need a little help, I am writing a script that when you push a key text auto populates in the active field. Is there any way to speed up the text on the out put. Right now is seems slow since it looks like someone is typing it.

Thanks in advance for the help

Jake

Share this post


Link to post
Share on other sites



Try:

Opt("SendKeyDelay",1)oÝ÷ ØêÚºÚ"µÍÌÍÜÙ[Ý[ÈH   ][ÝÝÝ    ][ÝÂÌÍÙÙ]HÛÙ]

BÛ]
    ÌÍÜÙ[Ý[ÊBÙ[
    ][Ý×][ÝÊBÛ]
    ÌÍÙÙ]
oÝ÷ ØêÚºÚ"µÍÛÛÛÙ[
ÛÚÈ[H[[HÜÜ[Y]È

Kurt


Awaiting Diablo III..

Share this post


Link to post
Share on other sites

The second option is not supposed to be there, and whenever I try to edit my post it modifies the examples in my [.autoit] tags.


Awaiting Diablo III..

Share this post


Link to post
Share on other sites

...and then there is ControlSetText()


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

...and then there is ControlSetText()

Ok can you give me a example of where to use it. Here is my code.

Global $Paused

HotKeySet("{PAUSE}", "TogglePause")

HotKeySet("{ESC}", "Terminate")

HotKeySet("{f1}","ShowMessage")

While 1

Sleep(100)

WEnd

;;;;;;;;

Func TogglePause()

$Paused = NOT $Paused

While $Paused

sleep(100)

ToolTip('Script is "Paused"',0,0)

WEnd

ToolTip("")

EndFunc

Func Terminate()

Exit 0

EndFunc

Func ShowMessage()

send ("Site(s):{Enter}Issues:{Enter}Ownership:{enter}Agents:{enter}TP Incident:{Enter}Ext Ticket:",1)

EndFunc

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

If the application that you are sending this info to is inside of a web browser like Internet Explorer, then the Control functions like ControlSetText may not work.

In order for us to help you write the proper code for your needs:

Please open the AutoIt Window Info tool

Click on the control (field) of interest

Press Ctrl-Alt-F to freeze the data in the AutoIt Window Info tool

then copy/paste/post the info from the "Summary tab" of that tool for the Control Section - like this:

>>>> Control <<<<

Class: SysListView32

Instance: 1

ClassnameNN: SysListView321

As far as where to place the ControlSetText line in your script, it will replace the "Send" line in your code.

The Control... functions are the best to use, but not all applications respond to them.

For now (like _Kurt mentioned), add this as the first line of your script:

Opt("SendKeyDelay",1)

and see if that is fast enough for you.

Edit: I do not think that you want the ", 1" at the end of your send line.

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

You can add both Opt("SendKeyDelay", 0) and Opt("SendKeydownDelay", 0)

Maybe you will get a better result!

Share this post


Link to post
Share on other sites

You can add both Opt("SendKeyDelay", 0) and Opt("SendKeydownDelay", 0)

Maybe you will get a better result!

They way I am trying to have this work is to send the preset text to a active window including IE and Firefox. I am trying to make it look like it is not being typed. is there anyway to do that?

Share this post


Link to post
Share on other sites

Not that I know of because in effect it IS being typed just at an incredible rate. Plus there is no firefox support in autoit, not directly, so the coding may not work correctly or at all if you try to do it this way.

Share this post


Link to post
Share on other sites

They way I am trying to have this work is to send the preset text to a active window including IE and Firefox. I am trying to make it look like it is not being typed. is there anyway to do that?

Like Kurt said the clipboard can be an alternative

Func ShowMessage()
    $OldClip = ClipGet()
    ClipPut("Site(s):" & @CRLF & "Issues:" & @CRLF & "Ownership:" & @CRLF & "Agents:" & @CRLF & "TP Incident:" & @CRLF & "Ext Ticket:")
    Send("^V")
    ClipPut($OldClip)
EndFunc   ;==>ShowMessage

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

I need a little help, I am writing a script that when you push a key text auto populates in the active field. Is there any way to speed up the text on the out put. Right now is seems slow since it looks like someone is typing it.

Thanks in advance for the help

Jake

I've played and tested all of these suggestion in the past and the one I've come to love is Kurt's suggestion of pasting from the clipboard. You can really see the difference in speed in long strings, even if you use Opt("SendKeyDelay", 1). The Help file warns about using 0 and I can't really see a difference between 0 and 1. With ControlSetText, that too can be tricky as mentioned in the Help Remarks section. When ControlSetText() works its a close second to Send("^v"), imo. One last point, if you are pasting to multiple fields and you use Opt("SendKeyDelay", 1), you may want or need to slow it down just a bit to work flawlessly. Kurt's on the money though for sure with a slight modification.

$LongMsg1 = "whateveryoulittleheartwantstoputhere"
$LongMsg2 = "whateveryoulittleheartwantstoputhere"
$LongMsg3 = "whateveryoulittleheartwantstoputhere"

ClipPut($LongMsg1)  ;; puts $LongMsg1 into clipboard memory like CTRL+C
Sleep(100)
Send("^v")
ClipPut($LongMsg2)
Sleep(100)
Send("^v")
ClipPut($LongMsg3)
Sleep(100)
Send("^v")

;; or you can loop it too

For $i = 1 To 3  ;; loop 3 times
    ClipPut($LongMsg & $i)
    Sleep(100)
    Send("^v")
Next

ClipGet() is used to set a variable like Kurt's $get equal to what's in the clipboard buffer. Hope this helps and good luck!

Edited by ssubirias3

Share this post


Link to post
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
Sign in to follow this  
Followers 0