Jump to content

autit3 / koda problem / question


Recommended Posts

I've been working on a mass email program for a group I'm part of (not spam, member notices) I've let it set for too long, and now need to make some changes and rebuild the giu's for Koda. The following code extract of only the second gui give an error:

#include <Array.au3>
#include <Debug.au3>
#include <file.au3>
#include <INet.au3>
#Include <GuiComboBox.au3>
#include <GUIConstants.au3>
#include <String.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>

opt("MustDeclareVars", 0)
Opt("TrayIconDebug", 1)
Opt("GUIOnEventMode", 1)

<< much clipped >>

#Region ### START Koda GUI section ### Form=c:\documents and settings\al\my documents\sosen work\mailer.kxf
;gui for settings
$Width2 = 263
$Height2 = 217
$Form2 = GUICreate("Settings", $Width2, $Height2, -1, -1, -1, -1, $Form1)
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSE2")
$Label12 = GUICtrlCreateLabel("Smtp Server :", 16, 5, 58, 17)
$label13 = GUICtrlCreateLabel("", 16, 32, 150, 17)
$Label22 = GUICtrlCreateLabel("From name :", 16, 128, 62, 17)
$Label32 = GUICtrlCreateLabel("From address :", 16, 152, 73, 17)
$Label42 = GUICtrlCreateLabel("Username :", 16, 80, 58, 17)
$Label52 = GUICtrlCreateLabel("Password :", 16, 104, 56, 17)
$Label62 = GUICtrlCreateLabel("Port :", 16, 56, 29, 17)
$Label72 = GUICtrlCreateLabel("SSL :", 120, 56, 30, 17)
$Input12 = GUICtrlCreateCombo("", 96, 5, 121, 21)
GUICtrlSetOnEvent($Input12, "F2I12Change")
$Input22 = GUICtrlCreateInput("", 56, 56, 49, 21)
$Input32 = GUICtrlCreateInput("", 96, 80, 121, 21)
$Input42 = GUICtrlCreateInput("", 96, 104, 121, 21, $ES_PASSWORD)
$Input52 = GUICtrlCreateInput("", 96, 128, 121, 21)
$Input62 = GUICtrlCreateInput("", 96, 152, 121, 21)
$Checkbox21 = GUICtrlCreateCheckbox("Enable / Disable", 152, 56, 97, 17)
$Button12 = GUICtrlCreateButton("Apply Settings", 16, 184, 83, 25, 0)
GUICtrlSetOnEvent($Button12, "Apply")
$Button22 = GUICtrlCreateButton("Apply and Save Settings", 112, 184, 131, 25, 0)
GUICtrlSetOnEvent($Button22, "Save")
#EndRegion ### END Koda GUI section ###

The error is:

Could not convert variant of type (String) into Type (Boolean)

Exception Address: 00410B51

Information about source of exception:
Unit: Variants
Method: HandleConversionException
Line: 0

Obviously I've a parameter to one of the function calls wrong, but after going through it more than a few times, I can't see it (and yes, sometimes I'm blind!)

Anyone see what the problem is??

Koda: 1.7.0.10 (beta)

Now my old age is telling on me (I'm 60+ so bear with the Alzheimer's!) when I originally created these guis and the related au3 script, I thought I had remembered calling Koda from within Scite - am I misremembering or is the an option to allow this??

My thanks //al

Link to comment
Share on other sites

I've been working on a mass email program for a group I'm part of (not spam, member notices) I've let it set for too long, and now need to make some changes and rebuild the giu's for Koda. The following code extract of only the second gui give an error:

#include <Array.au3>
 #include <Debug.au3>
 #include <file.au3>
 #include <INet.au3>
 #Include <GuiComboBox.au3>
 #include <GUIConstants.au3>
 #include <String.au3>
 #include <WindowsConstants.au3>
 #include <EditConstants.au3>
 
 opt("MustDeclareVars", 0)
 Opt("TrayIconDebug", 1)
 Opt("GUIOnEventMode", 1)
 
 << much clipped >>
 
 #Region ### START Koda GUI section ### Form=c:\documents and settings\al\my documents\sosen work\mailer.kxf
;gui for settings
 $Width2 = 263
 $Height2 = 217
 $Form2 = GUICreate("Settings", $Width2, $Height2, -1, -1, -1, -1, $Form1)
 GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSE2")
 $Label12 = GUICtrlCreateLabel("Smtp Server :", 16, 5, 58, 17)
 $label13 = GUICtrlCreateLabel("", 16, 32, 150, 17)
 $Label22 = GUICtrlCreateLabel("From name :", 16, 128, 62, 17)
 $Label32 = GUICtrlCreateLabel("From address :", 16, 152, 73, 17)
 $Label42 = GUICtrlCreateLabel("Username :", 16, 80, 58, 17)
 $Label52 = GUICtrlCreateLabel("Password :", 16, 104, 56, 17)
 $Label62 = GUICtrlCreateLabel("Port :", 16, 56, 29, 17)
 $Label72 = GUICtrlCreateLabel("SSL :", 120, 56, 30, 17)
 $Input12 = GUICtrlCreateCombo("", 96, 5, 121, 21)
 GUICtrlSetOnEvent($Input12, "F2I12Change")
 $Input22 = GUICtrlCreateInput("", 56, 56, 49, 21)
 $Input32 = GUICtrlCreateInput("", 96, 80, 121, 21)
 $Input42 = GUICtrlCreateInput("", 96, 104, 121, 21, $ES_PASSWORD)
 $Input52 = GUICtrlCreateInput("", 96, 128, 121, 21)
 $Input62 = GUICtrlCreateInput("", 96, 152, 121, 21)
 $Checkbox21 = GUICtrlCreateCheckbox("Enable / Disable", 152, 56, 97, 17)
 $Button12 = GUICtrlCreateButton("Apply Settings", 16, 184, 83, 25, 0)
 GUICtrlSetOnEvent($Button12, "Apply")
 $Button22 = GUICtrlCreateButton("Apply and Save Settings", 112, 184, 131, 25, 0)
 GUICtrlSetOnEvent($Button22, "Save")
 #EndRegion ### END Koda GUI section ###

The error is:

Could not convert variant of type (String) into Type (Boolean)
 
 Exception Address: 00410B51
 
 Information about source of exception:
 Unit: Variants
 Method: HandleConversionException
 Line: 0

Obviously I've a parameter to one of the function calls wrong, but after going through it more than a few times, I can't see it (and yes, sometimes I'm blind!)

Anyone see what the problem is??

Koda: 1.7.0.10 (beta)

Now my old age is telling on me (I'm 60+ so bear with the Alzheimer's!) when I originally created these guis and the related au3 script, I thought I had remembered calling Koda from within Scite - am I misremembering or is the an option to allow this??

My thanks //al

I don't see what's wrong. If I import it into Koda, but comment out the child parameter $Form1, it works ok and I can run the code which Koda produces.

I don't recognise the error messages you showed. Are they from Koda? (Doesn't look like an AutoIt script error message to me.)

You can run Koda from Scite using the Tools menu, or at least I can in the full version I'm using.

Luckily for me, Alzheimer's hasn't affected me yet.

Another thing I'm quite pleased about is that Alzheimer's hasn't affected me.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

I don't see what's wrong. If I import it into Koda, but comment out the child parameter $Form1, it works ok and I can run the code which Koda produces.

I don't recognise the error messages you showed. Are they from Koda? (Doesn't look like an AutoIt script error message to me.)

You can run Koda from Scite using the Tools menu, or at least I can in the full version I'm using.

Luckily for me, Alzheimer's hasn't affected me yet.

Another thing I'm quite pleased about is that Alzheimer's hasn't affected me.

I'm about ready to crash - but thought I'd check in here first. Ah, Koda import only works with ONE form so it's probably the reference to $form1 that's throwing the monkey wrench in the works. I'll check that when I get back from work tomorrow.

The error message comes directly from Koda at that point, I'm running FD.exe (df.exe??) directly to import the forms, so there's no autoit running to get in the way. I'll make a note to send the error and situation on to koda dev and see what they think.

You're running SCITE - not the Scite Light that comes with Autoit? If that's the case, I'll go ahead and install the full version; as I said. it's been a "while" since I've played with this. Long enough that I've had to rethink what I was trying to do.

Thanks for the assist Martin, I'll yell back and let you know how this old man fared. //al

Link to comment
Share on other sites

Martin, my thanks (I think), I went back and reinstalled autoit3 / scite from the web and apparently got "better" versions - the one with koda (and a "few" other tools installed!)

That allowed me to regen the forms, now I have to see why my regen broke the program! (Damnit!)

Seriously, do appreciate the guidance.

//al

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...