ShareShortcuts

Record Weight

Record your weight into the health app in either pounds or kilos

gramps
Dupliquer « Record Weight »

Tu as créé quelque chose de nouveau à partir de ce raccourci ? Partage-le comme version dérivée : il devient un raccourci à toi, que tu gères, et les deux pages renvoient l’une vers l’autre pour que gramps soit crédité.

  1. 1Obtenez le raccourci et modifiez-le dans l’app Raccourcis. Donnez-lui un nom bien à lui.
  2. 2Partage-le depuis l’app Raccourcis et copie le lien iCloud.
  3. 3Reviens ici, colle le lien et décris ce qui change, par exemple : « Ajout d’une étape qui utilise Apple Intelligence pour personnaliser le texte. »
Créer mon fork
Téléchargements
59K
Enregistré
0
Actions
21
Catégorie
Utilities
Version
1.0
Langue
EN

Aperçu

Record your weight into the health app in either pounds or kilos. Results will be displayed in the health app default measure.

Nouveautés

Version 1.0

First release

Historique des versions
1.0 12 mai 2020

First release

Ce qu’il fait

21 actions
  1. Get Device Details
  2. If
  3. Show Alert
  4. Stop This Shortcut
  5. If
  6. Choose from Menu
    Pounds / Kilos?
  7. Choose from Menu
    Pounds?
  8. Ask for Input
    Weight in lbs?
  9. Log Health Sample
  10. Show Notification
    … lbs added Ok
  11. Vibrate Device
  12. Find Health Samples
  13. Choose from Menu
    Kilos?
  14. Ask for Input
    Weight in kilos?
  15. Log Health Sample
  16. Vibrate Device
  17. Show Notification
    … kilos added Ok
  18. Find Health Samples
  19. Show Alert
    Body Weight last 5 days
  20. Show Alert
    Body Weight Details in health app default units
  21. Continue Activity

Afficher en tant que code
Bêta

Chaque action de ce raccourci écrite en Cherri, un langage de programmation pour Raccourcis. Idéal pour comprendre son fonctionnement.

#define mac false
#include 'actions/device'
#define color darkorange
#define glyph stethoscope

const DeviceModel = getDeviceDetail("Device Model")

if DeviceModel !contains "iPhone" {
	confirm("This shortcut needs the iPhone Health app.")
	stop()
} else {
	menu "Pounds / Kilos?" {
	item "Pounds?":
		const ProvidedInput = prompt("Weight in lbs?", "Number")
		rawAction("is.workflow.actions.health.quantity.log", {
			"WFQuantitySampleAdditionalQuantity": "",
			"WFQuantitySampleDate": "{CurrentDate}",
			"WFQuantitySampleQuantity": "",
			"WFQuantitySampleType": "Weight"
		})
		showNotification("{ProvidedInput} lbs added Ok", "Body Weight", false)
		vibrate()
		rawAction("is.workflow.actions.filter.health.quantity", {
			"WFContentItemFilter": "",
			"WFContentItemLimitEnabled": false,
			"WFContentItemSortOrder": "Latest First",
			"WFContentItemSortProperty": "Start Date",
			"WFHKSampleFilteringFillMissing": false
		})
	item "Kilos? ":
		const ProvidedInput = prompt("Weight in kilos?", "Number")
		rawAction("is.workflow.actions.health.quantity.log", {
			"WFQuantitySampleAdditionalQuantity": "",
			"WFQuantitySampleDate": "{CurrentDate}",
			"WFQuantitySampleQuantity": "",
			"WFQuantitySampleType": "Weight"
		})
		vibrate()
		showNotification("{ProvidedInput} kilos added Ok", "Body Weight", false)
		rawAction("is.workflow.actions.filter.health.quantity", {
			"WFContentItemFilter": "",
			"WFContentItemLimitEnabled": false,
			"WFContentItemSortOrder": "Latest First",
			"WFContentItemSortProperty": "Start Date",
			"WFHKSampleFilteringFillMissing": false,
			"WFHKSampleFilteringUnit": "kg"
		})
	}
	alert(, "Body Weight last 5 days")
	alert("Open Health App?", "Body Weight Details in health app default units")
	rawAction("is.workflow.actions.useractivity.open", {
		"AppBundleIdentifier": "com.apple.Health",
		"UserActivityData": "YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGvEBELDElPVVZXW15fZWZnam5vclUkbnVsbN8QHg0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS0tMDEyLS0tLS04MToyLT0+MUAtLS0tRS1HMVxyZXF1aXJlZEtleXNVdGl0bGVad2VicGFnZVVSTF8QE2R5bmFtaWNBY3Rpdml0eVR5cGVfEBRwZXJzaXN0ZW50SWRlbnRpZmllcldvcHRpb25zXxAZZWxpZ2libGVGb3JQdWJs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D1xkYXRhVHlwZUNvZGXSUFFwcVVOU1NldKJwVNJQUXN0XxASVUFVc2VyQWN0aXZpdHlJbmZvonVUXxASVUFVc2VyQWN0aXZpdHlJbmZvAAgAEQAaACQAKQAyADcASQBMAFEAUwBnAG0ArAC5AL8AygDgAPcA/wEbATMBRgFVAWIBZwFwAX0BhgGOAaMBsgG3Ab4B1QHdAekCAwISAh0CIgIwAjkCTQJPAlECUwJVAlcCWQJaAlsCXQJfAmECYwJlAmcCaAJqAmsCbQJvAnECcgJ0AnYCeAJ6AnwCfgKAAoICgwKKApICnQKeAp8CoQKmArECugLHAsoC0wLaAvcC/AMEAw0DDwMUAxsDHgM0AzsDPQM/A0EDQwNFA2IEFQQaBDAENAQ5BDsEPQQ/BEwEUQRXBFoEXwR0BHcAAAAAAAACAQAAAAAAAAB2AAAAAAAAAAAAAAAAAAAEjA=="
	})
}
Ouvrir dans Cherri Playground Décompilé avec cherri 2.3.0 (GPL-2.0). Quelques corrections peuvent être nécessaires avant la compilation.

Notes et avis

Écrire un avis
–
sur 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aucun avis pour le moment. Sois le premier à partager ton avis !

Publicité

Plus de gramps

Tout afficher

Ça pourrait aussi te plaire

Tout afficher
Publicité