Page 1 of 1

Script Command: MailTo.

Posted: 13 Nov 2010 12:35
by SkyFrontier
Callypso delivered me something last night. Perhaps due to a Future Begins/Predators/Minority Report DVD session interference or just a glimpse of the future, I don't know.
In any case, I could monitor a file size via something like (air code, involving some sort of WAIT command and running from the XY address bar at an idle computer completing a file-creation task)

Code: Select all

   ::focus p1; filter; $count1 = <get CountItems>; focus p2; filter; $count2 = <get CountItems>; if ($count1 != $count2) { mailto... } //not sure about this. Means "if ($count1 DIFFERENT FROM $count2); elseif {   }; wait (60000); focus a;  sendkeys"{enter}";
and send myself a message in case of an event. Or simply have a CTB to easily send boring reports to anyone at any time. Recent interactions of XY with web make me think this may not be that absurd to dream about.
Here it is:

Code: Select all

    + Scripting got a new command.
      Name:   mailto
      Action: Sends an e-mail.
      Syntax: mailto(address, subject, body, cc/bcc())
          address:  [required] can't you guess...?!  ; )
          subject:  [required] the subject of the mail
          body:  [required] your message
          cc/bcc:  [optional] other addresses in "carbon copy"/"blind carbon copy" format
          return:     your message conveniently sent anywhere.
        Examples:
        ::mailto("he@hiscompany.com", "Wow!", "Hi!<crlf>This is my body!<br>Hasta la vista!<br><crlf>Best regards,<br><br>SkyFrontier", bcc("first.friend@sample.net, skyfrontier@example.com, yetanotherfriend@kool.com"))
        ::mailto("she@herhouse.biz", "I miss you, too!", "<clipboard>","cc("<c:\Reference\Mailing.txt>"))
---
Currently XY can do this:

Code: Select all

v7.10.0004 - 2008-05-11 09:11
    + Scripting: New command "run". Works (almost) identical to Windows 
      Start | Run, i.e. you can start executables, open documents with 
      the OS-asociated applications, open websites, and much more.
        ::run mailto:support@xyplorer.com?subject=Wow!&body=Hi!
          Open email client with some fields prefilled.
---
Does anyone knows of another app which could interact with XY?

Code: Select all

::run "path\to\.exe" -msg -sub -content
Thank you!

Re: Script Command: MailTo.

Posted: 13 Nov 2010 14:06
by nas8e9
SkyFrontier wrote: Does anyone knows of another app which could interact with XY?

Code: Select all

::run "path\to\.exe" -msg -sub -content
The following works:

Code: Select all

::run "mailto:someone@example.com"
With some string work, it should be flexible enough.

The mailto: is an URL which simply calls whatever e-mail program is the default in Windows. For some syntax information see here.

Re: Script Command: MailTo.

Posted: 16 Nov 2010 04:04
by SkyFrontier
nas8e9 wrote:
SkyFrontier wrote: Does anyone knows of another app which could interact with XY?

Code: Select all

::run "path\to\.exe" -msg -sub -content
The following works:

Code: Select all

::run "mailto:someone@example.com"
With some string work, it should be flexible enough.
The mailto: is an URL which simply calls whatever e-mail program is the default in Windows. For some syntax information see here.
Oh, yeah - but I am exactly trying to avoid external tools as much as I can since some of them are not portable nor flexible enough to me. Or heavy or whatever - being "not scriptable" the major deal breaker!
Yes, I asked for options in case XY couldn't send mails at all.
If I'm not in mistake, xStarter can do such notifications in the ways I expect XY doing - it allows creation of .exe and blah, blah, blah - all but not portable!
Thanks for the link, by the way.

Re: Script Command: MailTo.

Posted: 16 Nov 2010 12:31
by nas8e9
SkyFrontier wrote:Oh, yeah - but I am exactly trying to avoid external tools as much as I can since some of them are not portable nor flexible enough to me. Or heavy or whatever - being "not scriptable" the major deal breaker!
Yes, I asked for options in case XY couldn't send mails at all.
If I'm not in mistake, xStarter can do such notifications in the ways I expect XY doing - it allows creation of .exe and blah, blah, blah - all but not portable!
Thanks for the link, by the way.
Just in case I misunderstood, the mailto URL is not an external tool but built into all current Windows versions (the ultimate in portability, you could say :)).

Re: Script Command: MailTo.

Posted: 16 Nov 2010 12:57
by SkyFrontier
nas8e9 wrote: Just in case I misunderstood, the mailto URL is not an external tool but built into all current Windows versions (the ultimate in portability, you could say :)).
Oh, no - portability to me means "all under my control, running from a thumb drive, preferably from a CD-Rom" - security concerns, not to mention not screwing someone else's machine/configs nor taking the risk to get my apps infected via external (pre-installed) tools.
Thanks!
:wink: