ShareShortcuts

Find Hospital

This shortcut provides a list of hospitals nearest your location

rdkkt
Создать форк «Find Hospital»

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

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

This shortcut provides a list of hospitals nearest your location. After choosing from the list, it returns driving directions via the maps provider you selected. The text field below defines the search radius in miles. The list is sorted by distance.

Что нового

Версия 1.0

First release

История версий
1.0 26 мар 2020 г.

First release

Что делает

Действий: 26
  1. Comment
    This shortcut provides a list of hospitals nearest your location. After choosing from the list, it returns driving directions via the maps provider you selected. The text field below defines the search radius in miles. The list is sorted by distance.
  2. Text
  3. Get Current Location
  4. Set Variable
    myLocation
  5. Search Local Businesses
  6. Add to Variable
  7. Repeat with Each
  8. Getdistance
  9. Round Number
  10. Text
  11. Combine Text
  12. Text
  13. Get Dictionary from Input
  14. Get Dictionary Value
  15. Repeat with Each
  16. Count
  17. Calculate Statistics
  18. Calculate
  19. Repeat with Each
  20. Calculate
  21. Filter Files
  22. Repeat with Each
  23. Calculate
  24. Get Dictionary Value
  25. Choose from List
  26. Show Directions

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

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

#include 'actions/location'
#define color red
#define glyph ambulance

/*
This shortcut provides a list of hospitals nearest your location. After choosing from the list, it returns driving directions via the maps provider you selected. The text field below defines the search radius in miles. The list is sorted by distance.

*/
const radius = "20"
getCurrentLocation()
@myLocation
rawAction("is.workflow.actions.searchlocalbusinesses", {
	"WFInput": "@myLocation",
	"WFSearchQuery": "Hospital",
	"WFSearchRadius": ""
})
@List

const RepeatResults = for _ in @List {
	rawAction("is.workflow.actions.getdistance", {
		"WFGetDirectionsActionMode": "Driving",
		"WFGetDirectionsCustomLocation": "@myLocation",
		"WFGetDistanceDestination": "@RepeatItem"
	})
	const distance = ceil(Distance, "Ones Place")
}
joinText(RepeatResults, ",")
const Text = "{{}}"
const Dictionary = getDictionary(Text)
const DictionaryValue = getKeys(Dictionary)

const RepeatResults1 = for _ in DictionaryValue {
	count(@RepeatItem, "Characters")
}
const Maximum = statistic("Maximum", nil)
const scaleFactor = Maximum … nil

const RepeatResults2 = for _ in DictionaryValue {
}
const Files = filterFiles(RepeatResults2, "Name", "A to Z")

const RepeatResults3 = for _ in Files {
}
const ChosenItem = chooseFromList(RepeatResults3)
rawAction("is.workflow.actions.getdirections", {
	"WFDestination": "ChosenItem",
	"WFGetDirectionsActionApp": "Maps"
})
Открыть в Cherri Playground Декомпилировано с помощью cherri 2.3.0 (GPL-2.0). Перед компиляцией могут понадобиться небольшие исправления.

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

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

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

Реклама

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

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