sb1920alk Posted February 5, 2013 Posted February 5, 2013 I'm trying to make a hotkey (Ctrl-Shift-v) to type the contents of the clipboard for use in situations where a traditional "paste" doesn't work for whatever reason. The problem I'm having is that the script seems to break my regular shift and ctrl keys, as if they're stuck down. I have to exit the script and press and release the "stuck" keys to fix it. Any ideas? Here is the script: ;Set Hotkey of Ctrl-Shift-V to type clipboard text. ;Useful for situations that don't permit traditional pasting #include <Clipboard.au3> HotKeySet("+^v", "TypeClipText") HotKeySet("{ESC}", "Terminate") While 1 Sleep(100) WEnd Func TypeClipText() $Text = ClipGet ( ) Send($Text,1) EndFunc Func Terminate() Exit 0 EndFunc ;==>Terminate
PhoenixXL Posted February 5, 2013 Posted February 5, 2013 This is a possible workaround#include <WinapiEx.au3> #include <Misc.au3> Global $iReset = 1 HotKeySet("+^v", "TypeClipText") HotKeySet("{ESC}", "Terminate") While 1 Sleep(100) WEnd Func TypeClipText( ) $Text = ClipGet() Send($Text, 1) If Not $iReset Then Return Local $string If _IsPressed( '11' ) Then $string = '{CTRLUP}' If _IsPressed( '10' ) Then $string &= '{SHIFTUP}' If _IsPressed( '12' ) Then $string &= '{ALTUP}' Send( $string ) EndFunc ;==>TypeClipText Func Terminate() Exit 0 EndFunc ;==>Terminate Thumbs up if it helped My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.
sb1920alk Posted March 26, 2013 Author Posted March 26, 2013 Sorry, I'm having the same issue with that change.
PhoenixXL Posted March 27, 2013 Posted March 27, 2013 From the WIki;Set Hotkey of Ctrl-Shift-V to type clipboard text. ;Useful for situations that don't permit traditional pasting #include <Clipboard.au3> HotKeySet("+^v", "TypeClipText") HotKeySet("{ESC}", "Terminate") While 1 Sleep(100) WEnd Func TypeClipText() $Text = ClipGet() ControlSend("", "", "", $Text, 0) EndFunc ;==>TypeClipText Func Terminate() Exit 0 EndFunc ;==>TerminateDoes this help ? My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.
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