ShareShortcuts

Commander v1

Commands for your iPhone/iPad

turtle
Bifurcar “Commander v1”

¿Creaste algo nuevo a partir de este atajo? Compártelo como bifurcación: se convierte en un atajo tuyo, que tú administras, y ambas páginas se enlazan entre sí para que turtle reciba el crédito.

  1. 1Obtén el atajo y modifícalo en la app Atajos. Ponle un nombre propio.
  2. 2Compártelo desde la app Atajos y copia el enlace de iCloud.
  3. 3Vuelve aquí, pega el enlace y describe qué es diferente, p. ej., “Se añadió un paso que usa Apple Intelligence para personalizar el texto”.
Descargas
53K
Guardado
3
Acciones
77
Categoría
Utilities
Versión
1.1
Idioma
EN

Commands for your iPhone/iPad.

Novedades

Versión 1.1

Added API.

Historial de versiones
1.1 15 de ene. de 2021

Added API.

1.0 15 de ene. de 2021

First release

Qué hace

77 acciones
  1. Text
  2. Set Variable
    Help v1.1
  3. Text
  4. If
  5. Nothing
  6. If
  7. If
  8. Get File
  9. URL
    simplecuts.glitch.me/updates/commander.json
  10. Get Contents of URL
    …
  11. Get Text from Input
  12. Set Variable
    AutoUpdate
  13. If
  14. If
  15. If
  16. If
  17. Choose from Menu
    A commander update is available!
  18. Choose from Menu
    Install
  19. Get Dictionary Value
  20. Show Web Page
  21. Stop This Shortcut
  22. Choose from Menu
    Details
  23. Get Dictionary Value
  24. Get Dictionary Value
  25. Text
  26. Choose from Menu
    …
  27. Choose from Menu
    Install
  28. Get Dictionary Value
  29. Show Web Page
  30. Stop This Shortcut
  31. Choose from Menu
    Skip
  32. Save File
  33. Choose from Menu
    Skip
  34. Get Dictionary Value
  35. Save File
  36. If
  37. Set Variable
    invalidsyntax
  38. Show Alert
  39. Get Device Details
  40. If
  41. Show Alert
  42. Get Device Details
  43. If
  44. Split Text
  45. Get Item from List
  46. Get Text from Input
  47. If
  48. Ask for Input
    Commander on iOS …, …
  49. Set Variable
    Command-er
  50. If
  51. Replace Text
  52. Speak Text
  53. Run Shortcut
    Commander v1
  54. If
  55. If
  56. Get Contents of URL
    simplecuts.glitch.me/updates/commander.json
  57. Get Dictionary Value
  58. Open URLs
  59. Stop This Shortcut
  60. If
  61. If
  62. Show Alert
    Time
  63. Run Shortcut
    Commander v1
  64. If
  65. If
  66. Show Alert
    Date
  67. Run Shortcut
    Commander v1
  68. If
  69. If
  70. Show Result
  71. Run Shortcut
    Commander v1
  72. If
  73. If
  74. Replace Text
  75. Get File
  76. Stop This Shortcut
  77. Run Shortcut
    Commander v1

Ver como código
Beta

Todas las acciones de este atajo escritas en Cherri, un lenguaje de programación para Atajos. Ideal para aprender cómo funciona.

#include 'actions/web'
#define color red
#define glyph documentFilled

@HelpV11 = "• Commander •\nsay - Says anything.\n(e.g. say Commander is the best!)\nupdate - If you enabled Manual Update, this command works.\nhelp - Heres what you are viewing.\ntime - Here's the time\ndate - Here's the date.\n\nEnd of Commander help list\n\nStart of Commander API list\nTo use Commander API, run this shortcut with input \\"Commander -(command)\\" and it will execute.\n\nNew commands in API only:\n- getfile (file path in /Shortcuts/)"
const updatescommander = "MANUAL"

if updatescommander contains "MANUAL" {
} else {
	if updatescommander contains "AUTO" {
		const File = getFileFromFolder(, "skipper.txt", false)
		url("simplecuts.glitch.me/updates/commander.json")
		const ContentsOfURL = downloadURL()
		getText(ContentsOfURL)
		@AutoUpdate
		if @AutoUpdate contains "1.1" {
		} else {
			if File {
			} else {
				menu "A commander update is available!" {
				item "Install":
					const DictionaryValue = getValue(@AutoUpdate, "URL")
					showWebpage(DictionaryValue)
					stop()
				item "Details":
					const DictionaryValue2 = getValue(@AutoUpdate, "NewVer")
					menu  {
					item "Install":
						const DictionaryValue1 = getValue(@AutoUpdate, "URL")
						showWebpage(DictionaryValue1)
						stop()
					item "Skip":
						saveFile("skipper.txt", DictionaryValue2, true)
					}
				item "Skip":
					const DictionaryValue3 = getValue(@AutoUpdate, "NewVer")
					saveFile("skipper.txt", DictionaryValue3, true)
				}
			}
		}
	} else {
		@invalidsyntax = updatescommander
		confirm("Invalid update syntax. Using manual instead.")
	}
}
const sysver = getDeviceDetail("System Version")

if sysver contains "12" {
	confirm("Shortcuts is too old. Please run on a newer version of iOS.")
}
const sysname = getDeviceDetail("Device Name")

if ShortcutInput {
	const SplitText = splitText(sysname, "Commander -")
	const ItemFromList = getListItem(SplitText, 2)
	getText(ItemFromList)
} else {
	prompt("Commander on iOS {sysver}, {sysname}")
}
@Commander

if @Commander contains "say" {
	replaceText("say ", "", @Commander)
	speak()
	runSelf()
} else {
	if @Commander contains "update" {
		const ContentsOfURL1 = downloadURL("simplecuts.glitch.me/updates/commander.json")
		const DictionaryValue4 = getValue(ContentsOfURL1, "URL")
		openURL(DictionaryValue4)
		stop()
	} else {
		if @Commander contains "time" {
			alert(CurrentDate, "Time")
			runSelf()
		} else {
			if @Commander contains "date" {
				alert(CurrentDate, "Date")
				runSelf()
			} else {
				if @Commander == "help" {
					show(@HelpV11)
					runSelf()
				} else {
					if @Commander contains "getfile" {
						replaceText("getfile ", "", @Commander)
						const File1 = getFile()
						stop()
					}
					runSelf()
				}
			}
		}
	}
}
Abrir en Cherri Playground Descompilado con cherri 2.3.0 (GPL-2.0). Puede que necesite pequeños ajustes antes de compilarse.

Valoraciones y reseñas

Escribe una reseña
–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aún no hay reseñas. ¡Sé el primero en compartir tu opinión!

Publicidad

Más de turtle

Ver todo

También te puede gustar

Ver todo
Publicidad