ShareShortcuts

Commander v1

Commands for your iPhone/iPad

turtle
„Commander v1“ forken

Hast du auf Basis dieses Kurzbefehls etwas Neues erstellt? Teile ihn als Fork: Er wird zu deinem eigenen Kurzbefehl, den du selbst verwaltest, und beide Seiten verlinken aufeinander, damit turtle die Anerkennung erhält.

  1. 1Lade den Kurzbefehl und ändere ihn in der Kurzbefehle-App. Gib ihm einen eigenen Namen.
  2. 2Teile ihn in der Kurzbefehle-App und kopiere den iCloud-Link.
  3. 3Komm hierher zurück, füge den Link ein und beschreibe, was sich geändert hat, z. B. „Einen Schritt hinzugefügt, der Apple Intelligence nutzt, um den Text zu personalisieren.“
Downloads
53K
Gesichert
3
Aktionen
77
Kategorie
Utilities
Version
1.1
Sprache
EN

Commands for your iPhone/iPad.

Neue Funktionen

Version 1.1

Added API.

Versionsverlauf
1.1 15. Jan 2021

Added API.

1.0 15. Jan 2021

First release

Was er macht

77 Aktionen
  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

Als Code ansehen
Beta

Jede Aktion dieses Kurzbefehls als Cherri ausgeschrieben, eine Programmiersprache für Kurzbefehle. Ideal, um zu lernen, wie er funktioniert.

#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()
				}
			}
		}
	}
}
In Cherri Playground öffnen Mit cherri 2.3.0 (GPL-2.0) dekompiliert. Eventuell sind kleine Korrekturen nötig, bevor es kompiliert wird.

Bewertungen und Rezensionen

Rezension schreiben
–
von 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Werbung

Mehr von turtle

Alle anzeigen

Das gefällt dir vielleicht auch

Alle anzeigen
Werbung