Applescript to detect network/internet connection?

I created a simple app using Applecsript to mount my iDisk volume on startup.
mount volume "https://idisk.me.com/username"
Works a treat and I use it on my iMac and Alu MacBook. However, there will always be a situation where I'm connected to a network, but not the internet - EG: My universities Wireless network, where I have to goto the student login page before internet access outside of the university system is granted.
So for the Applescript on my MacBook I want it to detect if it has an internet connection. I was thinking possibly sending a Ping to the idisk location. Anyone have any idea how to do this?
Thanks
~Ben

Oh yes I am aware of the network icon rather than the iDisk icon. But I did it this way for security reasons.
If I had my username and password in the script then anyone who got hold of the script could just double click it and have full access to my iDisk. This way, the computer its running on must be connected to the corresponding MobileMe account for that iDisk.
I'm also not too fussed about the icon, I set a custom one (copy paste into the get info box) which thankfully remains persistant across all machines that connect to match the rest of the pack I downloaded. http://cavemanmac.deviantart.com/art/OLED-Drives-144076760?q=&qo= (if you're curious)
I also had no idea that Applescript automatically detected errors when doing a shell script. So on 100% packet loss it ended the script then and there.
Thanks
Works a treat

Similar Messages

  • Detect enabled internet connection sharing (hotspot usage) on Windows Phone 8.1

    My WindowsPhone 8.1 application displays the current network/internet connection (e.g. the SSID/connection profile when connected to a WLAN). For retrieving this information, I use the following snippet:
    var ssid= ""
    foreach (var connectionProfile in NetworkInformation.GetConnectionProfiles())
    if (connectionProfile.IsWlanConnectionProfile && connectionProfile.GetNetworkConnectivityLevel() != NetworkConnectivityLevel.None)
    ssid = connectionProfile.ProfileName;
    break;
    I'd like to show some additional info when the phone has internet sharing enabled (acts as hotspot). What's the most reliable way to find this out?

    Hi Ronald,
    I think there is no way to detect if windows phone enable the internet sharing, if you want customer know the current state, you can consider about this:
    How to use the connection settings task for Windows Phone 8 to navigate user to the connection setting page.
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Adobe creative cloud desktop is not detecting my internet connection?

    adobe creative cloud desktop is not detecting my internet connection?

    i connected with the adobe people through 'contact an agent'.
    very helpful, they remote managed my desktop to fix the issue.
    apparently something to do with permissions not activated for adobe, not sure how and why this happens though, or why it was fine earlier and suddenly stoppped.
    they insisted it was to do with being on a wifi connection but that's not possible because i have my laptop right next to my desktop and that was working fine.
    it took about four hours to fix though, so be patient!

  • Network/Internet Connection Drops

    I've been having this for a long while (>6 months) but it hasn't bugged me too much until now.
    Symptoms: Network/internet connection just goes away.
    When: After about 5-30 minutes that the computer is on (maybe longer sometimes).
    Activity: Anything to nothing. Sometimes it's been idle for hours and it just doesn't connect.
    Recovery: Reboot works every time. Any amount of fiddling with the network connections fails. Looking at the system preferences shows the connection is still valid. If I change locations, nothing happens. If I try to ping my router, time-out.
    I'm thinking it has to be related to an update some time ago as I don't have much 3rd party stuff in the mix. Running straight LAN connection to Linksys using static IP.
    Yes I know the Linksys and my cable modem are fine as the other 3 computers that I have experience no interruptions.
    This is starting to get very annoying.

    Ok - long-shot here...
    I recently started having problems with my macbook pro dropping internet (connected via Airport to TC). My iMac (also connected via airport to TC) had no issues.
    I run 2 wifi networks using TC, a 'full-up' network and a guest (internet only) network. So I tried switching to the internet only network - hey presto! no probs...
    So what is different between the 2 networks - well, I had started messing about with Back to Mac and remote login/file sharing between the laptop and imac. Although I had given up trying to make it all work, it was clearly trying to establish connectivity in the background, thus presumably interfering with the connection for internet that I was using actively on the laptop.
    After turning all file/screen sharing and back to mac off the problem was resolved. Luckily I am still able to access my TC as network storage between both my imac and laptop and I have moved back to my 'full up' wifi network......touch wood, problem resolved.

  • 4S Verizon Network / Internet Connectivity Issues?

    I have been having problems with what appears to be Verizon Network/Internet Connectivity issues. I am located in northern Colorado, using an iPhone 4S with a Mophie Air battery backup/case.
    I am in a solid 4G area (even though the phone is 3G) and I have not had any problems with any connection issues, until last night. I still see three bars of 3G service on the phone indicator area...so it is decieving. 
    I can still recieve emails, text messages, and phone calls, but nothing that uses the internet will work.  All apps seem to try to open and try to update, but the whizzy-wheel indicator just sits and spins until I get a "Network Error" message or a time out error of some kind. Most error pop-ups are saying to check the internet settings and try again. Ugh!
    Also, since it seems to be trying to recognize the network all the time (even when all tasks are killed and nothing should be running), my battery is going down MUCH faster today! I took it off of the charger at 7am and it was down to 20% battery in only 4 hours! Then I turned on the battery backup, and it is quickly using that up too! At this rate my phone will be completely DEAD by the time I leave work today, and I haven't even used it for anything all day (except to try to connect to the web a few times - testing)!
    I have tried the following so far to try to regain internet through the Verizon network, to no avail:
    checked for software updates...phone was up to date with iOS 6.0.1
    checked my firmware version (it is 3.0.04)
    killed all background/running apps (with the home button double-click/hold icon/end)
    "reset" my phone via a couple of methods (both the regular power off option and the force-power off option).
    *228, option 2 (to reset Roaming)
    cleared all data cache areas/cookies/etc.
    Cellular data is set to "On"; Roaming is set to "On" for all options;
    I have a 64GB device (57.3 usable capacity) of which I still show 46.2 available.
    WiFi is set to "Off" (although I can use WiFi at home with no problem if I need to, but I shouldn't have to!)
    Airplane Mode is set to "Off"; Restrictions are set to "Off"; Bluetooth is set to "Off"
    Basically, there is NO REASON my phone should be having connection issues! 
    PLEASE HELP?!!

    I tried everything you did and more, i thought i had it working, but i got a voicemail today and when i went to open it earlier it just has the wheel loading forever and then says it cant onnect to voicemail. the searching does make it wear down the battery faster as well.  i can get calls, texts etc, but i cant help but think there are a few bugs with the ios 6.01 software

  • I have downloaded itunes, however everytime I open it up deos not detect my internet connection even though it is running?

    I have downloaded itunes, however everytime I open it up deos not detect my internet connection even though it is running.  I can goto other sites when I open up explorer, but itunes just will not connect.  Could someone assist?  I have windows 7.

    Set it up with SMB compliant names.. that means, short, no spaces and pure alphanumeric.
    Set a different name for 2.4ghz and 5ghz..
    Set security to WPA2 personal with pure alphanumeric password.. 10-20 characters is usually plenty.
    Set wireless channel for 2.4ghz to manual and try channels 11, 6, 1 in that order.

  • Latest version of Itunes doesn't detect my internet connection.

    Itunes doesn't detect/see my internet connection. I reloaded it twice, When in Itunes, I can't download anything from the Itunes site. No tutorials,no software updates, nada! I tried it in the previous version of the Itunes setup too. Same problem.
    I have an HP laptop, Vista Home premium (works fine anywhere else), Nortons 36O (disabled), ATT DSL
    I am running Firefox too, and tried to connect with Internet Explorer 9.xx, didn't work either. Some of the messages indicate that the Proxy Server info is missing/incorrect as configured. This is out of my league. I don't have enough background to TS this issue myself.
    Seems like a sporatic, but common problem with other users as well. I need Itunes to run, correctly so that I can fix my Iphone. The limited diagnostics found in Itunes tells me that the phone is ok and communicates with the test software. But I can't get any deeper than that.
    Thank you for your help.

    I think you're missing the point. If you rip or purchase music at 128k, 256k, 320k etc. then there is no benefit to be had converting it to Apple Lossless. The files will get bigger but the data thrown away to make the previous lossy version cannot be reclaimed. If, on the other hand, you routinely rip in .wav or .aiff then you should end up with smaller files of the same quality which is indeed worth the effort.
    tt2

  • Detect wireless Internet connection in AIR application

    Hi All,
    I am facing challenges to determine whether Internet connection is available over a Wireless connection. Even if I am connected, I get the status as Not Connected.
    However the same is working absolutely find when I am connected to Wired network.
    Can any one advice how should I proceed?
    I am using the below code for tracking network connection:
         //check for network availability
         NativeApplication.nativeApplication.addEventListener(Event.NETWORK_CHANGE, onNetworkChange);
        monitor = new URLMonitor(new URLRequest('http://www.google.co.in'));
        monitor.addEventListener(StatusEvent.STATUS, announceStatus);
        monitor.start();
        requestLoader.addEventListener(Event.COMPLETE, requestCompleteHandler);
        requestLoader.addEventListener(IOErrorEvent.IO_ERROR, requestErrorHandler);              
        requestLoader.load(request);
        requestLoader.addEventListener(Event.COMPLETE, setInitStatusMsg);
    The corresponding methods have been set to set the boolean flag.
    Thanks,
    Hitesh Patel.

    Hi All,
    Thanks for your inputs.
    However I resolved the issue. The problem was with my code. I somehow missed the "requestCompleteHandler" function and hence when the request was completed the status was not refreshing. Its working fine now.
    Thanks,
    Hitesh Patel.

  • Detecting an internet connection

    How can i detect whether an internet connection is active?

    I am using JDK 1.3.1. This does not seem to be available. Any other ideas?

  • How to detect an Internet connection?

    I want to create an application which calculate the time of a Internet connection but I don't know how to detect it! Help me, thanks.

    Not surprising since there is no such thing.
    Connections only go from computer to computer. When you send email your computer connects to a computer. And it sends the email to it.
    When you try to connect to www.yahoo.com your computer connects to a computer. It gets an address. Then it tries to connect to that address.
    And every time I said 'connect' about there are very likely other "computers" involved in the transaction.
    And if any of those devices fail then you won't connect.
    Notice in the above that there is no "internet". There are just computers and connections.
    So now that you know what is happening you will now know how to code your own solution.
    Or you can provide more detail as to exactly what you are trying to determine so that a more specific answer can be given.

  • LELA Not Detecting an Internet Connection, yet is connected?

    I use a WRT54GS wireless router, and recently it's been going slow. I went to go restart the router as we had to so many times before, and realized that the internet was not connected(or at least, that's what it said). So I figured, oh, that's why it's not working! After going through the restart process 3 times, I still couldn't connect. I looked down at my taskbar and it said that I had an internet connection. So I clicked on Internet Explorer and to my surprise I was indeed connected to the internet.
    So now, I sit here typing this, on the computer which is supposed to have no internet, and cannot send an internet connection to any of my other wireless devices because LELA says I have none. I've tried reseting the modem and all that, but to no avail. Any help as to why this is?

    Thank you very much jscell and Dr. Clap
    No, because that is a conceptual rather than a realconcept<
    I tend to disagree somewhat � it is a conceptual as
    well as a very real concept. I am using this concept
    and it works(still in the trial phase though). The
    only problem is the pop-up Windows dialog box.Yes but you computer doesn't connect to the "internet". It connects to another computer. That is all it can do because that is how IP works (tunneled or not.)
    >
    If you want to monitor traffic via java then youwould have to use JNI.<
    Thanks for this. I�ll have a look at this. A piece of
    code to get me started on this would be appreciated.I am not sure it exists. But if you want you can look at http://netresearch.ics.uci.edu/kfujii/jpcap/doc/index.html
    >
    And you should be able to configure it so that itdoesn't ask you, but just automatically makes the
    connection. How?<
    Yes Dr. Clap, you may be right. I was hoping there was
    somehow a way out without fiddling around with the
    property settings. I am sure there is, but not in java. So doing it in java would require JNI (and a lot of digging to figure out how to do it using the windows C API.)

  • Easylink does not detect internet connection

    Please help. I have a wireless G broadband router model wrt54g. I've had it for about a year in a half and used it maybe twice. I just ran the setup and got an error saying easylink does not detect your internet connection. I went on line to make sure I was connected and followed the steps to resolve this issue. I got a message saying congratulations your router was configured succesfully but you are not yet connected to the internet. I went online to try and get help with this issue and downloaded firmware. My comptuer won't even allow me to run the download, it just does nothing when I click on it. Could someone please advise me as to how to get this router to detect my internet connection. Thanks

    Who is your Internet Service Provider..?
    Are you getting the internet connection,when you connect the computer to the modem directly...?
    If your Internet Service Provider is Cable follow this link
    If your Internet Service Provider is DSL follow this link 

  • Desktop software cannot detect internet connection

    I've successfully installed destop manager on my home computer (Windows Vista) and synced with Outlook.  Tried to do the same on my office computer (Windows XP).  All went well until I tried to sync for the first time.  I got an error message saying that the desktop manager could not detect an internet connection. 

    This was fixed,  See: "The computer must be connected to the Internet in order to initially" page 5. 

  • WRT54GS - no internet connection detected yet my wired computer connects to internet through router

    I have had my router for a little over a year. I am connected to a wild blue satellite modem. It has worked with no problem for a year.  Now, it claims to not detect an internet connection, although the computer wired to the router has no problem connecting to the internet. I just cannot connect wireless to the internet because the router thinks it has no internet connection. I have reset several times, powered on and off modem, followed all instructions for troubleshooting. All lights are lit on both the modem and the router. Do I need to replace the router, or would I encounter the same issues with a new one?
    Solved!
    Go to Solution.

    My other computer is connecting now, although EasyLink still shows no internet connection.  However, as long as I can get a connection, I do not care. I have no idea why it is working now and not before.  I do not know if my husband's laptop will connect yet, but something seems to be working.

  • (Tutorial) Share your Internet connection

    Share my Internet access of the Wi-Fi via an Ethernet cable (RJ-45) to another laptop/PC.
    Please follow the following steps:
    1.   Connect your shared laptop to another laptop/PC by using an RJ-45 Ethernet cable connecting to each other.
    2.At first, you’ll see both systems show the network is limited. It’s normal.
    3. In the system of the shared laptop, right-click the Wi-Fi icon and select Open Network and Sharing Centerto open its window. Then, click your Wi-Fi network.
    4. In Wi-Fi Status window, select Properties to open Wi-Fi Properties window.
    5. In Wi-Fi Propertieswindow, select Sharingtab and check Allow other network users to connect through this computer’s Internet connectionto share the Wi-Fi.
    6. Now another computer which connected to your shared laptop should automatically detect the connection to Internet.
    7. If another computer still shows the network is limited, please select Diagnosebutton to ask Windows for help and follow the instructions to fix the problem. Usually, the Windows will reset the Ethernet and re-detect the Internet connection again.
    8. Instruction ended.

    While turning cellular data off will keep your phone from connecting to cellular data WHEN wifi disconnects, it DOES not keep the Galaxy Note 3 from continually disconnecting from wifi. This only results in repeated periods of no data connectivity.
    Turning off cellular data does not fix the wifi stability issue on the Galaxy Note 3. It will simply connect to wifi for a time, drop connection, reestablish a new connection for a time, drop connection, etc... If you are using a data connection during the cycling period, your app will simply come back with a message that no data connection is available and to try again later.
    This is a major reason I have discontinued use of a Galaxy Note 3.

Maybe you are looking for

  • Multiple views in single View Container

    Hi Experts, Is it possible to display multiple views in single view container.!! . I want to display 2  views in a view container based on condition. Please suggest me how to achieve this. Thanks, Regards, Ram.

  • How to handle errno in native function?

    How to get the correct errno in a native function? I'm using Unix message queues in my native methods and I always get the errno = 0 (it should be ENOMSG = 35) returned when the desired message is not yet available (calling msgrcv with IPC_NOWAIT set

  • MAS_CUSTOMIZATION fails to generate backend adapter related classes

    Hello experts, During sdoe mobile sales software component generationg, I got an syntax error during MAS_CUSTOMIZATION backend adapter related classes generation, which reports syntax error. The error messages are -Class ZDOECL_013_001_0_BW, Method M

  • What to close first? DB or Listener

    Hi! In eBS ,when we want to restart the UNIX server, we must close all Apps tier services first. Then I am confused which one to close next: the DB or the listner (addbctl.sh OR adlnctl.sh) Thank you

  • REST API List Column Names

    I have a column in a list named 'Position'. But I can't use that name in the REST query for some reason. I did some investigation and found it's named something else in the API. For example this doesn't work: http://dev.spdev.local/sites/test/_api/we