It is currently March 28th, 2024, 9:39 pm

Text Input with !SetClip

Get help with creating, editing & fixing problems with skins
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Text Input with !SetClip

Post by Mor3bane »

Hello there.

I am wondering if it is possible for a set string to be copied to the clipboard, but for the following paste to be actually 2 strings separated by the TAB keyboard stroke.

So, copy the !SetClip and when the paste is made (outside or Rainmeter) the TAB splits the string into one then the next field.

Sort of an autofill, if you will.

Is it possible with just RM script, or would a .lua script come into the picture?

Thanks. :Whistle
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Text Input with !SetClip

Post by balala »

Mor3bane wrote: May 22nd, 2020, 7:46 am So, copy the !SetClip and when the paste is made (outside or Rainmeter) the TAB splits the string into one then the next field.
Something like this: [!SetClip "#Mystring#[\x09]#Mystring#"]. Note the [\x09] character variable between the two #MyString# variables, which is the character for TAB.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Text Input with !SetClip

Post by Mor3bane »

balala wrote: May 22nd, 2020, 8:09 am Something like this: [!SetClip "#Mystring#[\x09]#Mystring#"]. Note the [\x09] character variable between the two #MyString# variables, which is the character for TAB.
Well, that did not work.

Just put a space between the strings and the second field remained empty.

The syntax I used was identical to that of your example. The copied string just showed up on the same line.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Text Input with !SetClip

Post by balala »

Mor3bane wrote: May 24th, 2020, 6:27 am Well, that did not work.
Please post the whole code of the skin, or at least the code of the meter or measure where the !SetCilp bang is used.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Text Input with !SetClip

Post by Mor3bane »

Ok this bit would be the part i am trying to use the TAB code for - with the TAB code at this point.

Code: Select all

[Button1]
Meter=Image
SolidColor=180,180,180,255
X=228
Y=134
W=36
H=35
Antialias=1
LeftMouseUpAction=[!SetClip "#a-password#[\x09]#b-password#"][!Update]
DynamicVariables=1
Hidden=0
Group=buttons
I am getting the strings from a mouse click then entering them into the field with ctrl-v.

I cannot right-click in the field - it is not possible with the application at hand.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Text Input with !SetClip

Post by balala »

Mor3bane wrote: May 24th, 2020, 6:27 am Just put a space between the strings and the second field remained empty.
I'm extremely surprised, because applying the meter you last posted, for me the values of the variables are copied to clipboard correctly, so when I paste it for instance into a spreadsheet the two values are pasted into two different, adiacent cells.
Just additionally note that there is no need to update the skin through a !Update bang when you're copying something to clipboard.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Text Input with !SetClip

Post by Mor3bane »

balala wrote: May 25th, 2020, 11:36 am I'm extremely surprised, because applying the meter you last posted, for me the values of the variables are copied to clipboard correctly, so when I paste it for instance into a spreadsheet the two values are pasted into two different, adiacent cells.
Just additionally note that there is no need to update the skin through a !Update bang when you're copying something to clipboard.
Well that may be true, for cells on the same line, however these are separate boxes which I can navigate by getting between them with the TAB key.

I was surprised as well to be honest though. However, that particular code simply creates the "5 spaces" a Tab would do as if on a text document rather than a spreadsheet.

I do not know where that code came from, but would there happen to be another similar option that perhaps uses a different code, just to try it?
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Text Input with !SetClip

Post by balala »

Mor3bane wrote: May 25th, 2020, 8:07 pm I do not know where that code came from, but would there happen to be another similar option that perhaps uses a different code, just to try it?
From my mind. I don't know what else could you use, maybe someone else will have a better idea.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Text Input with !SetClip

Post by Mor3bane »

balala wrote: May 25th, 2020, 9:07 pm From my mind. I don't know what else could you use, maybe someone else will have a better idea.
Thanks though.
Appreciate your effort on my behalf.
Cheers.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Text Input with !SetClip

Post by Mor3bane »

Well, i looked things up and tried these as well with similar or no effect:

[x11] Vertical Tab
[x10] Line feed (had to try it...)
Last edited by Mor3bane on May 25th, 2020, 10:58 pm, edited 2 times in total.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.