JayHawkfl Posted April 14, 2014 Posted April 14, 2014 (edited) I wrote a program to automate the tickets at the office. My problem is, I'm using ClipPut to make the process faster, and 1 in every 10 to 15 lines it pastes I just get a letter "v" or, I get what ever is in the users clipboard at that moment. The reason that is such a large issue is sometimes the program could need to put out 30 lines of text, and if the program throws bad text the user will have to 1 notice and 2 go reenter their parameters. I'll list my attempts in the code box. Func SendFast($ClipVar) $UserClipBoard = ClipGet() ClipPut($ClipVar) Send("{CTRLDOWN}") Send("v") Send("{CTRLUP}") Send("{ENTER}") ClipPut($UserClipBoard) EndFunc Func SendFast($ClipVar) $UserClipBoard = ClipGet() ClipPut($ClipVar) Send("{CTRLDOWN}v") Send("{CTRLUP}") Send("{ENTER}") ClipPut($UserClipBoard) EndFunc Func SendFast($ClipVar) $UserClipBoard = ClipGet() ClipPut($ClipVar) Send("^v") Send("{ENTER}") ClipPut($UserClipBoard) EndFunc Is there a more reliable way to send the paste command? Edited April 14, 2014 by JayHawkfl Thanks for your time
FireFox Posted April 14, 2014 Posted April 14, 2014 Is there a more reliable way to send the paste command? ControlSetText.
JayHawkfl Posted April 14, 2014 Author Posted April 14, 2014 I've been running hardware calls all day. I'll try this the next time I get a minute. Thank you for the quick responce Thanks for your time
BigDod Posted April 14, 2014 Posted April 14, 2014 Try sending shift + insert Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
FireFox Posted April 14, 2014 Posted April 14, 2014 Try sending shift + insert Hotkey is a hotkey, that won't change anything.
JohnOne Posted April 14, 2014 Posted April 14, 2014 Func SendFast($ClipVar) $iSleep = 10 $UserClipBoard = ClipGet() Do ClipPut($ClipVar) Until ClipGet() = $ClipVar Send("^v") Sleep($iSleep) Send("{ENTER}") Do ClipPut($UserClipBoard) Until ClipGet() = $UserClipBoard EndFunc ;==>SendFast AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
nitekram Posted April 14, 2014 Posted April 14, 2014 Func SendFast($ClipVar) $iSleep = 10 $UserClipBoard = ClipGet() Do ClipPut($ClipVar) Until ClipGet() = $ClipVar Send("^v") Sleep($iSleep) Send("{ENTER}") Do ClipPut($UserClipBoard) Until ClipGet() = $UserClipBoard EndFunc ;==>SendFast I am not sure I understand this, but it has been a long day. Are you just grabbing the clipboard to begin with, and then putting the clipped data back into the clipboard? 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
JohnOne Posted April 14, 2014 Posted April 14, 2014 (edited) Yes, but I have know ClipPut to fail which is why it's in a loop. Of course it only works with text, but that's the way the OP had it. Edited April 14, 2014 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
nitekram Posted April 14, 2014 Posted April 14, 2014 Thanks, I have seen it fail in my scripts, so I just reran the hotkey, I will now add this bit to my code, so it will not fail next time - we hope. 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
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