Using autoscript to mail turn notices in a game

Hi,
I'd like to host a game of Dominions 3, which is a fun turn-based strategy game.
Normally servers are set to host after everyone has taken their turn, or a period of time, and then turn notice is mailed to everyone still active in the game.
So i need to make an Applescript that would let me mail a notice upon receiving a system event from said game. BTW, the game is a multiplatform game that has binaries for OSX, Windows, and Linux.
I have never made an Applescript before so a few pointers would be most appreciated! Thanks.

Sorry, I did not see the code format.
     * Recieves messages from the server
    public void run() {
        try {
      while (true) {
       String line = (i.readUTF ());
        outputText.appendText (line + "\n");
    } catch (IOException ex) {
      ex.printStackTrace ();
    } finally {
      listener = null;
      inputText.hide ();
      validate ();
      try {
        o.close ();
      } catch (IOException ex) {
        ex.printStackTrace ();
     * Handles user interation
    public boolean handleEvent (Event e) {
    if ((e.target == inputText) && (e.id == Event.ACTION_EVENT)) {
        System.out.println(e.target + " " + e.id);
      try {
       o.writeUTF (user + ": " + (String) e.arg);
        o.flush ();
      } catch (IOException ex) {
        ex.printStackTrace();
        listener.stop ();
      inputText.setText ("");
      return true;
    } else if ((e.target == this) && (e.id == Event.WINDOW_DESTROY)) {
      if (listener != null)
        listener.stop ();
      hide ();
      return true;
    return super.handleEvent (e);
  }

Similar Messages

  • HT1677 In order to use Yahoo! Mail, please turn Private Browsing off. Please go to Settings » Safari » Private Browsing, and turn it off.

    In order to use Yahoo! Mail, please turn Private Browsing off. Please go to Settings » Safari » Private Browsing, and turn it off.
    Would this not make my privacy vulnerable?

    With iOS 7 on the iPad, you turn Private  Browsing on and off by tapping the URL field.  The screen that  opens up has your bookmarks on it.  In the bottom left corner is a hot button marked 'PRIVATE'.  Tap on the word 'PRIVATE' to turn private browsing on or off.  Yeah, there aren't any instructions anywhere that I can find to do this, and if you follow Yahoo's instructions, they don't work.  This doesn't happen with the previous Apple OS, and you can restore your iPad to the older OS. 

  • My iPhone has suddenly started sending emails in Courier New (rather than the standard Arial).  They appear in Arial when I compose them, but turn to Courier new in the sent folder and when displayed to the recipient.  I use Yahoo Mobile Mail.  Help!

    My iPhone has suddenly started sending emails in Courier New (rather than the standard Arial).  They appear in Arial when I compose them, but turn to Courier new in the sent folder and when displayed to the recipient.  I use Yahoo Mobile Mail.  Help!  How can I change the settings so that the sent emails go back to Arial?  Thank you!

    I'm not sure if it's a Yahoo Mobile mail or an iphone issue... have asked the Yahoo forum but no replies yet...  Any help appreciated!

  • TS1398 I can't use my yahoo mail.  it says to turn private browsing off. it says to go to settings, safari, private browsing.  mind dosen't have private browsing.

    I can't use my yahoo mail.  it says to turn private browsing off. it says to go to settings, safari, private browsing.  mind dosen't have private browsing.

    Make sure Private Browsing is off.
    Tap "Private" on Safari Screen to disable Private Browsing. When top of screen is white, Private Browsing is off.

  • Many of us know Outlook mails can be stored using a PST Mail app to review the old mails when needed on an iPad. I am considering a switch to Mac OS. But I am wondering if the same is possible with the mbox files.

    Many of us know Outlook mails (pst files) can be stored using a PST Mail app to review the old mails when needed on an iPad. I am considering a switch to Mac OS. But I am wondering if the same is possible. What would be the file format of the emails on a Mac OS and the app equivalent of the PST Mail app? Thanks for helping me out. Durai

    clw51 wrote:
    Thanks for your response and yes I understand what you are saying. Maybe you could explain why "email users" hate HTML email with a passion.
    These tend to be technical users who have a more purist attitude about email. They prefer that email be text-only, and consider HTML formatting to be superfluous for most messages. And I do think they have a point. If you have 100 plain-text emails and 100 HTML emails, you will notice that the HTML emails take up noticeably more disk space. And if the HTML email senders have loaded down their default emails with background images, signatures with corporate logos and winmail.dat attachments and all manner of embedded ornamentation, and (I never even thought people went this far) animations, then a simple email reply like "Thanks! I'll see you this evening," ends up carrying an tremendous additional amount of file size and network bandwidth overhead just to carry those six words. It not only means more disk space consumed, but it ripples all through the system: More space is required for backing up and archiving your emails, plus more mail server space and network bandwidth are consumed per message. Purists see this as an incredible waste of resources.
    The message body of at text email can simply be "Thanks! I'll see you this evening."
    The HTML version, at a bare minimum, must be
    {html}
    {p}"Thanks! I'll see you this evening."{/p}
    {/html}
    (replaced angle brackets with curly brackets so Apple Forums won't try and format it)
    Already that's almost double the amount of characters required to send the message, just to format it in HTML. And that's if no fonts, styles, graphics, or media have been applied. If they are, the number of actual characters sent balloons dramatically.
    I'm in the middle. I don't hate HTML email, I'll even turn it on when I think formatting will help my message. But I like to use disk space efficiently, so I've set plain text as my default for sending messages.

  • How to I get a link with a "Mail to" address to open up a Compose window in my Yahoo mail, rather than in the Mail progrom on my Mac. I do not use the Mac Mail program.

    How to I get a link with a "Mail to" address to open up a Compose window in my Yahoo mail, rather than in the Mail progrom on my Mac. I do not use the Mac Mail program.
    == This happened ==
    Not sure how often
    == always

    Thank you, "the-edmeister" -- You render a great service, one that lifts my spirits.
    Your answer also taught me to be a little more persistent, as I had started looking at Preferences, and just didn't notice the icons (including Applications) at the top of that window that would have led me to my answer.
    Dave

  • How do I use the „Apple Mail To Do" Folder on multiple Macs?

    Hi,
    I'm using the Apple Mail To Do Folder respectively the "To Do" function in mail on my iMac and my MacBook. I will find To Dos created on the MacBook in the "Apple Mail To Do" Folder on my iMac, but the iMac doesn't show these To Dos in the associated mails. Same happens for To Dos created on the iMac when I try to use them with the MacBook. Any hint?
    Thanks.

    Turning the mail account off does not really solve this problem. All the snooper has to do if the mail account is turned off is to turn it back on, read messages and then turn it off again.
    If the Apple mail works like other mail systems, you can mark read messages as unread. Then you really won't have any way of knowing that your messages were read already.
    The simple solution is (wondering why Apple has not implemented it) is to remove the password in the Mail settings so that each time the Mail is opened, it will ask for a username and password.

  • When using rogers.yahoo mail, I need to refresh my screen after every 2-3 actions.

    While using Rogers.yahoo mail in FireFox, the screen freezes after every 2-3 actions (read email, delete email, respond to email, move email to folder etc.). I have to refresh the screen and then it goes along for another 2-3 actions and I have to refresh again. Very frustrating. I opened the same email account in Google Chrome and IE and it works fine there. This started happening yesterday.
    In perhaps an unrelated thing, I get this error message every day, once, when I start up my PC for the past 2 months:
    Microsoft.NET Framework
    Unhanded exception has occurred in your application If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately. Unable to load DLL 'hppatusg01.dll': The specified module could not be found (Exception from HRESULT:0x8007007E)

    No problem.
    If the above does not fix the issue, '''try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings and disables most add-ons (extensions and themes).
    ''(If you're using an added theme, switch to the Default theme.)''
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu by clicking on the '''Restart with Add-ons Disabled...''' menu item:<br>
    [[Image:FirefoxSafeMode|width=520]]<br><br>
    If Firefox is not running, you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.
    Thank you.

  • How can I attach an image without the image is in the email body? (using the new mail the Lion)

    How can I attach an image without the image is in the email body? (using the new mail the Lion)
    I want in attachment, not in the body mail.

    I think your only solution is to zip the image files first and then attach them.
    Read this from a site I found:
    Sending Graphical Attachments -- When you attach a graphical image to your message, the recipient of your message sees the image inline (that is, in the body of the message) if her email client supports inline display. ("Take Control of Email with Apple Mail" contains a table listing the capabilities of popular Mac and PC email clients.) If a client does not support inline display (or the recipient has turned off the inline display option), the file appears as an attachment that must be opened in a separate program.
    On the one hand, an inline image is easier for the recipient to see - all she has to do is look at it. On the other hand, inline images can be frustrating to scroll through. If you do not wish to send a graphical image inline, you must compress the file before attaching it - Mail, sadly, lacks a built-in compression option, though fortunately for Panther users, the Finder offers Zip compression without requiring a separate application.
    Note that when you compose a new message, Mail always shows attachments in the body of your message. You can manually drag them somewhere else, but many email clients display all attachments in a separate list, regardless of where you place them in the message body.
    If you paste an image into a message or drag & drop an image from another window (say, a Web browser), Mail converts the raw image data to an attachment in TIFF format. On the other hand, if you drag & drop the icon of an image file (or use the Attach button to locate the file using the file browser), Mail leaves the attached image in its original format. This difference is significant, because although most email clients can display JPEG images just fine, support for TIFF - especially in non-Mac email clients - is less common. If possible, I suggest attaching image files as opposed to pasting or dragging in raw image data.

  • Can't use iPhone and Mail at the same time

    When my iPhone is on I can't receive Apple Mail on my computer. I get an error message on the computer that says another client is using the mail (or something to that effect). If I turn off the iPhone the error message usually disappears on my computer allowing me to access mail. Is there something I can do so I can keep my iPhone on and also get Apple Mail at the same time?

    Never seeing this problem.
    Are you using a MobileMe IMAP account or another provider and account? Is problem when using the Apple Mail application in OS 10.4.11 on your listed G5?
    Ernie

  • TS3276 Difficulties using Stationary in Mail: Cannot save to send separately to multiple email addresses or groups. Some recipients do not see the whole email- bottom is cut off. Anyone else wrestling with this?

    Using Stationary in Mail:
    How can you save to resend to additional emails or groups? When you hit SAVE where is it saved to? SAVE AS is not an option.
    I have received complaints that only Half the message was received. Is Stationary not compatible with all mail programs or operating systems?

    O.K. I typed:
    pear upgrade --alldeps pear
    and this is what I got:
    downloading PEAR-1.4.9.tgz ...
    Starting to download PEAR-1.4.9.tgz (283,443 bytes)
    ..........................................................done: 283,443 bytes
    upgrade ok: channel://pear.php.net/PEAR-1.4.9
    PEAR: Optional feature webinstaller available (PEAR's web-based installer)
    PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
    PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)
    To install use "pear install PEAR#featurename"
    I wasn't sure if it actually upgraded it or not so I typed:
    pear info PEAR
    and I get:
    Could not get contents of package "/usr/local/php5/bin/pear". Invalid tgz file.
    If I type:
    pear list-upgrades
    I get the same results:
    Notice: Undefined index: release_state in Remote.php on line 371
    Available Upgrades (stable):
    ============================
    Package Local Remote Size
    HTML_Table 1.6.1 (stable) 1.7.0 (stable) 13.7kB
    Mail 1.1.9 (stable) 1.1.10 (stable) 16.5kB
    PEAR Array () 1.4.9 (stable) 277kB
    What does the Array() mean anyways? Moving on, then I typed:
    sudo pear upgrade --alldeps Mail
    and it upgraded successfully. Now the code is working and I am sending email again! Thank you so much for your help in leading me to the solution (--alldeps). If you find out how to get the error reporting to work again let me know, and I will do the same if I figure it out.
      Mac OS X (10.4.6)  

  • Was using prior to dinner and noticed 60% battery life.  do you have any idea what has happened or what needs to be done on my part?

    My ipad will not turn on, or rechage.  Was using prior to dinner and noticed a 60% battery use.  When plugged to charger it will not turn on.  Any ideas?  Was purchased in April 2013 as a new IPad.

    Frozen or unresponsive iPad
    Resolve these most common issues:
        •    Display remains black or blank
        •    Touch screen not responding
        •    Application unexpectedly closes or freezes
    http://www.apple.com/support/ipad/assistant/ipad/
    iPad Frozen, not responding, how to fix
    http://appletoolbox.com/2012/07/ipad-frozen-not-responding-how-to-fix/
    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    Black or Blank Screen on iPad or iPhone
    http://appletoolbox.com/2012/10/black-or-blank-screen-on-ipad-or-iphone/
    What to Do When Your iPad Won't Turn On
    http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
    Not normal. Take it to an Apple Store for evaluation. You are still covered by Apple's 1-year warranty.
    Make a Genius Bar Reservation
    http://www.apple.com/retail/geniusbar/
     Cheers, Tom

  • Hi there i have issue in mavericks i thing so because now in 80% the battery shows it has 3 hours and 5 minutes left only using safari and mail....

    hi there i have issue in mavericks i thing so because now in 80% the battery shows it has 3 hours and 5 minutes left only using safari and mail....is there any fix or update.....help appreciated....

    Is the MacBook/Air still covered under any AppleCare plan?
    If you are in the US or Canada, the Apple Store with Genius
    bar can have a look at it, and diagnose it for free; you'd have
    to set an appointment at a store nearest you, for them do do it.
    Not sure how old the unit is or how it was used, charged, or re-
    charged; but those are the kinds of little things that may affect
    battery life or subtract possible useable Cycles off its life.
    Some users of MB/Air models (and MB/Pro, etc) had noticed
    a loss of battery capacity after an upgrade to Mavericks. So
    that may be some kind of revision to how the battery is seen
    by the newer OS X. No idea if Mavericks uses more power.
    To see an expert or specialist about this issue, for advice, &
    or test/diagnose may be an idea. Could be it needs a new
    battery. How does the rest of the battery/power specs look?
    Perhaps the MacBook just wants to get out on the town...

  • Do I have to use computer based mail app to send mail through Safari?

    Can't believe I am confused on this...but....if I click on an email link in a web page that I am looking at in Safari, does sending email require opening and sending through a separate computer based mail app? My email accounts are through AOL, but doesn't seem that even if I sign in at AOL's website, that I can access a web page through them, and in turn have mail links link to my online AOL email page. That means that I have to use a mail app that people who access my computer and open and look into?

    Hi Jim,
    You can set up AOL mail using the Mac Mail application, instructions here.
    http://macs.about.com/od/applications/qt/mailaol.htm
    That means that I have to use a mail app that people who access my computer and open and look into?
    Only if you share your login user name and password with them.
    If you allow visitors to use your Mac, you can setup a guest account for them to use.
    http://docs.info.apple.com/article.html?path=Mac/10.5/en/15600.html
    The instructions at that link are for v10.5 but it works fine for v10.6 as well.
    Carolyn

  • My password works fine when I turn the computer on, but when I try to wake it from sleep mode the computer doesn't recognize my password -- the same one I used successfully when I turned the computer on.

    My password works fine when I turn the computer on, but when I try to wake it from sleep mode the computer doesn't recognize my password -- the same one I used successfully when I turned the computer on.

    Okay, I seem to have solved the problem I posted about earlier.  I noticed that the language preference in the upper right hand corner of the screen (between the date and time and the Spotlight icon) had somehow gotten switched from American English to French.  When I switched it back to American English, my password worked when waking the computer from sleep mode.  I have no idea why changing the language preference would affect the way the password works but that seems to have been the case.  I'll post again if I experience more problems.

Maybe you are looking for

  • Error while calling ejb service call from BPM service

    Hi, We are using the Oracle 11.1.1.5.0 We are calling ejb service call from BPM service to update the data to Oracle database. We are getting the below error when we executing the ejb service call from BPM Service. <Error> <EJB> <BEA-010026> <Excepti

  • Help with N97 and Access points after V20 upgrade

    Hi Guys, I'm hoping someone can help me - I have an 505 uk unit and have changed to a generic euro product code to get the V20 software ( as theres a 2 week wait minimum for the network to release its custome version ) and its working brilliantly - e

  • How do i remove InstallMac toolbar?

    I have somehow managed to install something called InstallMac on my Mac and can't find a way to get rid of it. It has taken over Safari and will only let me use its search engine. How can I remove this without anti-malware software? Is there a uninst

  • Creating multiple invoices

    Hi, I would like to create multiple invoices for a sales order which has multiple line items, for eg: if the sales order is havig 10 items, i want the system to create 10invoices, and this is for a Order related billing. I have an idea of doing this

  • Maintain structures

    Hi experts,        If there is only one Source structure and Target Structure, the relationship is defaulted automatically in LSMW.But I have two structures (one structure for Header details & another one for line item details) in LSMW by using recor