Efty.Edge Posted March 17, 2013 Share Posted March 17, 2013 (edited) Hi. I try to write my first workflow. This one should disconnect my TimeCapsule from the Internet and reconnect it to get a new IP-Address. To get it to work i'm used to put a .jar file in the workflow folder. Then i had to call the file with parameters like that... /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/Java -jar /Users/Thomas/JavaDisconnect.jar 192.168.0.1 Everything works fine when the path to the .jar file is hardcoded as shown above. But if i put the file in the workflow folder, the path looks like that /Users/Thomas/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.971DF35A-C2CD-49FD-9169-55226D1F406A.971DF35A-C2CD-49FD-9169-55226D1F406A Can anyone please give me an advice how to reach the workflow path variable!? Thanx in advance Thomas Edited March 17, 2013 by Thomas Klein Link to comment
jdfwarrior Posted March 17, 2013 Share Posted March 17, 2013 Hi. I try to write my first workflow. This one should disconnect my TimeCapsule from the Internet and reconnect it to get a new IP-Address. To get it to work i'm used to put a .jar file in the workflow folder. Then i had to call the file with parameters like that... /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/Java -jar /Users/Thomas/JavaDisconnect.jar 192.168.0.1 Everything works fine when the path to the .jar file is hardcoded as shown above. But if i put the file in the workflow folder, the path looks like that /Users/Thomas/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.971DF35A-C2CD-49FD-9169-55226D1F406A.971DF35A-C2CD-49FD-9169-55226D1F406A Can anyone please give me an advice how to reach the workflow path variable!? Thanx in advance Thomas When executing scripts, you are running from that path so you could specify path to the java executable and then just give path to the jar file as ./JavaDisconnect.jar or just JavaDisconnect.jar (that is unless you've cd'd out of that path in the script) Link to comment
Efty.Edge Posted March 17, 2013 Author Share Posted March 17, 2013 Hi David. Thank you for your help. It works! And shame on me - the solution was so simple. Thomas Link to comment
jdfwarrior Posted March 17, 2013 Share Posted March 17, 2013 Hi David. Thank you for your help. It works! And shame on me - the solution was so simple. Thomas No worries Glad to help. Let me know if you need anything else. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now