ShareShortcuts

Find Hospital

This shortcut provides a list of hospitals nearest your location

rdkkt
Fork “Find Hospital”

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å rdkkt 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
61K
Gemt
0
Handlinger
26
Kategori
Rejser og kort
Version
1.0
Sprog
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.

Nyheder

Version 1.0

First release

Versionshistorik
1.0 26. mar. 2020

First release

Hvad den gør

26 handlinger
  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

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/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"
})
Åbn i Cherri Playground 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

Du vil måske også kunne lide

Se alle
Annonce