Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old May 13, 2013, 04:25 PM   #1
lokiju
macrumors 6502
 
Join Date: Jun 2008
ML: Launch App via Term locally works, via SSH not fully. Help!

I'm about to go mad here with how much time I've spent on this already.

I need a way to restart my Time Capsule remotely from time to time to resolve some networking issues that creep up since it's my main router as well.

I've created a AppleScript and it works fine in both the .scpt and .app formats you can export it as, except ONLY when executed locally on the Mac the script resides on.

If I SSH in from another Mac or whatever and do for example...
open ./RestartNetwork.app <enter> (In this example, it's in my users home directory and the AppleScript is in a .app format)

It'll actually launch the application (Airport Utility) but will not complete the steps as desired and as it does when executed locally via Terminal or just double clicking on it.

Here's the code.

Code:
activate application "AirPort Utility"
delay 4
tell application "System Events"
	click image 2 of group 1 of scroll area 1 of window 1 of application process "AirPort Utility"
	delay 3
	click menu item 3 of menu "Base Station" of menu bar 1 of application process "AirPort Utility"
	delay 1
	keystroke tab
	keystroke tab
	keystroke space
end tell
My only thoughts are either it's a timing issue and I need to increase the delays or executing via ssh remotely does something different user wise and results in it not fully working.

Does anyone have any suggestions?
lokiju is offline   0 Reply With Quote
Old May 14, 2013, 10:04 AM   #2
lokiju
Thread Starter
macrumors 6502
 
Join Date: Jun 2008
Anyone out there have any suggestions? Is there maybe a better section to post this in?

There's been nearly 600 views of this but not a single reply. Surely there has there must be someone who can give some suggestions...
lokiju is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Unlock 5S ATT fully works with Tmobile? note235 iPhone 11 Apr 26, 2014 12:21 AM
SSH Control - ssh/telnet remote control app for iOS Velestar iPhone and iPod touch Apps 0 Jan 23, 2014 03:43 AM
How to Access Same Website Locally and Non-locally? fastpurplemedia Web Design and Development 3 May 30, 2013 08:10 PM
Best PDF study app which locally stores PDFs? Iphone4sinwhite iPad Apps 5 May 21, 2013 08:15 AM
Alternative to Magic Mouse that works fully in ML and can track on glass? jaybar Mac Peripherals 1 Aug 17, 2012 10:52 AM

Forum Jump

All times are GMT -5. The time now is 05:39 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC