| View previous topic :: View next topic |
| Author |
Message |
Beastmaster
Joined: 15 Apr 2004 Posts: 182
|
Posted: Mon Jul 12, 2004 12:38 pm Post subject: ControlSend |
|
|
Run from script: ControlSend, , put OLTEST20040712.GPS{ENTER}, cmd.exe
Has been displayed in the DOS box: ftp> put OlteSt20040712.GPs
Interesting, the capitalization has gone ! Why? Bug or feature ?
Previously the filename was OLTEST_20040712.GPS but that hasn't worked, cause for whatever reason the "_" has been changed with its sending to the Control to "-" and therefore the file couldn't be found  |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Mon Jul 12, 2004 1:13 pm Post subject: |
|
|
It doesn't completely surprise me because there has been some info posted on the AutoIt forum about ControlSend not always working, perhaps specifically mentioning the command prompt, I'm not sure.
Even so, those examples all work on my XP system, even at the FTP prompt. Are you holding down any modifier keys during the Send (i.e. if the action is triggered by a hotkey)? Also, which OS?
As a workaround, you could try using different values for SetKeyDelay and see if it helps. |
|
| Back to top |
|
 |
Beastmaster
Joined: 15 Apr 2004 Posts: 182
|
Posted: Mon Jul 12, 2004 3:02 pm Post subject: |
|
|
OS: W2K SP4
No, no hotkey involved.
Interesting, the file transfer has worked correctly (an "ls" on the destination showed a capitalized OLTEST20040712.GPS).
Well I think something like this can be irritating especially as Unix works case sensitive and for example only a minority of user's would have fun if AAA.txt should have been deleted on the destination but aAa.txt has been ...
BTW: to send To/Bc/Subject/Body to a Control at an Outlook message is like you've set a bet on D.Beckham on his way to shot a penalty ...  |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Mon Jul 12, 2004 5:00 pm Post subject: |
|
|
| Quote: | | to send To/Bc/Subject/Body to a Control at an Outlook message |
Are you saying that ControlSend is unreliable for some purposes? You might try using ControlSetText instead. It is known to be more reliable.
But if you can isolate specific cases where ControlSend gives inconsistent results -- perhaps using Notepad or some other standard app -- I'd like to hear about it so that I can try to fix it.
Given that I can't reproduce your difficulties with the command prompt and console-FTP, maybe it's an issue that only occurs on Win2k and not XP. If you have an XP machine to test it on, I'd be curious to know if the results are any different.
Thanks,
Chris |
|
| Back to top |
|
 |
Beastmaster
Joined: 15 Apr 2004 Posts: 182
|
Posted: Mon Jul 12, 2004 6:30 pm Post subject: |
|
|
Network environment, W2K SP4.
Task:
open a new outlook message with:
a) a preset Subject/Body/Cc
b) variable To/number of attachments
1) Run, outlook /c ipm.note /m support@ahk.com ; To get a new message with an adressee
2) Run, outlook /c ipm.note /a MyAttachment.txt ; To get a new message with an attachment
3) Run, outlook /c ipm.note /m support@ahk.com;bsmith@aol.com /a MyAttachment.txt ; To get a new message with an attachment and 1+ addressee
But no way to preset the Subject this way, and/or to attach multiple files.
Therefore I've tried to send it via ControlSend, which works fine as long you don't send the Bc which will be "checked" via the excange server and converted to the internal network standard/outlook setting "name, surname". That needs some time to the server and back to the outlook client and that "timing issue" seems to interfere the following ControlSend. Result, a cryptic string send to the Subject field
Currently I ended up with a mixture of the 3rd option + a preset "signature" aka the Body and a ControlSend to the Subject field
-----
BTW: There's another option via --> mailto:...
Run, %COMSPEC% Start mailto:... ; where you can set everything exept an attached file
I would have prefered to use it, as you can create a shortcut which contains the whole info within one single variable as the link, but there's a limit of 255 chars and a need for an advanced FileCopy command to attach a/some files |
|
| Back to top |
|
 |
Beastmaster
Joined: 15 Apr 2004 Posts: 182
|
Posted: Mon Jul 12, 2004 6:43 pm Post subject: |
|
|
We've to send status mails to various customers after we've processed their order files.
The reason behind this unconfortable way of sending that mails: we're not allowed to use a plain command line SMTP mailer from within the network to fire out these status/confirmation mails.  |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Mon Jul 12, 2004 7:57 pm Post subject: |
|
|
Interesting info about command line options for Outlook, thanks.
Btw, the line "Run, %COMSPEC% Start mailto:... " can be simplified to "Run mailto:..." since AHK can launch URLs. |
|
| Back to top |
|
 |
|