Hello, i need analyse clipboard for get strings and replace to variables ex:
clipboard: "Whats your name"
take 3 variables
variable1 = "whats"
variable2 = "your"
variable3 = "name"
I Know a code from autohotkey:
clipboard:= "Whats your name"
StringSplit , arr , Clipboard , %a_space%
msgbox %arr3%
this code works but in plataform pulover's macro creator not works
obs: sorry my english, i am Brazilian
Função Strslipt
Moderator: Pulover
Re: Função Strslipt
Não se deve usar sinal de porcentagem em variáveis dentro de expressões.
You should not enclose variables in percent signs inside expressions.
You should not enclose variables in percent signs inside expressions.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Re: Função Strslipt
give me example please
Re: Função Strslipt
You've got a few things wrong:
1. You are setting clipboard to an invalid string, you should enclose it in quotes.
2. The parameters for the function are wrong. First comes the input, then the delimiter (which I believe you want A_Space, instead of A_Tab).
3. I can see that arr is your output so it should be in the Output Variable field.
4. StrSplit creates an Object Array which cannot be accessed as %arr1% (you can use StringSplit command if that's what you want) so in this case you can use % before the MsgBox parameter to make it an expression and use [] to read the content of the array.
Check the code below. Btw, you could have checked the example in the help file/website for arrays.
1. You are setting clipboard to an invalid string, you should enclose it in quotes.
2. The parameters for the function are wrong. First comes the input, then the delimiter (which I believe you want A_Space, instead of A_Tab).
3. I can see that arr is your output so it should be in the Output Variable field.
4. StrSplit creates an Object Array which cannot be accessed as %arr1% (you can use StringSplit command if that's what you want) so in this case you can use % before the MsgBox parameter to make it an expression and use [] to read the content of the array.
Check the code below. Btw, you could have checked the example in the help file/website for arrays.
Code: Select all
[PMC Globals]|None||
[PMC Code v5.4.0]|F5||1|Window,2,Fast,0,1,InputThenPlay,-1,-1,1|1|Macro1
Context=None|
Groups=Start:1
1|[Assign Variable]|clipboard := "what's your name"|1|0|Variable|Expression||||1|
2|[Pause]||1|300|Sleep|||||2|
3|StrSplit|arr := clipboard, a_space|1|0|Function|||||3|
4|[MsgBox]|% arr[1]|1|0|MsgBox|0||||4|
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)