Page 1 of 1

Partially paste

Posted: Mar 4th, ’23, 15:32
by ThiasEsseboom
Hey all :-)

I'm trying to find out if it is possible to partially past something from the clipboard, or to partially use a text input.

For some context, for reservations we send out a link for customers to verify their details, but for the back office of this, we use a different link.

So customer will get this link:

And we use:

I would like to make it (if possible) so, that our CS team can just copy the link we sent out, and use a Fastkey to open the BO link.

So something like this:

Code: Select all

Get last 36 characters of %INPUT_Link%
Run, https://bo.etc/36characters?=view
Would this at all be possible, and if so, could someone help me on the way to creating this?

Re: Partially paste

Posted: Mar 4th, ’23, 17:09
by ThiasEsseboom
I've been trying this now

Code: Select all

Gui, New
Gui, Add, Text,, Paste URL
Gui, Add, Edit, vUrl
Gui, Add, Button, Default, OK
Gui, Show

Gui, Submit
Gui, Destroy
NewStr := SubStr(%Url%, -36)
But now I don't get the time to input anything into the URL box, it closes instantly and just runs the website without the %NewStr%

Any ideas?

Re: Partially paste

Posted: Mar 4th, ’23, 17:23
by ThiasEsseboom
Sooo some redditing later, and I've created this :-) Which works perfectly!

Code: Select all

    txt := Clipboard
    txt := SubStr(txt, -36)
	Clipboard := txt


Re: Partially paste

Posted: Mar 4th, ’23, 22:06
by Marko
You could also make shortcut which copies to clipboard and then opens the link, all in one step.
Set the shortcut in FastKeys, Type: Command

Code: Select all

Send, ^c
Sleep, 100
txt := SubStr(Clipboard, -36)

Re: Partially paste

Posted: Mar 5th, ’23, 07:39
by ThiasEsseboom
Awesome :D Thank you