This is a nice library, may I suggest expanding it to support copied files from explorer like regular text? That is, being able to write or append copied files.good idea, will make this You can probably use the gdip library as a prerequisite for your functions and call those directly, unless you use other gdi+ functions that are not covered.i actually use Gdip_Startup & Shutdown only as functions and few others directly through DllCall, so don't think ppl really needs whole library for this OldClipboard.Paste("PlainText")you mean paste some text without changing the original clipboard? Good idea, i'll make it wc can be accessible from any function as well you can then use static function as well as instance define WinClipboard instance as super-global var WinClipboard.SetText("hello").Paste()good example of functional programming would be, but you'll not be able determine then if SetText() was successful or not.ītw, to shorten the code, you can do the following: If any func will be added, you will know about this at startup from ahk, if anything will be changed, i'll write about this in change log. For example, PUM has far more functions than WinClip, and only few of them are similar. Because someone may not need all the bunch in one place. Can you consider doing something similar please?i think it is best for you to spend 10 mins and compile all the functions you need together as you did. I moved these to Deo_foos.ahk - but if I were to update it would be there again. Since I am now using PUM and WinClipBoard in a single project - this cause duplicate functions. Thank you for interest to this proj, guys Unless I am missing something (open for suggestions)Ĥ) Not a recommendation, but I love it that it does not trigger OnClipBoardChange! WinClipboard.SetText(oldClipboard.iGetPlainText()) Should both work (second version does not work)Ĭurrently pasting plaintext saved internal buffer seems to be done via Can you consider doing something similar please?Ģ) I am not an OOP expert - but I would expect that WinClipboard_foos.ahk and PUM_foos.ahk share: Improved Copy/Paste methods so they work more reliable/faster nowįunctiona added to WinClipboard_foos.ahk: WinClipboard.Paste( plainText = "" ) method now can be called with parameter to paste raw text without changing actual clipboard data (iPaste does not support this) Methods added ( check documentation for info ): zip also offer some easy tutorial surveyĪdded following methods to retrieve or set RTF format:Īll functions used by WinClip moved to another class, so you don't need to care about any similar you may have in your script (you must inlcude WinClipAPI.ahk first though ) Prefect for clipboards managers kind.ĬlipSize := wc.iSnap() copies clip data into inner buffer for later usingīytesRestored := wc.iRestore() restores data back to clipboardsĪll this described better in documentation Or you can just keep any number of different clipboards. It allows you to manipulate with in-memory copy of clipboard without changing the main one. !!! Make attention, that data from clipboardall, and WinClip.Snap() is not compatibleĪnother part of the WinClip class is the all the same function with "i" prefix which work with instantiated copy of WinClip class. Set or append text without changing whole clipboard into plain text: SendMessage,% STM_SETIMAGE := 0x0172,% IMAGE_BITMAP := 0,% hBitmap, ahk_id %PicHwnd% Gui, Add, Picture,% "hwndPicHwnd +" SS_BITMAP := 0圎 = "`n" nFmt " : " params.name " : " params.size " : " params.GetCapacity( "buffer " ) the "buffer" is an object member containing actual format data format_number : format_name : data_size : data_size again Here is what it can do above basic stuff: Well, if you don't need anything besides that, it's best to keep up with standard clipboard. Here is a small example of how to use it in the similar way you do with common ahk's "clipboardall" and "clipboard":īytesRestored := WinClip.Restore( clipData ) You can use Markdown2HTML.ahk from fincs' GenDocs v3 viewtopic.php?p=555703#p555703 script to transform Markdown text to html format + WinClip.SetHTML(html) to be able to paste it directly in say your Office documents or an rich text email. Easy way to get picture from clipboard and use it on your needs Possibility to get/change text on clipboard without touching other formats Big number of functions to get different types of data from clipboard Ready-to-use methods to keep and maintain any number of clipboards at once Change clipboard directly or operate on in-memory copy of it Include WinClipAPI.ahk before WinClip.ahk! WinClip is a clipboard manipulation class which allow you to do a bit more than the common ahk clipboard can
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |