ShareShortcuts
Fork “Replace Text”

Har du bygget noget nyt oven på denne genvej? Del den som en fork: den bliver din egen genvej, som du styrer, og begge sider linker til hinanden, så hunter9888x får kredit.

  1. 1Hent genvejen og ret den i Genveje-appen. Giv den sit eget navn.
  2. 2Del den fra Genveje-appen og kopiér iCloud-linket.
  3. 3Kom tilbage hertil, indsæt linket og beskriv, hvad der er anderledes, fx “Tilføjet et trin, der bruger Apple Intelligence til at gøre teksten mere personlig.”
Downloads
63K
Gemt
2
Handlinger
262
Kategori
Værktøjer
Version
1.6
Sprog
EN

Replace text in

File name file extension inside file

Replace between text

Save to folder /Shortcuts/Replace Text

Save to specific folder

Create folder

Created by me

Nyheder

Version 1.6

Some Info changes

Versionshistorik
1.6 19. jan. 2020

Some Info changes

1.5 10. jan. 2020

Replace between what

1.4 21. dec. 2019

Added save too options

1.3 20. dec. 2019

Add inside file & code rewrite

1.2 20. dec. 2019

Fixed replace text

1.1 15. dec. 2019

Shows where it saves

1.0 15. dec. 2019

First release

Hvad den gør

262 handlinger
  1. Choose from Menu
    Replace text
  2. Choose from Menu
    in file name
  3. Ask for Input
    Replace what text in file
  4. Set Variable
    Replace text
  5. Ask for Input
    Add what text in file
  6. Set Variable
    Add text
  7. Get File
  8. Repeat with Each
  9. Set Variable
    File
  10. Get Text from Input
  11. Set Variable
    Get text
  12. Get Name
  13. Set Variable
    Name
  14. Get Details of Files
  15. Set Variable
    Extension
  16. If
  17. Replace Text
  18. Text
  19. Set Name
  20. Choose from Menu
    in file extension
  21. Ask for Input
    Replace what text in file
  22. Set Variable
    Replace text
  23. Ask for Input
    Add what text in file
  24. Set Variable
    Add text
  25. Get File
  26. Repeat with Each
  27. Set Variable
    File
  28. Get Text from Input
  29. Set Variable
    Get text
  30. Get Name
  31. Set Variable
    Name
  32. Get Details of Files
  33. Set Variable
    Extension
  34. If
  35. Replace Text
  36. Text
  37. Set Name
  38. Choose from Menu
    inside file
  39. Ask for Input
    Replace what text in file
  40. Set Variable
    Replace text
  41. Ask for Input
    Add what text in file
  42. Set Variable
    Add text
  43. Get File
  44. Repeat with Each
  45. Set Variable
    File
  46. Get Text from Input
  47. Set Variable
    Get text
  48. Get Name
  49. Set Variable
    Name
  50. Get Details of Files
  51. Set Variable
    Extension
  52. If
  53. Replace Text
  54. Text
  55. Set Name
  56. Choose from Menu
    replace between what options
  57. Choose from Menu
    Replace between what
  58. Choose from Menu
    both sides of text
  59. Ask for Input
    Look For what on left & right side of text
  60. Set Variable
    Both sides of text
  61. Ask for Input
    Replace what between both sides of text
  62. Set Variable
    Replace text
  63. Ask for Input
    Replace with what
  64. Set Variable
    Add text
  65. Get File
  66. Repeat with Each
  67. Get Name
  68. Set Variable
    Name
  69. Get Text from Input
  70. Set Variable
    Get text
  71. Replace Text
  72. Text
  73. Set Name
  74. Choose from Menu
    both sides of text (no space)
  75. Ask for Input
    Look For what on left & right side of text
  76. Set Variable
    Both sides of text
  77. Ask for Input
    Replace what between both sides of text
  78. Set Variable
    Replace text
  79. Ask for Input
    Replace with what
  80. Set Variable
    Add text
  81. Get File
  82. Repeat with Each
  83. Get Name
  84. Set Variable
    Name
  85. Get Text from Input
  86. Set Variable
    Get text
  87. Replace Text
  88. Text
  89. Set Name
  90. Choose from Menu
    two different sides of text
  91. Ask for Input
    Look for what on left side of text
  92. Set Variable
    Left side of text
  93. Ask for Input
    Look for what on right side of text
  94. Set Variable
    right side of text
  95. Ask for Input
    Replace what between left & right side of text
  96. Set Variable
    Replace text
  97. Ask for Input
    Replace with what
  98. Set Variable
    Add text
  99. Get File
  100. Repeat with Each
  101. Get Name
  102. Set Variable
    Name
  103. Get Text from Input
  104. Set Variable
    Get text
  105. Replace Text
  106. Text
  107. Set Name
  108. Choose from Menu
    two different sides of text (no space)
  109. Ask for Input
    Look for what on left side of text
  110. Set Variable
    Left side of text
  111. Ask for Input
    Look for what on right side of text
  112. Set Variable
    right side of text
  113. Ask for Input
    Replace what between left & right side of text
  114. Set Variable
    Replace text
  115. Ask for Input
    Replace with what
  116. Set Variable
    Add text
  117. Get File
  118. Repeat with Each
  119. Get Name
  120. Set Variable
    Name
  121. Get Text from Input
  122. Set Variable
    Get text
  123. Replace Text
  124. Text
  125. Set Name
  126. Choose from Menu
    create folder
  127. Ask for Input
    Set Folder Name
  128. Set Variable
    Folder name
  129. Create Folder
  130. Show Result
  131. Stop This Shortcut
  132. Choose from Menu
    save options
  133. Choose from Menu
    Replace text save options
  134. Choose from Menu
    in file name
  135. Ask for Input
    Replace what text in file
  136. Set Variable
    Replace text
  137. Ask for Input
    Add what text in file
  138. Set Variable
    Add text
  139. Get File
  140. Repeat with Each
  141. Set Variable
    File
  142. Get Text from Input
  143. Set Variable
    Get text
  144. Get Name
  145. Set Variable
    Name
  146. Get Details of Files
  147. Set Variable
    Extension
  148. If
  149. Replace Text
  150. Text
  151. Set Name
  152. Choose from Menu
    in file extension
  153. Ask for Input
    Replace what text in file
  154. Set Variable
    Replace text
  155. Ask for Input
    Add what text in file
  156. Set Variable
    Add text
  157. Get File
  158. Repeat with Each
  159. Set Variable
    File
  160. Get Text from Input
  161. Set Variable
    Get text
  162. Get Name
  163. Set Variable
    Name
  164. Get Details of Files
  165. Set Variable
    Extension
  166. If
  167. Replace Text
  168. Text
  169. Set Name
  170. Choose from Menu
    inside file
  171. Ask for Input
    Replace what text in file
  172. Set Variable
    Replace text
  173. Ask for Input
    Add what text in file
  174. Set Variable
    Add text
  175. Get File
  176. Repeat with Each
  177. Set Variable
    File
  178. Get Text from Input
  179. Set Variable
    Get text
  180. Get Name
  181. Set Variable
    Name
  182. Get Details of Files
  183. Set Variable
    Extension
  184. If
  185. Replace Text
  186. Text
  187. Set Name
  188. Choose from Menu
    replace between what options
  189. Choose from Menu
    Replace between what save options
  190. Choose from Menu
    both sides of text
  191. Ask for Input
    Look For what on left & right side of text
  192. Set Variable
    Both sides of text
  193. Ask for Input
    Replace what between both sides of text
  194. Set Variable
    Replace text
  195. Ask for Input
    Replace with what
  196. Set Variable
    Add text
  197. Get File
  198. Repeat with Each
  199. Get Name
  200. Set Variable
    Name

Vis som kode
Beta

Alle genvejens handlinger skrevet ud i Cherri, et programmeringssprog til genveje. Perfekt til at lære, hvordan den virker.

#include 'actions/text'
#define color blue
#define glyph magicWandAlt


menu "Replace text" {
item "in file name":
	prompt("Replace what text in file")
	@ReplaceText
	prompt("Add what text in file")
	@AddText
	const File = getFileFromFolder(, "")
	for _ in File {
		@File = @RepeatItem
		getText(@File)
		@GetText
		getName(@File)
		@Name
		getFileDetail(nil, "File Extension")
		@Extension
		if @Name contains @ReplaceText {
			replaceText(@ReplaceText, @AddText, @Name)
			const Text = "{@GetText}"
			setName(Text, "{}.{@Extension}")
		}
	}
item "in file extension":
	prompt("Replace what text in file")
	@ReplaceText
	prompt("Add what text in file")
	@AddText
	const File1 = getFile("")
	for _ in File1 {
		@File = @RepeatItem
		getText(@File)
		@GetText
		getName(@File)
		@Name
		getFileDetail(nil, "File Extension")
		@Extension
		if @Extension contains @ReplaceText {
			replaceText(@ReplaceText, @AddText, @Extension)
			const Text1 = "{@GetText}"
			setName(Text1, "{@Name}.{}")
		}
	}
item "inside file":
	prompt("Replace what text in file")
	@ReplaceText
	prompt("Add what text in file")
	@AddText
	const File2 = getFile("")
	for _ in File2 {
		@File = @RepeatItem
		getText(@File)
		@GetText
		getName(@File)
		@Name
		getFileDetail(nil, "File Extension")
		@Extension
		if @GetText contains @ReplaceText {
			replaceText(@ReplaceText, @AddText, @GetText)
			const Text2 = "{}"
			setName(Text2, "{@Name}.{@Extension}")
		}
	}
item "replace between what options":
	menu "Replace between what" {
	item "both sides of text":
		prompt("Look For what on left & right side of text")
		@BothSidesOfText
		prompt("Replace what between both sides of text")
		@ReplaceText
		prompt("Replace with what")
		@AddText
		const File3 = getFile("")
		for _ in File3 {
			getName(@RepeatItem)
			@Name
			getText(@RepeatItem)
			@GetText
			replaceText("(\{@BothSidesOfText}.*) {@ReplaceText} (.*.*\{@BothSidesOfText})", "$1 {@AddText} $2", @GetText, true)
			const Text3 = "{}"
			setName(Text3, @Name)
		}
	item "both sides of text (no space)":
		prompt("Look For what on left & right side of text")
		@BothSidesOfText
		prompt("Replace what between both sides of text")
		@ReplaceText
		prompt("Replace with what")
		@AddText
		const File3 = getFile("")
		for _ in File3 {
			getName(@RepeatItem)
			@Name
			getText(@RepeatItem)
			@GetText
			replaceText("(\{@BothSidesOfText}.*){@ReplaceText}(.*.*\{@BothSidesOfText})", "$1{@AddText}$2", @GetText, true)
			const Text3 = "{}"
			setName(Text3, @Name)
		}
	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
		prompt("Replace what between left & right side of text")
		@ReplaceText
		prompt("Replace with what")
		@AddText
		const File4 = getFile("")
		for _ in File4 {
			getName(@RepeatItem)
			@Name
			getText(@RepeatItem)
			@GetText
			replaceText("(\{@LeftSideOfText}.*) {@ReplaceText} (.*.*\{@RightSideOfText})", "$1 {@AddText} $2", @GetText, true)
			const Text4 = "{}"
			setName(Text4, @Name)
		}
	item "two different sides of text (no space)":
		prompt("Look for what on left side of text")
		@LeftSideOfText
		prompt("Look for what on right side of text")
		@RightSideOfText
		prompt("Replace what between left & right side of text")
		@ReplaceText
		prompt("Replace with what")
		@AddText
		const File4 = getFile("")
		for _ in File4 {
			getName(@RepeatItem)
			@Name
			getText(@RepeatItem)
			@GetText
			replaceText("(\{@LeftSideOfText}.*){@ReplaceText}(.*.*\{@RightSideOfText})", "$1{@AddText}$2", @GetText, true)
			const Text5 = "{}"
			setName(Text5, @Name)
		}
	}
item "create folder":
	prompt("Set Folder Name")
	@FolderName
	createFolder(@FolderName)
	show("New folder is /Shortcuts/{@FolderName}")
	stop()
item "save options":
	menu "Replace text save options" {
	item "in file name":
		prompt("Replace what text in file")
		@ReplaceText
		prompt("Add what text in file")
		@AddText
		const File = getFile("")
		for _ in File {
			@File = @RepeatItem
			getText(@File)
			@GetText
			getName(@File)
			@Name
			getFileDetail(nil, "File Extension")
			@Extension
			if @Name contains @ReplaceText {
				replaceText(@ReplaceText, @AddText, @Name)
				const Text = "{@GetText}"
				setName(Text, "{}.{@Extension}")
			}
		}
	item "in file extension":
		prompt("Replace what text in file")
		@ReplaceText
		prompt("Add what text in file")
		@AddText
		const File1 = getFile("")
		for _ in File1 {
			@File = @RepeatItem
			getText(@File)
			@GetText
			getName(@File)
			@Name
			getFileDetail(nil, "File Extension")
			@Extension
			if @Extension contains @ReplaceText {
				replaceText(@ReplaceText, @AddText, @Extension)
				const Text1 = "{@GetText}"
				setName(Text1, "{@Name}.{}")
			}
		}
	item "inside file":
		prompt("Replace what text in file")
		@ReplaceText
		prompt("Add what text in file")
		@AddText
		const File2 = getFile("")
		for _ in File2 {
			@File = @RepeatItem
			getText(@File)
			@GetText
			getName(@File)
			@Name
			getFileDetail(nil, "File Extension")
			@Extension
			if @GetText contains @ReplaceText {
				replaceText(@ReplaceText, @AddText, @GetText)
				const Text2 = "{}"
				setName(Text2, "{@Name}.{@Extension}")
			}
		}
	item "replace between what options":
		menu "Replace between what save options" {
		item "both sides of text":
			prompt("Look For what on left & right side of text")
			@BothSidesOfText
			prompt("Replace what between both sides of text")
			@ReplaceText
			prompt("Replace with what")
			@AddText
			const File3 = getFile("")
			for _ in File3 {
				getName(@RepeatItem)
				@Name
				getText(@RepeatItem)
				@GetText
				replaceText("(\{@BothSidesOfText}.*) {@ReplaceText} (.*.*\{@BothSidesOfText})", "$1 {@AddText} $2", @GetText, true)
				const Text3 = "{}"
				setName(Text3, @Name)
			}
		item "both sides of text (no space)":
			prompt("Look For what on left & right side of text")
			@BothSidesOfText
			prompt("Replace what between both sides of text")
			@ReplaceText
			prompt("Replace with what")
			@AddText
			const File3 = getFile("")
			for _ in File3 {
				getName(@RepeatItem)
				@Name
				getText(@RepeatItem)
				@GetText
				replaceText("(\{@BothSidesOfText}.*){@ReplaceText}(.*.*\{@BothSidesOfText})", "$1{@AddText}$2", @GetText, true)
				const Text3 = "{}"
				setName(Text3, @Name)
			}
		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
			prompt("Replace what between left & right side of text")
			@ReplaceText
			prompt("Replace with what")
			@AddText
			const File4 = getFile("")
			for _ in File4 {
				getName(@RepeatItem)
				@Name
				getText(@RepeatItem)
				@GetText
				replaceText("(\{@LeftSideOfText}.*) {@ReplaceText} (.*.*\{@RightSideOfText})", "$1 {@AddText} $2", @GetText, true)
				const Text4 = "{}"
				setName(Text4, @Name)
			}
		item "two different sides of text (no space)":
			prompt("Look for what on left side of text")
			@LeftSideOfText
			prompt("Look for what on right side of text")
			@RightSideOfText
			prompt("Replace what between left & right side of text")
			@ReplaceText
			prompt("Replace with what")
			@AddText
			const File4 = getFile("")
			for _ in File4 {
				getName(@RepeatItem)
				@Name
				getText(@RepeatItem)
				@GetText
				replaceText("(\{@LeftSideOfText}.*){@ReplaceText}(.*.*\{@RightSideOfText})", "$1{@AddText}$2", @GetText, true)
				const Text5 = "{}"
				setName(Text5, @Name)
			}
		}
	}
	const SavedFile = saveFilePrompt(MenuResult)
	stop()
}
createFolder("Replace text")
saveFile("Replace text", MenuResult1, true)
show("In folder /Shortcuts/Replace text")
Dekompileret med cherri 2.3.0 (GPL-2.0). Kan kræve små rettelser, før den kan kompileres.

Bedømmelser og anmeldelser

Skriv en anmeldelse
–
ud af 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Ingen anmeldelser endnu. Vær den første!

Annonce

Mere fra hunter9888x

Se alle

Du vil måske også kunne lide

Se alle
Annonce