The ModMyTM Family of Sites:
ModMyMotoModMyiModMyGphone




 
 
Register or Connect with Facebook

Discuss AppStore Apps | Browse / Search Cydia | MMi Cydia Stats




  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > OS X > Mac Tips, Tricks & Mods
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 02-07-2009, 11:30 PM
n00neimp0rtant's Avatar
My iPhone is a Part of Me
 
Join Date: Feb 2008
Device + Firmware: iPhone 3G 8GB 3.0 on T-Mobile
Operating System: OS X 10.5.6
Location: South Park (no, really)
Posts: 606
Thanks: 13
Thanked 32 Times in 28 Posts
Send a message via AIM to n00neimp0rtant
Create Wifi network through Terminal

How can I replicate the "Create Network..." option under the AirPort icon on the menu bar in Terminal? I want to start an ad hoc network through Terminal.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #2  
Old 02-14-2009, 08:51 PM
him121213's Avatar
BanHammr Immune
 
Join Date: Oct 2008
Device + Firmware: iPhone 3GS (White) 3.0 JB/Unlocked
Operating System: Mac OS X 10.5.8 (Leopard)/Fedora 10/FreeBSD 7.1/Debian 5.0
Location: Buffalo
Posts: 2,240
Thanks: 72
Thanked 230 Times in 194 Posts
Send a message via AIM to him121213 Send a message via MSN to him121213 Send a message via Yahoo to him121213 Send a message via Skype™ to him121213

why cant you just use the menu button?

im not sure exactly how to do it but heres how to do it with apple script



-- This script creates an ad-hoc network with a password and changes your
-- network location.
--
-- I just added network passwords and network locations to a script which
-- comes from StefanK:
-- MacScripter / creating ad-hoc airport network from script

-- Set NetworkName to be the name of the wireless network you wish
-- to create. This will also attempt to set the network location
-- to that name as well.
-- Set NetworkPassword to be your wireless network password. It MUST BE
-- 13 characters long (or 26 hex digits).

property NetworkName : "MyAdHocNetwork"
property NetworkPassword : "thirteenchars"


property CreateMenuName : "Create Network…"

try
do shell script "/usr/sbin/scselect " & NetworkName
delay 2
end try

tell application "System Events"
tell process "SystemUIServer"
tell menu bar 1
set menu_extras to value of attribute "Aescription" 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
perform action "AXPress"
delay 0.2
perform action "AXPress" of menu item CreateMenuName of menu 1
end tell
end tell
repeat until exists window 1
delay 0.5
end repeat
tell window 1
keystroke NetworkName
click checkbox 1
keystroke NetworkPassword
keystroke tab
keystroke NetworkPassword
click pop up button 2
click menu item 2 of menu 1 of pop up button 2
delay 0.5

click button 1
end tell
end tell
end tell
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
Reply

  Apple Forums & iPhone Forums, Mods, Hacks, News, Themes, Downloads, and more! | ModMyi.com > OS X > Mac Tips, Tricks & Mods

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



Go to Top
ModMyI

All times are GMT -6. The time now is 05:14 AM. Powered by vBulletin® Version 3.8.4
If you need Dedicated Server Hosting, you should check out SingleHop. | Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 Copyright © 2007-09 by ModMy, LLC. All rights reserved.

iPhone News / iPhone Forums / Apple News / Apple Forums / RSS / Contact Us / / Privacy Statement / Top