Hi, I am having problem.... I have placed the folder containing the required files in - /Users/Piyush/Downloads/Geek tool/Battery.......... (do i have to type first "/" in script file)....
I think so my shell script is not working...... using geektool.... i have inserted shell geeklet and in the command box i have typed..... osascript /Users/Piyush/Downloads/Geek tool/Battery/battImage.scpt
Where am i going wrong.... i have the battery line which shows 100%..... the bar doesnt decrease even if the battery is zero..... it remains at 100% all the time.... Can anyone please help me... Thank in advance
The problem is with the defined directory path. In general, its advised not to name folders that and and files with spaces for this specific reason.
The way to solve the problem, if you don't want to change the name of the folder, is place a \ right before tool in the read line. The way I would do it, is by changing the name of the folder "Geek tool" to something without a space (mine is "GeekTool).
--
AppleViews: [link] (Seeing Apple Differently)
--
AppleViews: [link] (Seeing Apple Differently)
I think so my shell script is not working...... using geektool.... i have inserted shell geeklet and in the command box i have typed..... osascript /Users/Piyush/Downloads/Geek tool/Battery/battImage.scpt
Where am i going wrong.... i have the battery line which shows 100%..... the bar doesnt decrease even if the battery is zero..... it remains at 100% all the time.... Can anyone please help me...
Thank in advance
" tell current application
read "/Users/Piyush/Downloads/Geek tool/Battery/getBattLevel.txt"
--> "pmset -g ps | sed -n 's/.*[[:blank:]]+*\\(.*%\\).*/\\1/p'"
do shell script "pmset -g ps | sed -n 's/.*[[:blank:]]+*\\(.*%\\).*/\\1/p'"
--> "95%"
do shell script "cp /Users/Piyush/Downloads/Geek tool/Battery/Images/95.png /Users/Piyush/Downloads/Geek tool/Battery/temp.png"
--> error "usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory" number 64"
Its able to retrieve battery percentage which is "95%", but not able to produce image 95.png
The way to solve the problem, if you don't want to change the name of the folder, is place a \ right before tool in the read line. The way I would do it, is by changing the name of the folder "Geek tool" to something without a space (mine is "GeekTool).
p.s Im in love with your battery indicator
--
Deviant | Rainmeter Advocate | Proud Native