ShareShortcuts
Создать форк «Utilities»

Создали что-то новое на основе этой команды? Поделитесь ей как форком: она станет вашей собственной командой, которой вы управляете, а обе страницы будут ссылаться друг на друга, чтобы arandomguy24 получил(а) признание.

  1. 1Получите команду и измените её в приложении «Быстрые команды». Дайте ей собственное название.
  2. 2Поделись ею из приложения «Быстрые команды» и скопируй ссылку iCloud.
  3. 3Вернись сюда, вставь ссылку и опиши, что изменилось, например: «Добавлен шаг, который использует Apple Intelligence для персонализации текста».
Загрузки
40K
Сохранено
0
Действия
86
Категория
Utilities
Версия
1.0
Язык
EN

Просмотр

Basically Uti

Что нового

Версия 1.0

First release

История версий
1.0 11 июл 2022 г.

First release

Что делает

Действий: 86
  1. Comment
    DO NOT CHANGE ANYTHING ALSO DON’T CHANGE THE NAME OR THIS WON’T WORK
  2. Comment
    Made by @ArandomGuy24 for RoutineHub https://www.routinehub.co/user/ArandomGuy24 Also I used [Eᴍʙᴇᴅ-ᴀ-Uᴘᴅᴀᴛᴇ] for the update system https://routinehub.co/shortcut/2672/
  3. Get URLs from Input
  4. Set Variable
    LinkShortenerInput
  5. Repeat
  6. Dictionary
  7. Set Variable
    self
  8. Set Variable
    LocalData
  9. Get IP Address
  10. Count
  11. If
  12. Show Alert
  13. If
  14. URL
    https://routinehub.co/api/v1/shortcuts/…/versions/latest
  15. Get Contents of URL
    …
  16. If
  17. Dictionary
  18. Text
  19. URL
    data:text/html,…
  20. Get Contents of Web Page
  21. If
  22. If
  23. If
  24. Text
  25. If
  26. Text
  27. Choose from Menu
    … … Update checking with [Eᴍʙᴇᴅ-ᴀ-Uᴘᴅᴀᴛᴇ]
  28. Choose from Menu
    Install result (Version)
  29. URL
    https://routinehub.co/download/…
  30. Open URLs
  31. Stop and Output
  32. Choose from Menu
    Later
  33. If
  34. Show Alert
  35. Choose from Menu
  36. Choose from Menu
    Message Spam
  37. Ask for Input
    What do you want to spam
  38. Set Variable
    Words
  39. Ask for Input
    How much times
  40. Set Variable
    Amount
  41. Select Contacts
  42. Repeat
  43. Send Message
  44. Show Notification
    Spam complete
  45. Run Shortcut
    Utilities
  46. Choose from Menu
    Call spam (Coming soon)
  47. Run Shortcut
    Utilities
  48. Choose from Menu
    Link shortener
  49. If
  50. Ask for Input
    What link do you want to shorten?
  51. Set Variable
    LinkShortenerInput
  52. URL
    https://shorter.tins.ml/api/new?url=…
  53. Get Contents of URL
    …
  54. Get Dictionary Value
  55. Set Variable
    LinkShortenerLink
  56. If
  57. Get Contents of URL
    …
  58. Get Dictionary Value
  59. Set Variable
    LinkShortenerStatus
  60. Show Alert
  61. Run Shortcut
    Utilities
  62. If
  63. Choose from Menu
    Success …
  64. Choose from Menu
    Save to clipboard
  65. Copy to Clipboard
  66. Show Notification
    Saved
  67. Run Shortcut
    Utilities
  68. Choose from Menu
    Open Secret apps
  69. Choose from Menu
    Secret app
  70. Choose from Menu
    Xcode previews
  71. Open App
  72. Choose from Menu
    FeedBack
  73. Open App
  74. Stop This Shortcut
  75. Choose from Menu
    Rickroll links
  76. Text
  77. Quick Look
  78. Run Shortcut
    Utilities
  79. Choose from Menu
    Upload To Imgur
  80. Select Photos
  81. Imgur Upload
  82. Copy to Clipboard
  83. Show Notification
    Link Copied To Clipboard
  84. Run Shortcut
    Utilities
  85. Choose from Menu
    Quit
  86. Stop This Shortcut

Посмотреть как код
Бета

Все действия этой команды, записанные на Cherri — языке программирования для приложения «Быстрые команды». Отлично подходит, чтобы разобраться, как она работает.

#include 'actions/web'
#define color blue
#define glyph magnifyingGlass

/*
DO NOT CHANGE ANYTHING 
ALSO DON’T CHANGE THE NAME OR THIS WON’T WORK
*/
/*
Made by @ArandomGuy24 for RoutineHub

https://www.routinehub.co/user/ArandomGuy24

Also I used [Eᴍʙᴇᴅ-ᴀ-Uᴘᴅᴀᴛᴇ] for the update system
https://routinehub.co/shortcut/2672/
*/
getURLs(ShortcutInput)
@LinkShortenerInput

repeat _ for nil {
	@self = {
		"Author": "@ArandomGuy24",
		"ID": "11835",
		"Name": "Utillities",
		"Version": "1.7"
	}
	@LocalData
	const CurrentIPAddress = getExternalIP()
	const Count = count(CurrentIPAddress)
	if Count == 0 {
		confirm("[Eᴍʙᴇᴅ-ᴀ-Uᴘᴅᴀᴛᴇ] Could not check for updates, there is no internet connection.")
	} else {
		url("https://routinehub.co/api/v1/shortcuts/{@LocalData['ID']}/versions/latest")
		const result = downloadURL()
		if result contains "success" {
			const CompareVersionsData = {
				"current": "{@LocalData['Version']}",
				"new": "{result['Version']}"
			}
			const CompareVersionsHTML = "<html><head></head><body><script>\n// Embed-a-Engine 1.0\nfunction cmp (a, b) {\nlet pa = a.split('.');\nlet pb = b.split('.');\nfor (let i = 0; i < Math.max(pa.length, pb.length); i++) {\nlet na = Number(pa[i]);\nlet nb = Number(pb[i]);\nif (isNaN(na)) na = 0;\nif (isNaN(nb)) nb = 0;\nif (na > nb) return \\"RollbackAvailable\\";\nif (nb > na) return \\"UpdateAvailable\\";\n}\nreturn \\"NoChanges\\";\n};\nlet data = {CompareVersionsData};\ndocument.write(cmp(data.current, data.new));\n</script></body></html>"
			url("data:text/html,{CompareVersionsHTML}")
			const ContentsOfWebPage = getWebpageContents()
			if ContentsOfWebPage == "NoChanges" {
			} else {
				if ContentsOfWebPage == "RollbackAvailable" {
				} else {
				}
				menu "{}\n\n{result['Notes']}\n\nUpdate checking with [Eᴍʙᴇᴅ-ᴀ-Uᴘᴅᴀᴛᴇ]" {
				item "Install {result['Version']}":
					const URL = url("https://routinehub.co/download/{result['id']}")
					openURL(URL)
					output(URL)
				item :
				}
			}
		} else {
			alert("Could not check for updates because of a RoutineHub error:\n\n{result['message']}", "")
		}
	}
}

menu nil {
item "Message Spam":
	prompt("What do you want to spam", "Text")
	@Words
	prompt("How much times", "Number")
	@Amount
	const Contacts = selectContact()
	repeat _ for @Amount {
		sendMessage(Contacts, @Words, false)
	}
	showNotification("Spam complete", RepeatResults)
	runSelf()
item "Call spam (Coming soon)":
	runSelf()
item "Link shortener":
	if !@LinkShortenerInput {
		prompt("What link do you want to shorten?", "URL")
		@LinkShortenerInput
	}
	url("https://shorter.tins.ml/api/new?url={@LinkShortenerInput}")
	const ContentsOfURL = downloadURL()
	@LinkShortenerLink = ContentsOfURL['short_url']
	if !@LinkShortenerLink {
		const ContentsOfURL1 = downloadURL(@LinkShortenerLink)
		@LinkShortenerStatus = ContentsOfURL1['message']
		confirm(@LinkShortenerStatus)
		runSelf()
	} else {
		menu "Success {@LinkShortenerLink}" {
		item "Save to clipboard":
			setClipboard(@LinkShortenerLink)
			showNotification("Saved", @LinkShortenerLink)
			runSelf()
		}
	}
item "Open Secret apps":
	menu "Secret app" {
	item "Xcode previews":
		openApp("com.apple.dt.XcodePreviews")
	item "FeedBack":
		openApp("com.apple.appleseed.FeedbackAssistant")
	}
	stop()
item "Rickroll links":
	const Text = "https://bit.do/YeetYeet\n\nhttps://bit.ly/3shS6WA\n\nhttps://tomorrowtides.com\n\nhttps://theworldthesedays.com\n\nhttps://www.latlmes.com/breaking/breaking-news-1"
	quicklook(Text)
	runSelf()
item "Upload To Imgur":
	const Photos = selectPhotos()
	rawAction("is.workflow.actions.imgur.upload", {
		"WFImgurDirectLink": true,
		"WFInput": "Photos"
	})
	setClipboard(ImgurURLs)
	showNotification("Link Copied To Clipboard", MenuResult)
	runSelf()
item "Quit":
	stop()
}
Открыть в Cherri Playground Декомпилировано с помощью cherri 2.3.0 (GPL-2.0). Перед компиляцией могут понадобиться небольшие исправления.

Оценки и отзывы

Написать отзыв
–
из 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Пока нет отзывов. Поделись мнением первым!

Реклама

Ещё от arandomguy24

См. все

Вам также может понравиться

См. все
Реклама