Sign in to follow this  
Followers 0
PhoenixXL

ClipBoard Extendor

11 posts in this topic

#1 ·  Posted (edited)

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)

UPDATED:U can copy 10 pieces of text using the hotkey CTRL+SHIFT+(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...... ;)

Script With The Help Of Ini Files.......

#NoTrayIcon
#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=
#AutoIt3Wrapper_Outfile=C:UsersabhishekDesktopClipboard Extender.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Comment=Clipboard Extender
#AutoIt3Wrapper_Res_Description=
#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:      Phoenix XL

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
   $x = ClipGet()
   ClipPut($strings)
   Send('^v')
   ClipPut($x)
   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

With The Help Of Variables.......

#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:      Phoenix XL

Script Function:
Template AutoIt script.

#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here

Global $clipBoard[10]
ToolTip('Clipboard Extender Started' & @CRLF & 'Press CTRL+Shift+E to exit' & @CRLF & 'Enjoy!!..  :)', Default, Default, 'Error', 1, 5)
HotKeySet('^+e', '_exit')
AdlibRegister('_un', 6000)
For $u = 0 To 9
HotKeySet('^+' & $u, '_ClipPut')
HotKeySet('^!' & $u, '_ClipSend')
Next
While 1
Sleep(1000)
WEnd
Func _exit()
Exit
EndFunc   ;==>_exit
Func _ClipSend()
Local $Index = StringRight(@HotKeyPressed, 1), $sData = dataget($Index)
Switch $sData
  Case '0'
   ToolTip('No Data has been' & @CRLF & ' Entered into ' & $Index & ' yet', Default, Default, 'Error', 1, 5)
   AdlibRegister('_un', 4000)
   Return 0
  Case Else
   Local $Board = ClipGet()
   ClipPut($sData)
   Send('^v')
   _RestoreClipBoard($Board)
   Return $sData
EndSwitch
EndFunc   ;==>_ClipSend
Func _ClipPut()
Local $Index = StringRight(@HotKeyPressed, 1)
Local $Board = ClipGet()
Send("^c")
Local $sData = ClipGet()
ConsoleWrite($sData)
If $sData = '' Then Return _RestoreClipBoard($Board)
dataput($sData, $Index)
_RestoreClipBoard($Board)
EndFunc   ;==>_ClipPut
Func dataget($Index)
If $clipBoard[$Index] <> '' Then Return $clipBoard[$Index]
Return 0
EndFunc   ;==>dataget

Func dataput($sData, $Index)
$clipBoard[$Index] = $sData
Return $clipBoard[$Index]
EndFunc   ;==>dataput
Func _RestoreClipBoard($sData)
Return ClipPut($sData)
EndFunc   ;==>_RestoreClipBoard
Func _un()
AdlibUnRegister('_un')
ToolTip('')
EndFunc   ;==>_un
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.

Share this post


Link to post
Share on other sites



Thanks Zedna!!

I got even a more better way ;)


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.

Share this post


Link to post
Share on other sites

Here is the Format listener with less complicacies when compared to a ClipboardViewer

Code:

; 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.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I didn't like to make a new thread , since the topic is the same

good job PhoenixXL , and sorry for interrupting with a question . I'm trying to set a hotkey Ctrl+W+1 , for some reason it doesn't work for me , just when I get to the letter 'W' it calls the function registered with the hotkey , so I'm having troubles with trying to make several hotkeys that differ only in the last digit.

Any help ?

Note : I tried using "^w{NUMPAD 0}" , "^w1" and both didn't work

Edited by aurm

Share this post


Link to post
Share on other sites

Acccording 2 My knowledge

in Hotkeys......

You can set a Number of Shorcut keys (like CTRL ALT SHIFT ) with a AlphaNumeric(A-Z | 0-9) or Symbol(like `)

Note that the AlpaNumeric or Symbols Should Be Single........... (According 2 My Knowlegde)

When You get The AlphaNumbers or Symbols more than 1 then Its called as a HotString (i Guess so.... ;) )

This Link May Help U out.........

Its the Link of HotString UDF :

Thumbs Up If Helped

Regards

Phoenix XL


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.

Share this post


Link to post
Share on other sites

that's interesting , have a look at this thread :

I think it would interest you ;)

Share this post


Link to post
Share on other sites

@Thread_Hijacker - take a look at _IsPressed, I think this will work for you.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Added the Same Script Without The INI files and With The Help of Variables

Check Out The First Post

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.

Share this post


Link to post
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
Sign in to follow this  
Followers 0

  • Similar Content

    • PhoenixXL
      By PhoenixXL
      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