Script with Clipboard

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
kurkan
Posts: 1
Joined: 21 May 2018, 15:33

Script with Clipboard

21 May 2018, 15:44

Hi i'm new to AHK, been watching some tutorials to get a hang of things.

My misson is to create a script that will copy a certain text and use it.

For example this is what i want my script to paste,
--
Port: <From Clipboard>
Switch: <From Clipboard>
--

The text of the clipboard could be like, "Gh0/12.as300.svl1.com"

So i want my script to do the following, by pressning <Key> it would copy "Gh0/12.as300.svl1.com" and use it to print,

Port: Gh0/12
Switch: as300.svl1
---

Is this possible within AHK?

I'll be using this within a program were the Clipboardtext always will be fixed at the same position.

Hope someone understand me haha
AHKStudent
Posts: 1472
Joined: 05 May 2018, 12:23

Re: Script with Clipboard

21 May 2018, 16:09

yeah, its easy with ahk, however you wrote

The text of the clipboard could be like, "Gh0/12.as300.svl1.com"

This makes a big difference because if other text will be a different format it might not work, but if there is a pattern for example the first 5 char or a specific separator that is used all the time etc then sure, its a few lines of code

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, Google [Bot], Joey5, mikeyww, RandomBoy, wpulford and 376 guests