Jump to content

ClipBoard Extendor


PhoenixXL
 Share

Recommended Posts

Hey!! Every1

I have made a script which can help u copying/pasting texts easily.............

U can copy 10 pieces of text using the hotkey CTRL+(0,1,2,3,4,5,6,7,8,9) ,paste using CTRL+ALT+(0,1,2,3,4,5,6,7,8,9)

Thanks for any possible improvement.......

Hope that my script helps u out...... ;)

#NoTrayIcon
#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=C:UsersabhishekDesktopPresentationABhishekSCriptsdevilish.ico
#AutoIt3Wrapper_Outfile=C:UsersabhishekDesktopClipboard Extender.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Comment=Clipboard Extender
#AutoIt3Wrapper_Res_Description=Extends The Efficiency of Copying and Pasting
#AutoIt3Wrapper_Res_Fileversion=1.1.0.0
#AutoIt3Wrapper_Res_Language=1033
#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator
#AutoIt3Wrapper_Run_Tidy=y
#Obfuscator_Parameters=/striponly
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs ----------------------------------------------------------------------------

AutoIt Version: 3.3.6.1
Author:      Abhishek

Script Function:
Template AutoIt script.

#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
OnAutoItExitRegister('Delete')
Global $done[10]
ToolTip('Clipboard Extender Started' & @CRLF & 'Press CTRL+E to exit' & @CRLF & 'Enjoy!!..  :)', Default, Default, 'Error', 1, 5)

HotKeySet('^e', '_exit')
AdlibRegister('_un', 6000)

$hWnd = 'Abhishek.ini'
$Section = 'Abhishek'
If FileExists($hWnd) Then FileDelete($hWnd)

For $u = 0 To 9
 HotKeySet('^' & $u, '_clipput')
 HotKeySet('^!' & $u, '_clipget')
Next

While 1
 Sleep(1000)
WEnd

Func _exit()
 Exit
EndFunc   ;==>_exit

Func _clipget()
 Local $x = StringRight(@HotKeyPressed, 1), $strings = dataget($x)
 Switch $strings
   Case '?'
    Switch $done[$x]
     Case 1
      ToolTip('An Error Occured', Default, Default, 'Error', 1, 5)
      AdlibRegister('_un', 4000)
      Return 0
     Case 0
      ToolTip('No Data has been' & @CRLF & ' Entered into ' & $x & ' yet', Default, Default, 'Error', 1, 5)
      AdlibRegister('_un', 4000)
      Return 0
    EndSwitch
   Case Else
    Send($strings, 1)
    Return $strings
  EndSwitch
EndFunc   ;==>_clipget

Func _clipput()
 Local $strings = StringRight(@HotKeyPressed, 1)
 Local $clip = ClipGet()
 Send("^c")
 Local $copied = ClipGet()
 If $copied = '' Then Return 0
 dataput($copied, $strings)
 ClipPut($clip)
 $done[$strings] = True
EndFunc   ;==>_clipput

Func dataget($CmdLine)
 Return IniRead($hWnd, $Section, $CmdLine, '?')
EndFunc   ;==>dataget

Func _un()
 AdlibUnRegister('_un')
 ToolTip('')
EndFunc   ;==>_un

Func dataput($lwm, $key)
 Return IniWrite($hWnd, $Section, $key, $lwm)
EndFunc   ;==>dataput

Func Delete()
 FileDelete($hWnd)
EndFunc   ;==>Delete
Edited by PhoenixXL

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.

Link to comment
Share on other sites

  • 2 weeks later...

Hey I just made a more Better Way for ClipBoard Monitoring

I havent added the save and send Functions

Its very Easy Ahead to Modify

#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.6.1
Author:      Zedna
Modified:      Phoenix XL
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
#include <GUIConstants.au3>
#include <WindowsConstants.au3>
Global $origHWND,$lastCopied='',$WM_CLIPUPDATE=0x031D,$DefMsG='__•¯¯'
$gui = GUICreate("Clip Hook",400,400,-1,-1,BitOR($WS_CAPTION,$WS_SYSMENU))
Global $label=GUICtrlCreateLabel('Clipboard Contains',30,30,340,30)
Global $label1=GUICtrlCreateEdit('Clipboard Contains',30,80,340,210)
; remember last clip viewer in queue and set our GUI as first in queue
$origHWND = DLLCall("user32.dll","int","AddClipboardFormatListener","hwnd",$gui)
$origHWND = $origHWND[0]
GUIRegisterMsg($WM_CLIPUPDATE,"OnClipBoardChange")
WinSetOnTop($gui,'',1)
GUISetState()
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
Exit
Func OnClipBoardChange($hWnd, $Msg, $wParam, $lParam)
    ; do what you need when clipboard changes
    _write(ClipGet())
EndFunc
Func _write($data)
If $data<>$lastCopied Then
  $lastCopied=$data
  Return GUICtrlSetData($label1,$data)
Else
  Return $DefMsG
EndIf
EndFunc

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.

Link to comment
Share on other sites

  • 4 weeks later...

Well I got more Views In the General Help n Support Forum.................(though created by mistake) ;)

ll not modify this Topic Anymore.........

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.

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

×
×
  • Create New...