Jump to content

Sending text over a remote session


Recommended Posts

We use this program at work which allows us to Dell Connect to customers computer. Well this program does not allow copy and paste between customers screen and tech screen. Such as RDP does.

The code I wrote below does not quite work right because of the lag between connection. So when I paste the text from my screen to customers with the code below, the text is broken. In order for this to work right I need to be able to put in a delay between characters sent to customers screen. Something like 40ms per character. If you understand what I'm trying to do can you please help me out with this?

Thanks in advance!

;----Paste to Customer Screen-----
Func SuperPaste()
Opt("WinTitleMatchMode", 1) 
$SendPaste = InputBox("Paste to Customer screen","Please enter the text you wish you send to the customers screen.")
    WinActivate("Client Screen")
    Send($SendPaste)
EndFunc
Link to comment
Share on other sites

You can use the option SendKeyDelay to add a delay to the Send, like this:

Opt("SendKeyDelay","40")

;----Paste to Customer Screen-----
Func SuperPaste()
Opt("WinTitleMatchMode", 1)
$SendPaste = InputBox("Paste to Customer screen","Please enter the text you wish you send to the customers screen.")
    WinActivate("Client Screen")
    Send($SendPaste)
EndFunc
Link to comment
Share on other sites

You can use the option SendKeyDelay to add a delay to the Send, like this:

Opt("SendKeyDelay","40")

;----Paste to Customer Screen-----
Func SuperPaste()
Opt("WinTitleMatchMode", 1)
$SendPaste = InputBox("Paste to Customer screen","Please enter the text you wish you send to the customers screen.")
    WinActivate("Client Screen")
    Send($SendPaste)
EndFunc
Looks like this should work good. Should I put the Opt("SendKeyDelay","40") inside the function? I don't want it to send keys with that delay with any of the other functions in the program...
Link to comment
Share on other sites

maybe...

$delay = Opt("SendKeyDelay", 40)          ;40 milliseconds

; your code or function

Opt("SendKeyDelay", $delay)               ; re-sets the delay

8)

For some reason that doesn't work. There is no delay. Also special characters won't send. Such as +. What can I do about that?
Link to comment
Share on other sites

Send Keys

Use {+} instead...or you could use the option to send those keys raw, so you can send anything.

How do I do that? Send the keys raw..

the reason I can't just do a {+} is because I want to be able to send URLs like this one...

CODE
https://dellctrx.dell.com/Citrix/MetaFrame/site/launch.ica?NFuse_Application=Citrix.MPS.App.DellCitrix.IDD+5&NFuse_AppFriendlyNameURLENcoded=IDD+5
Edited by Klexen
Link to comment
Share on other sites

Awesome got that going. The only thing wrong is this makes all my sends used in other functions have the same delay. For some reason it won't just delay in this specific function.

;----Paste to Customer Screen-----
Func SuperPaste()
$Delay = 50
$Delay1 = Opt("SendKeyDelay", $Delay)  
Opt("SendKeyDelay", 50) 
Opt("WinTitleMatchMode", 1) 
$SendPaste = InputBox("Paste to Customer screen","Please enter the text you wish you send to the customers screen.")
    WinActivate("Client Screen")
    WinWaitActive("Client Screen")
    Send($SendPaste,1)
EndFunc
Link to comment
Share on other sites

Ok, then do something like this:

Func SuperPaste()
$Delay = 50
$Delay1 = Opt("SendKeyDelay", $Delay) 
Opt("SendKeyDelay", 50)
Opt("WinTitleMatchMode", 1)
$SendPaste = InputBox("Paste to Customer screen","Please enter the text you wish you send to the customers screen.")
    WinActivate("Client Screen")
    WinWaitActive("Client Screen")
    Send($SendPaste,1)
Opt("SendKeyDelay", 0)
EndFunc
[font="Impact"]Cats rule, humans drool.[/font]
Link to comment
Share on other sites

Ok, then do something like this:

Func SuperPaste()
$Delay = 50
$Delay1 = Opt("SendKeyDelay", $Delay) 
Opt("SendKeyDelay", 50)
Opt("WinTitleMatchMode", 1)
$SendPaste = InputBox("Paste to Customer screen","Please enter the text you wish you send to the customers screen.")
    WinActivate("Client Screen")
    WinWaitActive("Client Screen")
    Send($SendPaste,1)
Opt("SendKeyDelay", 0)
EndFunc

Perfect, thanks!

I just did like this..

Func SuperPaste()
Opt("SendKeyDelay", 45) 
Opt("WinTitleMatchMode", 1)
$SendPaste = InputBox("Paste to Customer screen","Please enter the text you wish you send to the customers screen.")
    WinActivate("Client Screen")
    WinWaitActive("Client Screen")
    Send($SendPaste,1)
Opt("SendKeyDelay", 5)
EndFunc
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...