FiPa's Posts[Home]

Who What
FiPa
10 Nov 2012, 13:07
Re: argv - getting the current working dir
ah sorry, argv has the same value like $1 in shell (empty value when you rightclick on empty spaces, location of the file when you rightclick on files)

good luck and thank you :)
FiPa
09 Nov 2012, 08:28
Re: argv - getting the current working dir
hi,
when i right-click on the desktop and choose a shell script:
$PWD returns me the location of the shell script and
$1 returns me an empty string
instead of the finder-location (desktop-dir).

but...
when i right-click on a file on the desktop and choose a shell script:
$PWD returns the same (location of the shell script)
and $1 returns the location of the file (this should be correct).

so i only can get locations of files (when i right-click on them), but not of finder-directories (when i right-click on empty spaces).

argv is the parameter of an applescript, it's the same like $1 in shell scripts.

why i need the location when i click on empty spaces in the finder:
i want to create a menu item to create new (blank) files:
Bildschirmfoto 2012-11-09 um 08.27.14.PNG
Bildschirmfoto 2012-11-09 um 08.27.14.PNG (44.68 KiB) Viewed 4840 times


kind regards
FiPa
07 Nov 2012, 04:06
argv - getting the current working dir
hi,
i try to make a "new file" menu and for that i have to know from where i am calling this menu.
this is working fine when i ctrl-click on a file (then i get the full file path), but its not working, when i click on empty space (on finder).
i've tried it with:
defaults write com.finderpop.finderpop useOSADoScriptFile -bool true

but this changes nothing.
in older versions it worked with following applescript:
Code:
on run argv
   do shell script "php -f /Users/.../Scripts/FinderPop/CreateFile.php -- "" & argv & "" txt"
end run


but now its not.
my checksum shell script is working fine:
Code:
cs=`md5 "$1"`
cs=${cs/*=}
terminal-notifier -message "$cs" -title "Checksum" -subtitle "$1"

cause i have to click on a file for that.

how can i get the working dir now (in the newest version)?

i couldnt understand this:
viewtopic.php?f=3&t=255&p=1136&hilit=argv

thanks for your support :)
FiPa
07 Nov 2012, 03:13
Re: FinderPop is not working
amazing, it worked :D
thank you!
FiPa
06 Nov 2012, 20:21
Re: FinderPop is not working
so before i updated it to the newest version it worked in the menubar... after the update it works nowhere.
coords 0,0 shows me the nativ menu of mountain lion.

thanks for your reply, i thought i will get an email (notify), when someone replies, but i didn't :P
therefore my answer cames a little late.

kind regards
FiPa
03 Nov 2012, 08:39
FinderPop is not working
Hi,
I have a Macbook Air with Mountain Lion (last version).
i had the old finderpop, first, i overwrote it, now i tested it with uninstalling first.
i uninstalled the old one, and installed the newest version of finderpop (FP246, by the way, the website is offline)
the installation was easy and worked fine, but i cant see any contextmenu anywhere, even when i put files in the finderpop items folder.
i read the readme file.
System Preferences -> Keyboard Shortcuts -> Services ->
Files & Folders -> (ensure "Folder Actions Setup" is checked.

this was checked

what can i do now? it worked for me in older versions and i loved it :(

kind regards