Haze won't use killall?

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Haze won't use killall? Wed Apr 22, 2015 12:16 am • by samdaman222
Hi all, new to Hazel, love playing around with it so far.

I am wanting to shut down a program following a folder having less than 1 file present. However, the kill all function isn't working at all. I've tried for various programs but to no avail, I've checked the logs and it says the command was run. killall works on Terminal for the program, just not under Haze.

Any advice? I've tried using applescripts as well as a simple shell as well as the various variations of killall but nothing seems to be working!
samdaman222
 
Posts: 2
Joined: Wed Apr 22, 2015 12:12 am

Re: Haze won't use killall? Wed Apr 22, 2015 10:40 am • by Mr_Noodle
Is there an error? Try enabling debug mode (see sticky article up top) and looking at the logs.
Mr_Noodle
Site Admin
 
Posts: 11867
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Haze won't use killall? Thu Apr 23, 2015 3:27 am • by samdaman222
Hi, no errors, I've done some tweaking, and it seems to work, but it's killing the program now too early. Is there any way to delay the script from being carried out? say 2 minutes and then check if the conditions are met or not?

Basically I have the conditions checking the status of a folder, if the folder is empty, and X program is running, then X is killall'd if the folder has one or more files, then the program remains running until the condition is met.. However, when the program starts doing what it's doing, the files are not put into that folder until about 30 seconds later.

The conditions then work well, however, shut the program down, before it gets started.
samdaman222
 
Posts: 2
Joined: Wed Apr 22, 2015 12:12 am

Re: Haze won't use killall? Thu Apr 23, 2015 11:03 am • by Mr_Noodle
You'd have to add it to the script unless you can think of a way to do it in the conditions with one of the date attributes.
Mr_Noodle
Site Admin
 
Posts: 11867
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support