Klexen Posted June 28, 2007 Share Posted June 28, 2007 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 More sharing options...
weasel127 Posted June 28, 2007 Share Posted June 28, 2007 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 More sharing options...
Klexen Posted June 28, 2007 Author Share Posted June 28, 2007 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 More sharing options...
Valuater Posted June 28, 2007 Share Posted June 28, 2007 maybe... $delay = Opt("SendKeyDelay", 40) ;40 milliseconds ; your code or function Opt("SendKeyDelay", $delay) ; re-sets the delay 8) Link to comment Share on other sites More sharing options...
Klexen Posted June 28, 2007 Author Share Posted June 28, 2007 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 More sharing options...
Jettison Posted June 28, 2007 Share Posted June 28, 2007 Send KeysUse {+} instead...or you could use the option to send those keys raw, so you can send anything. [font="Impact"]Cats rule, humans drool.[/font] Link to comment Share on other sites More sharing options...
Klexen Posted June 28, 2007 Author Share Posted June 28, 2007 (edited) Send KeysUse {+} 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...CODEhttps://dellctrx.dell.com/Citrix/MetaFrame/site/launch.ica?NFuse_Application=Citrix.MPS.App.DellCitrix.IDD+5&NFuse_AppFriendlyNameURLENcoded=IDD+5 Edited June 28, 2007 by Klexen Link to comment Share on other sites More sharing options...
herewasplato Posted June 28, 2007 Share Posted June 28, 2007 How do I do that? Send the keys raw..Take a look in the help file under Send. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Jettison Posted June 28, 2007 Share Posted June 28, 2007 flag one: Send("+-!", 1) [font="Impact"]Cats rule, humans drool.[/font] Link to comment Share on other sites More sharing options...
Klexen Posted June 28, 2007 Author Share Posted June 28, 2007 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 More sharing options...
Jettison Posted June 28, 2007 Share Posted June 28, 2007 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 More sharing options...
Klexen Posted June 28, 2007 Author Share Posted June 28, 2007 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now