[MacRuby-devel] Basic delayed email method

2012-10-19 Thread Cliff Rosson
Hi Everyone, I am fairly new to macruby and am having trouble finding some basic documentation to help me out. I would like to write a simple app that sends a delayed email based on Time from mac mail. I am thinking of something like this, time = Time.now + 3600 while true case time when Tim

Re: [MacRuby-devel] Basic delayed email method

2012-10-20 Thread Cliff Rosson
h::Queue.new("com.rosson.delayed.email") > >> > >> NSRunLoop.currentRunLoop.run > >> > >> > >> > >> As for actually sending emails, if you want to have things go through > Apple Mail you could use the ScriptingBridge framework whic

Re: [MacRuby-devel] Basic delayed email method

2012-10-20 Thread Cliff Rosson
-the-scripting-bridge/ > > AXElements is another option that I am biased in favour of; but it may not > be passive enough for your requirements. This is really what I want. I need mac mail to send the email at a specific time. Going to research what you provided. Thanks again. On Sat, Oct 20,

Re: [MacRuby-devel] Basic delayed email method

2012-10-22 Thread Cliff Rosson
ed.email") > >> > >> NSRunLoop.currentRunLoop.run > >> > >> > >> > >> As for actually sending emails, if you want to have things go through > Apple Mail you could use the ScriptingBridge framework which has a few > tutorials on

Re: [MacRuby-devel] Basic delayed email method

2012-10-23 Thread Cliff Rosson
ceholders that get > replaced by the actual values before execution. > > = > tell application "Mail" > activate > set htmlMsg to "%HTML%" > set subjecta to "%SUBJECT%" > set theMsg to make new outgoing message with propert

Re: [MacRuby-devel] Basic delayed email method

2012-10-23 Thread Cliff Rosson
message') > outgoing_msg=msg_class.alloc.initWithProperties(props) > app.outgoingMessages.addObject(outgoing_msg) > recip_class=app.classForScriptingClass('to recipient') > recipient=recip_class.alloc.initWithProperties({'address'=>' > st...@sclarkes.me.

Re: [MacRuby-devel] Basic delayed email method

2012-10-23 Thread Cliff Rosson
available on an object in Macruby by using > obj.methods(true,true). This gives tons of stuff but critically it shows > both the Macruby methods AND the Objective C methods. With SB it's the > latter group that are of real interest. > > Steve > > On 23 Oct 2012, at 17:52,

Re: [MacRuby-devel] Basic delayed email method

2012-10-23 Thread Cliff Rosson
ll be stuck with that problem. As far as I can see you > can't mutate an existing message into an outgoing message. > > Steve > > On 23 Oct 2012, at 19:05, Cliff Rosson wrote: > > Yea putsing methods(true,true).sort is pretty useful. Below is wha

Re: [MacRuby-devel] Basic delayed email method

2012-10-24 Thread Cliff Rosson
> recipient = @mail.classForScriptingClass('to > recipient').alloc.initWithProperties({'address'=>recievers}) > outgoing_msg.toRecipients.addObject(recipient) > if outgoing_msg.send > draft.delete > end > end > end And this