Author |
Topic |
|
3di
Germany
26 Posts |
Posted - 02/12/2016 : 04:56:21
|
Hi,
it would be very usefull for my everyday work to be able to do a Copy-Paste progress like this Example:
I would like to copy a Number like this 0123 4567 8910 ABCD
and get this in to the clippboard 012345678910ABCD or this 0123_4567_8910_ABCD
So in this case it should remove the space between the Blocks or change it to "_".
In my opinion it should look a little like this, but i have no idea how i will set this to work
local myClip = acSendKeys("^c") StringReplace, myClip, %A_SPACE%,, All acSetClipboardText(myClip)
Have you guys any suggestion how this could be done?
Thanks in Advance and
Best regard
|
Edited by - 3di on 02/12/2016 05:13:39 |
|
Rob
USA
2615 Posts |
Posted - 02/12/2016 : 15:56:36
|
This works for me:
acSendKeys("^c") acDelay(50) local clip = acGetClipboardText() clip = clip:gsub(" ", "_") acSetClipboardText(clip)
Or more condensed:
acSendKeys("^c") acDelay(50) acSetClipboardText(acGetClipboardText():gsub(" ", "_")) |
|
|
3di
Germany
26 Posts |
Posted - 02/13/2016 : 07:00:00
|
Hi,
i tried, and it works like a charm for me. Thanks a lot :-), I appreciate your work here!
Is there a list showing all the possible orders (like gsub, gIsIconic and so on) Are those orders api stuff or vb/c+ or something.
You might see my very little uncertainty about coding stuff :-).
Best regards |
|
|
Rob
USA
2615 Posts |
Posted - 02/13/2016 : 09:30:48
|
Other than S+ specific actions and variables, usually beginning with "sp" or "ac", the scripting engine is just plain Lua script.
So for example, you could Google search "lua string replace" and find examples of how to do what you need. |
|
|
|
Topic |
|
|
|