Hands-on with Microsoft Windows 11’s ChatGPT-based advanced Copy-Paste feature

Hands-on with Microsoft Windows 11’s ChatGPT-based superior Copy-Paste function.

Hands-on with Windows 11's ChatGPT-based Copy-Paste feature

Microsoft’s EnergyToys not too long ago obtained its most vital AI updates on Microsoft Windows 11 (and Microsoft Windows 10). Microsoft Windows customers already love EnergyToys for its assortment of useful utilities, and the latest updates provides an “Advanced Paste” software to the checklist, making issues even higher.

Advanced Paste is an AI-powered software that may convert the code snippet copied from the clipboard into your most popular programming language. For instance, if in case you have a code snippet in C++ that you simply wish to convert into Python, Advanced Paste can try this for you.

Microsoft Windows Latest was on the Build 2024 developer convention, the place we observed how Microsoft shortly transformed XML into JSON using EnergyToys. The firm additionally revealed that using the more superior model of the function, it’s attainable to transform any well-liked programming language to your most popular language, however there’s a catch.

EnergyToys’ AI-powered copy-and-paste wants your OpenAI API key to operate.

adding openai api key in powertoys advanced paste

To use the function, you’ll must open EnergyToys > Advanced Paste, activate the function, after which manually toggle the Paste with AI choice.

This will open a latest dialog with fast directions on the place to seek out the OpenAI API key for ChatGPT. After creating an account on OpenAI, you may enter the API key and save the adjustments.

Trying the Paste with AI function in EnergyToys

After including the OpenAI key, you may attempt the AI-powered function in Microsoft Windows 11 by copying a code snippet and urgent the Microsoft Windows key + Shift + V shortcut.

ai can make mistakes warning in powertoys advanced paste toolai can make mistakes warning in powertoys advanced paste tool
EnergyToys Advanced Copy and Paste | Image Courtesy: Microsoft WindowsLatest.com

As proven within the above screenshot, this keyboard shortcut launches a preview pop-up with three default choices: Paste as plain textual content (Ctrl+1), Paste as markdown (Ctrl+2), and Paste as JSON (Ctrl+3).

It can even allow you to view the clipboard historical past, which is way more superior than Microsoft Windows’ built-in clipboard historical past.

To convert the code after copying, you may sort the “paste as (x language)” command within the magic search bar. This will use OpenAI’s ChatGPT-4o to transform the code. For instance, you may sort “paste as Python” to transform the copied C++ code into Python.

converting c++ code to python in powertoys advanced pasteconverting c++ code to python in powertoys advanced paste

As proven within the above screenshot, EnergyToys can even produce a preview window the place you may overview the code.

Microsoft Windows Latest examined the function with a number of languages, and ChatGPT integration labored with out hiccups.

Paste as Python using PowerToys in Windows 11Paste as Python using PowerToys in Windows 11
Paste as Python using superior paste in Microsoft Windows 11 | Image Courtesy: Microsoft WindowsLatest.com

We additionally used EnergyToys Advanced Paste to transform a easy 79-line recreation code written in Go programming into Python, and it produced correct outcomes.

If you don’t just like the generated output, you may all the time click on the refresh button to regenerate it. When glad with the code preview, click on the Paste button to insert the formatted code into the IDE window.

You can nonetheless format the code into markdown or JSON in the event you don’t have an API key. Microsoft could convey help for different methods to transform copied content material into your most popular programming languages.

This latest paste function in EnergyToys can be useful for builders who incessantly paste and convert code whereas working. However, ChatGPT isn’t all the time correct with code snippets, so that you’ll nonetheless must double-check the AI-generated code for errors.

Also, Microsoft clarified that the Advanced Paste function isn’t imagined to do the programming for you.

If you don’t see the function, you may manually improve to EnergyToys model 0.81 from GitHub.


Check out more article on Microsoft Windows 11 , Microsoft Windows 10