Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Thu Jun 03, 2010 11:20 pm   

[3.18b-3.19e]BUG: %comcreate issues **FIXED**
 
In 3.18a and previous:
Code:
#VAR MsgObj %comcreate( "CDO.Message")
#VAR ConfObj @MsgObj.Configuration
#VAR ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing").Value 2


worked perfectly. I used it for emailing myself information.

In 3.18b and 3.18c, it fails. Not sure why, though.

Charneus


Last edited by charneus on Thu Jun 17, 2010 4:35 am; edited 3 times in total
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Jun 04, 2010 1:03 am   
 
I'm not familiar with the CDO.Message object. Is there some code you can show that will let me determine when it's working correctly? Like is there some properties that I could display with #SHOW to see what is working and what it not? Your code above didn't give any error, but it didn't do anything else either.
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Fri Jun 04, 2010 1:24 am   
 
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <alias name="sendnote" copy="yes">
    <value>#VAR MsgObj %comcreate( "CDO.Message")
#VAR ConfObj @MsgObj.Configuration
#VAR ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing").Value 2
#VAR ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver").Value @SmtpServer
#VAR ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport").Value @SmtpServerPort
#IF (@Authenticate) {
  #VAR ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/smtpusessl").Value True
  #VAR ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate").Value 1
  #VAR ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername").Value @SendUsername
  #VAR ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword").Value @SendPassword
  }
#CALL @MsgObj.Configuration.Fields.Update
#VAR MsgObj.To %1
#VAR MsgObj.From %expand( @DefaultFrom, 1)
#VAR MsgObj.Subject %2
#VAR MsgObj.HTMLBody %3
#LOOP %numitems( %4) {#CALL @MsgObj.AddAttachment(%item( %4, %i))}
#CALL @MsgObj.Send
#VAR MsgObj {}
#VAR ConfObj {}</value>
    <notes>sendnote "to address" "subject" "text" "attachments"</notes>
  </alias>
  <class name="CDOEmail" copy="yes">
    <var name="Authenticate" type="Integer" copy="yes">1</var>
    <var name="cdoprefix" type="Literal" copy="yes">http://schemas.microsoft.com/cdo/configuration/</var>
    <var name="DefaultFrom" type="Literal" copy="yes">**From email address here (usually your username)**</var>
    <var name="SendPassword" type="Literal" copy="yes">** Your email password **</var>
    <var name="SendUsername" type="Literal" copy="yes">** Your username@gmail.com **</var>
    <var name="SmtpServer" copy="yes">smtp.gmail.com</var>
    <var name="SmtpServerPort" type="Integer" copy="yes">465</var>
  </class>
</cmud>


This is the entire code that is relevant to the bug. You can test it yourself by inputting the proper values (@DefaultFrom, @SendPassword, @SendUsername) for a Gmail account. Not sure how else I can help out with this, as this was taken from the email script in Finished Scripts forum.

Charneus
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Fri Jun 04, 2010 11:05 pm   
 
Any possible information on this? I'd hate to have to resort to actually creating logs for them, then emailing them to myself (new email in each folder keeps me abreast as to what has been posted, etc).

Charneus
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Sat Jun 05, 2010 10:51 am   
 
Yeah I tested it and the first error message up was that the sendusing was invalid so this suggested to me that

#VAR ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing").Value 2

was no longer working. I edited it and used

ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing").Value = 2

instead which then made it past this line and the next error message up was from or sender fields missing. So I went through the whole script changing the necessary parts
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<alias name="sendnote" copy="yes">
  <value>#VAR MsgObj %comcreate( "CDO.Message")
#VAR ConfObj @MsgObj.Configuration
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing").Value = 2
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver").Value = @SmtpServer
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport").Value = @SmtpServerPort
#IF (@Authenticate) {
  ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/smtpusessl").Value = True
  ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate").Value = 1
  ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername").Value = @SendUsername
  ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword").Value = @SendPassword
  }
#CALL @MsgObj.Configuration.Fields.Update
MsgObj.To = %1
MsgObj.From = %expand( @DefaultFrom, 1)
MsgObj.Subject = %2
MsgObj.HTMLBody = %3
#LOOP %numitems( %4) {#CALL @MsgObj.AddAttachment(%item( %4, %i))}
#CALL @MsgObj.Send
#VAR MsgObj {}
#VAR ConfObj {}</value>
  <notes>sendnote "to address" "subject" "text" "attachments"</notes>
</alias>
</cmud>
_________________
Taz :)
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Sat Jun 05, 2010 10:57 am   
 
This will obviously get you up and running but there is still a bug in the SuperObject when trying to use the #var syntax as opposed to the a = b syntax for com objects, possibly only those that have many nested properties.
_________________
Taz :)
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Sat Jun 05, 2010 11:05 am   
 
Zugg wrote:
I'm not familiar with the CDO.Message object. Is there some code you can show that will let me determine when it's working correctly? Like is there some properties that I could display with #SHOW to see what is working and what it not? Your code above didn't give any error, but it didn't do anything else either.

Those first two lines do actually do something, they create variables with the contents set to <COMObject>, I don't know if you are able to use some other method to see what the COM object contains but basically for the third line you need to see if

#VAR ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing").Value 2

has had the same desired effect as

ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing").Value = 2

does.
_________________
Taz :)
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Sat Jun 05, 2010 1:22 pm   
 
I had tried that earlier myself, but after copying/pasting your changes, I tried running it again, only to get:

Quote:
No method/property name: Fields("http://schemas.microsoft.com/cdo/configuration/sendusing").Value


Not sure what to do with this one, unless you have any other suggestions, Taz. I appreciate you working on it. :)

Charneus
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Sat Jun 05, 2010 1:43 pm   
 
It definitely worked for me as posted. I'll follow up through PM so as not to clutter this confirmed bug report.
_________________
Taz :)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Sat Jun 05, 2010 5:42 pm   
 
Definitely let me know what you find on this. If it's just a bug with #VAR not handling COM again, then let me know.

But some comments:

1) No, there is no way to "look inside a COM variable to see what is stored". COM has no type of general query mechanism like that, except for type libraries which not all COM objects support. So all CMUD knows is that "there is a COM object stored here". CMUD used to try to keep track of the original script text that stored the value, but that proved too difficult and unreliable. So now CMUD just says "" since that's all it really knows.

2) Nobody has mentioned this yet, but it's bound to come up at some point: Do NOT attempt to store COM variables within a string list or database variable. For example, DO NOT do this:

var.key = %comcreate(...)

The json tables only store primitive values (strings, integers, float) and other tables. They do not store the data type used in Delphi/Windows to store COM variable references. Only top-level CMUD variables can store a COM variable reference. This never worked in old versions either, so it's not a big deal, but just wanted to be clear about it.
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Sat Jun 05, 2010 8:11 pm   
 
Taz's solution above fixed it, however...

Every time I reload the session, the alias 'sendnote' needs to be deleted and created again for it to work properly... Not sure why that is... The fix was to import it from above, then force a save by inserting a space (he did it before the first " on the 3rd line), and then deleting that space. Then the alias worked perfectly.

Charneus
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Sun Jun 06, 2010 4:00 pm   
 
Yep it is a very odd one indeed. It doesn't work immediately on import. Correct compilation of the sendnote alias seems to rely on there being the two COM object variables already existing. I'll attempt to create a video of the process so you can see what I mean.
_________________
Taz :)
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Sun Jun 06, 2010 6:54 pm   
 
Click the image below for the video. It takes a while to load or it did for me, seemed to have buffering issues but bear with it, if you make it full screen you can figure out what I'm doing you might need to crank the volume to hear me though.


Below is the script that I pasted, you will need to change edit me to the correct values for Gmail. If you don't have a Gmail account then I suspect you will be okay if you use your Zuggsoft address but you will most likely need to change @Authenticate to 0 and @SmtpServerPort to 25.

<alias name="sendnote" copy="yes">
<value>#VAR MsgObj %comcreate("CDO.Message")
#VAR ConfObj @MsgObj.Configuration
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing").Value = 2
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver").Value = @SmtpServer
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport").Value = @SmtpServerPort
#IF (@Authenticate) {
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/smtpusessl").Value = True
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate").Value = 1
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername").Value = @SendUsername
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword").Value = @SendPassword
}
#CALL @MsgObj.Configuration.Fields.Update
MsgObj.To = %1
MsgObj.From = %expand(@DefaultFrom, 1)
MsgObj.Subject = %2
MsgObj.HTMLBody = %3
#LOOP %numitems(%4) {#CALL @MsgObj.AddAttachment(%item(%4, %i))}
#CALL @MsgObj.Send
#VAR MsgObj {}
#VAR ConfObj {}</value>
<notes>sendnote "to address" "subject" "text" "attachments"</notes>
</alias>
<class name="CDOEmail" copy="yes">
<var name="Authenticate" type="Integer" copy="yes">1</var>
<var name="DefaultFrom" type="Literal" copy="yes">edit me</var>
<var name="SendPassword" type="Literal" copy="yes">edit me</var>
<var name="SendUsername" type="Literal" copy="yes">edit me</var>
<var name="SmtpServer" copy="yes">smtp.gmail.com</var>
<var name="SmtpServerPort" type="Integer" copy="yes">465</var>
</class>
_________________
Taz :)
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Mon Jun 07, 2010 5:38 am   
 
Interesting... I was able to create a bug report with this, so hopefully this will help you determine what the problem is. The way I got the bug report was by selecting the alias, right-clicking, then choosing 'Execute script.' Enjoy!

Code:
date/time         : 2010-06-06, 22:34:55, 122ms
computer name     : CHARNEUS-LAPTOP
user name         : Charneus <admin>
registered owner  : Charneus
operating system  : Windows 7 build 7600
system language   : English
system up time    : 6 minutes 10 seconds
program up time   : 3 minutes 42 seconds
processors        : 2x AMD Turion(tm) 64 X2 Mobile Technology TL-60
physical memory   : 999/1918 MB (free/total)
free disk space   : (C:) 46.88 GB
display mode      : 1280x800, 32 bit
process id        : $a2c
allocated memory  : 130.51 MB
command line      : "C:\Program Files\CMUD\cMUD.exe" "Aardwolf"
executable        : cMUD.exe
exec. date/time   : 2010-06-04 14:08
version           : 3.18.0.4
compiled with     : BCB 2006/07
madExcept version : 3.0k
contact name      :
contact email     :
callstack crc     : $f9e07426, $1bc18b37, $1bc18b37
exception number  : 2
exception class   : Exception
exception message : No method/property name: Fields("http://schemas.microsoft.com/cdo/configuration/sendusing").Value.

Main ($240):
009ae1ee +042 cMUD.exe     ComUtils              93   +1 RaiseNameException
009ae304 +0c4 cMUD.exe     ComUtils             138  +32 GetIDsOfNames
009ae9d6 +086 cMUD.exe     ComUtils             410   +3 SetCOMProperty
00da9377 +08f cMUD.exe     CodeExec             700   +7 TCodeExec.ThreadSetComProperty
00db1d20 +1d4 cMUD.exe     CodeExec            3171  +33 HandleAssignProp
00db2dd3 +77b cMUD.exe     CodeExec            3428 +131 TCodeExec.InternalExecute
00da8c5f +053 cMUD.exe     CodeExec             516   +8 TCodeExec.Execute
00d9d0a2 +0c2 cMUD.exe     PrefDat            10995   +9 TCacheNode.Execute
00d993a4 +35c cMUD.exe     PrefDat             9425  +61 PrefRec.InternalExecute
00d9960b +01f cMUD.exe     PrefDat             9483   +2 PrefRec.Execute
00cd8bdb +153 cMUD.exe     MAIN                6470  +14 TMUDForm.ExecThread
00cd8f21 +015 cMUD.exe     MAIN                6531   +1 TMUDForm.ExecThread
00c5f4e9 +179 cMUD.exe     PkgMain             4656  +20 TPkgMainF.ActionExecAliasExecute
0047c763 +00f cMUD.exe     Classes                       TBasicAction.Execute
004ccead +031 cMUD.exe     ActnList                      TContainedAction.Execute
004cdb74 +050 cMUD.exe     ActnList                      TCustomAction.Execute
0047c62f +013 cMUD.exe     Classes                       TBasicActionLink.Execute
006bc7d6 +052 cMUD.exe     dxBar                         TdxBarItem.DoClick
006bc753 +03b cMUD.exe     dxBar                         TdxBarItem.DirectClick
006c0b80 +154 cMUD.exe     dxBar                         TdxBarItemControl.ControlUnclick
006c3fb1 +059 cMUD.exe     dxBar                         TdxBarButtonControl.ControlUnclick
006d0462 +0fe cMUD.exe     dxBar                         TCustomdxBarControl.WMLButtonUp
004bc093 +2bb cMUD.exe     Controls                      TControl.WndProc
004c0097 +4fb cMUD.exe     Controls                      TWinControl.WndProc
0047d424 +014 cMUD.exe     Classes                       StdWndProc
006d2713 +007 cMUD.exe     dxBar                         TCustomdxBarControl.GetEquivalentParentBar
006d1a12 +01a cMUD.exe     dxBar                         TCustomdxBarControl.CanProcessMouseMessage
004bf7c0 +02c cMUD.exe     Controls                      TWinControl.MainWndProc
0047d424 +014 cMUD.exe     Classes                       StdWndProc
75de3573 +00a USER32.dll                                 DispatchMessageA
006ea896 +1ee cMUD.exe     dxBar                         TdxBarCustomPopupMenu.Popup
005aa1df +04f cMUD.exe     cxControls                    ShowPopupMenu
005ac038 +008 cMUD.exe     cxControls                    TcxControl.DoShowPopupMenu
005abf87 +08b cMUD.exe     cxControls                    TcxControl.DoContextPopup
004bd524 +0bc cMUD.exe     Controls                      TControl.WMContextMenu
004c3f6c +06c cMUD.exe     Controls                      TWinControl.WMContextMenu
004bc093 +2bb cMUD.exe     Controls                      TControl.WndProc
004c0097 +4fb cMUD.exe     Controls                      TWinControl.WndProc
005abe01 +119 cMUD.exe     cxControls                    TcxControl.WndProc
00836a1a +01e cMUD.exe     cxInplaceContainer            TcxEditingControl.WndProc
004bf7c0 +02c cMUD.exe     Controls                      TWinControl.MainWndProc
0047d424 +014 cMUD.exe     Classes                       StdWndProc
7739642b +02b ntdll.dll                                  KiUserCallbackDispatcher
75e041f4 +016 USER32.dll                                 CallWindowProcA
0067bae6 +0ee cMUD.exe     VCLFixPack                    TContextMenuFixWinControl.DefaultHandler
004bca38 +00c cMUD.exe     Controls                      TControl.WMRButtonUp
004bc093 +2bb cMUD.exe     Controls                      TControl.WndProc
7739642b +02b ntdll.dll                                  KiUserCallbackDispatcher
0040518e +002 cMUD.exe     System             16515   +0 @ClassDestroy
00579285 +025 cMUD.exe     cxClasses                     TcxObjectLinkController.Destroy
00404dcc +008 cMUD.exe     System             16515   +0 TObject.Free
0045ad60 +008 cMUD.exe     SysUtils                      FreeAndNil
0057938c +014 cMUD.exe     cxClasses                     ReleaseObjectLinkControllerRefCount
005793c4 +010 cMUD.exe     cxClasses                     cxRemoveObjectLink
005abeaf +1c7 cMUD.exe     cxControls                    TcxControl.WndProc
00836a1a +01e cMUD.exe     cxInplaceContainer            TcxEditingControl.WndProc
004bf7c0 +02c cMUD.exe     Controls                      TWinControl.MainWndProc
0047d424 +014 cMUD.exe     Classes                       StdWndProc
75de3573 +00a USER32.dll                                 DispatchMessageA
004aa76c +0fc cMUD.exe     Forms                         TApplication.ProcessMessage
004aa7a6 +00a cMUD.exe     Forms                         TApplication.HandleMessage
004aaa9b +0b3 cMUD.exe     Forms                         TApplication.Run
00e41b4c +088 cMUD.exe     CMUD                 373  +20 initialization
75a81192 +010 kernel32.dll                               BaseThreadInitThunk

error details:
Executing COM alias


Charneus
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Mon Jun 07, 2010 10:31 am   
 
The compiled code for the third line of the sendnote alias when the session has just been loaded.

0200 STR 'ConfObj'
0216 MAKEVAR
0220 STR 'Fields("http://schemas.microsoft.com/cdo/configuration/sendusing").Value'
0300 INT 2
0308 ASSIGNPROP 0

The compiled code for the third line of the sendnote alias after it has been run once, the COMObject vars exist and the space backspace trick is used.

0200 STR 'ConfObj'
0216 MAKEVAR
0220 LITERAL "http://schemas.microsoft.com/cdo/configuration/sendusing"
0284 STR 'Fields'
0300 DOT (1)
0308 STR 'Value'
0324 INT 2
0332 ASSIGNPROP -1
_________________
Taz :)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Jun 07, 2010 5:22 pm   
 
Thanks for all of that extra info Taz. It definitely looks like the parser is checking to see if a COM variable already exists when trying to compile the script, which is a problem. I'll try to track this down and will let you know if I need more info.
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Jun 16, 2010 5:32 am   
 
This still continues to be an issue in 3.19e, though the original method of fixing it has changed. Now it appears that you have to keep the space instead of backspacing out of it.

Not sure what the problem is overall, but here's an alias I created to test it:

Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <alias name="testcomc" copy="yes">
    <value>#VAR MsgObj %comcreate("CDO.Message")
#VAR ConfObj @MsgObj.Configuration
#VAR MsgObj
#VAR ConfObj
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver").Value = "smtp.gmail.com"
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing").Value = 2
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport").Value = 465
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/smtpusessl").Value = True
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate").Value = 1
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername").Value = "cmudtest@gmail.com"
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword").Value = "zuggsoft"
#CALL @MsgObj.Configuration.Fields.Update
MsgObj.To = "cmudtest@gmail.com"
MsgObj.From = "cmudtest@gmail.com"
MsgObj.Subject = Test
MsgObj.HTMLBody = Test
#CALL @MsgObj.Send
#VAR MsgObj {}
#VAR ConfObj {}</value>
  </alias>
</cmud>


This has an actual 'dummy' account that you can access all you want. Means nothing to me, has no personal information really stored in it. I created it for the purpose of this testing. However, with the above script, putting it in as-is and typing 'testcomc' causes the error to pop up. If you put a space here:
Code:
ConfObj.Fields( "http://schemas.microsoft.com/cdo/configuration/sendusing").Value = 2

it magically works again...

Is there any fix for this?

Charneus
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jun 16, 2010 4:30 pm   
 
The "fix" in previous versions was to the
Code:
#VAR ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing").Value 2

syntax. So are you saying that #VAR works now, but using the varname=value syntax is broken now? Maybe I'm blind this morning but I'm not sure which space you are talking about. Are you talking about the space after the first (? So are you saying that:
Code:
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing").Value = 2

does NOT work, but
Code:
ConfObj.Fields( "http://schemas.microsoft.com/cdo/configuration/sendusing").Value = 2

DOES work?
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Jun 16, 2010 6:46 pm   
 
Ah, forgot to see if #VAR works yet.

But yes, that's exactly what I'm saying regarding the space. The alias I posted does not have a space between the ( and the ", so if you run it, it does not work at all. However, putting the space between the ( and the " for that line alone (I've tried it with other lines, and it still fails), it works.

Charneus
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jun 16, 2010 7:35 pm   
 
I cannot reproduce this. Can you go into the Compiled Code for your script and see exactly what is different there when you add the space or not?
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Jun 16, 2010 8:35 pm   
 
Odd. I think that I have found what the problem is, am able to reproduce it on my end, then when I go back to test it again, it doesn't break. This is even after testing it several times (prior to posting) to see if it exhibits the same behavior each time, which it did for me. Today, though, it seems like it's a 'first time compilation' problem, and it seems that it only happens when you do this:

1. Create an untitled session.
2. Go to Settings, then make a new alias called test
3. Paste the following in the value:
Code:
#VAR MsgObj %comcreate("CDO.Message")
#VAR ConfObj @MsgObj.Configuration
#VAR MsgObj
#VAR ConfObj
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver").Value = "smtp.gmail.com"
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing").Value = 2
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport").Value = 465
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/smtpusessl").Value = True
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate").Value = 1
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername").Value = "cmudtest@gmail.com"
ConfObj.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword").Value = "zuggsoft"
#CALL @MsgObj.Configuration.Fields.Update
MsgObj.To = "cmudtest@gmail.com"
MsgObj.From = "cmudtest@gmail.com"
MsgObj.Subject = Test
MsgObj.HTMLBody = Test
#CALL @MsgObj.Send
#VAR MsgObj {}
#VAR ConfObj {}

4. Look at the compiled code. It /should/ look like this:
Code:
0296   MAKEVAR   
0300   STR   'Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver").Value'
0384   LITERAL   "smtp.gmail.com"
0408   ASSIGNPROP   0

5. Run test on the command line. It should pop up an error that the configuration for smtpsever is incorrect. (Previously thought to be sendusing, but it's whatever value is listed first).
6. Click Close and go back to the test alias, compiled tab. You /should/ now see this:
Code:
0296   MAKEVAR   
0300   LITERAL   "http://schemas.microsoft.com/cdo/configuration/smtpserver"
0368   STR   'Fields'
0384   DOT   (1)
0392   STR   'Value'
0408   LITERAL   "smtp.gmail.com"
0432   ASSIGNPROP   -1


Ugh. I think I've finally got it down as far as reproducing the procedure. Through 5 different openings and repeats, this continues to be true for me. Hopefully, it works for you too.

Charneus
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jun 16, 2010 10:25 pm   
 
Which one of those cases actually works, (4) or (6)? I'm hoping that the compiled code in (6) is the one that actually works, but let me know.
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Jun 16, 2010 10:35 pm   
 
Whoops. Should have mentioned that. Yes, step 6, the case actually works. Step 4, the case does not work.

Charneus
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jun 16, 2010 10:39 pm   
 
OK, cool, I think I found the problem then.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net