Citat:
Ursprungligen postat av Sllone
Tack.. Inte vad jag frågade dock,
När jag går in i GeekTool och lägger in ett Shell på skrivbordet, vad skriver jag i Command rutan för att länka de scriptet som jag har i någon mapp någonstans till skrivbordet?
Ta istället koden från en av länkarna och använd den, så slipper du fundera på det
Kopiera in detta:
#!/bin/sh
osascript -e 'set a to do shell script "ioreg -w0 -l | grep Capacity"' -e "set h to word 5 of a" -e "set z to word 33 of a" -e "set b to word 38 of a" -e "set c to 1000 * b / z" -e "set d to round c" -e "set f to d / 10" -e "set q to 1000 * h / b" -e "set w to round q" -e "set j to w / 10" -e '"Battery Charge: " & j &"%"' | iconv -f utf-8 -t ucs-2-internal