Copy between a specific text or symbol
Then deletes the text or symbol between what was copied
Option to create a folder & option to save too
Adds one empty line between matches
& option to have no empty lines
However, when you specifically search for metacharacters such as .[{()\^$|?*+, you need to escape them with backslash \, so they can be recognized.
For example, if you need to find ., type \. in the search field.
Example: I specify
( on left side & ) on right side
(some text) than it would delete ( )
& save some text To a file
Created by me
Novidades
Better version
O que ele faz
66 ações-
Choose from Menucopy between what
-
Choose from Menuboth sides of text
-
Ask for InputLook For what on left & right side of text
-
Set VariableBoth sides of text
-
Get File
-
Repeat with Each
-
Get Name
-
Set VariableName
-
Get Text from Input
-
Set VariableGet text
-
Match Text
-
Text
-
Set Name
-
Choose from Menuboth sides of text (save)
-
Ask for InputLook For what on left & right side of text
-
Set VariableBoth sides of text
-
Get File
-
Repeat with Each
-
Get Name
-
Set VariableName
-
Get Text from Input
-
Set VariableGet text
-
Match Text
-
Text
-
Set Name
-
Save File
-
Stop This Shortcut
-
Choose from Menutwo different sides of text
-
Ask for InputLook for what on left side of text
-
Set VariableLeft side of text
-
Ask for InputLook for what on right side of text
-
Set VariableRight side of text
-
Get File
-
Repeat with Each
-
Get Name
-
Set VariableName
-
Get Text from Input
-
Set VariableGet text
-
Match Text
-
Text
-
Set Name
-
Choose from Menutwo different sides of text (save)
-
Ask for InputLook for what on left side of text
-
Set VariableLeft side of text
-
Ask for InputLook for what on right side of text
-
Set VariableRight side of text
-
Get File
-
Repeat with Each
-
Get Name
-
Set VariableName
-
Get Text from Input
-
Set VariableGet text
-
Match Text
-
Text
-
Set Name
-
Save File
-
Stop This Shortcut
-
Choose from Menucreate folder
-
Ask for InputSet folder name to use
-
Set VariableNew folder
-
Create Folder
-
Show Result
-
Stop This Shortcut
-
Create Folder
-
Save File
-
Show Result
Ver como código
Todas as ações deste atalho escritas em Cherri, uma linguagem de programação para o app Atalhos. Ótimo para aprender como ele funciona.
#include 'actions/text'
#define color purple
#define glyph magicWandAlt
menu "copy between what " {
item "both sides of text":
prompt("Look For what on left & right side of text")
@BothSidesOfText
const File = getFileFromFolder(, "")
for _ in File {
getName(@RepeatItem)
@Name
getText(@RepeatItem)
@GetText
containsText(@GetText, "\{@BothSidesOfText}.*\{@BothSidesOfText}")
const Text = "{}"
setName(Text, @Name)
}
item "both sides of text (save)":
prompt("Look For what on left & right side of text")
@BothSidesOfText
const File = getFile("")
for _ in File {
getName(@RepeatItem)
@Name
getText(@RepeatItem)
@GetText
containsText(@GetText, "\{@BothSidesOfText}.*\{@BothSidesOfText}")
const Text = "{}"
setName(Text, @Name)
}
const SavedFile = saveFilePrompt(RepeatResults)
stop()
item "two different sides of text":
prompt("Look for what on left side of text")
@LeftSideOfText
prompt("Look for what on right side of text")
@RightSideOfText
const File1 = getFile("")
for _ in File1 {
getName(@RepeatItem)
@Name
getText(@RepeatItem)
@GetText
containsText(@GetText, "\{@LeftSideOfText}.*\{@RightSideOfText}")
const Text1 = "{}"
setName(Text1, @Name)
}
item "two different sides of text (save)":
prompt("Look for what on left side of text")
@LeftSideOfText
prompt("Look for what on right side of text")
@RightSideOfText
const File1 = getFile("")
for _ in File1 {
getName(@RepeatItem)
@Name
getText(@RepeatItem)
@GetText
containsText(@GetText, "\{@LeftSideOfText}.*\{@RightSideOfText}")
const Text1 = "{}"
setName(Text1, @Name)
}
const SavedFile1 = saveFilePrompt(RepeatResults1)
stop()
item "create folder":
prompt("Set folder name to use")
@NewFolder
createFolder(@NewFolder)
show("New folder is /Shortcuts/{@NewFolder}")
stop()
}
createFolder("copy between what")
saveFile("copy between what", MenuResult, true)
show("In folder /Shortcuts/copy between what")
Avaliações e comentários
Escrever uma avaliaçãoAinda não há avaliações. Seja o primeiro a compartilhar o que você pensa!