Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating Computer to computer airport network via script



Hi, I have been trying to create an applescript to automatically create a computer to computer (ad-hoc) network, I have it mostly working in leopard (except I can't get it to set the name or click the ok button), but it fails in tiger... can anyone help me with this?

here is the script I have, perhaps there is a better way? I would like it to work in both 10.4 and 10.5... It would also be nice if the user did not have to click the ok button, and even nicer if the script could set the name of the network...

tell application "System Events" to tell process "SystemUIServer"
tell menu bar 1
set menu_extras to value of attribute "AXDescription" of menu bar items
repeat with the_menu from 1 to the count of menu_extras
if item the_menu of menu_extras is "Airport Menu Extra" then exit repeat
end repeat
tell menu bar item the_menu
click
delay 1
click menu item "Create Network…" of front menu
delay 1
end tell
end tell
end tell



Thanks, Rich Simpson


_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Studio mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.