Jump to content
Sign in to follow this  
PJarman

New User - GUICtrlCreateCombo Help Please

Recommended Posts

PJarman

Afternoon All

I'm a complete newbie to AutoIt and need a bit of help with some changes I'm making to a tool a colleague made a while back. Essentially it is a tool for displaying running times between set locations in the UK to all the various postcodes. I've made a load of changes to the original tool, but am now getting the following error...

C:\Documents and Settings\Administrator\My Documents\Work Documents\Autotimacro\PostCodeETA\Postcode London.au3(1508,33) : ERROR: syntax error (illegal character)

Case GUICtrlRead($Combo2) = "

The GUI section of the code looks like this...

#Region ### START Koda GUI section ### Form=

$Form1 = GUICreate("London Travel Times v1.0", 404, 175, 252, 125)

$Combo1 = GUICtrlCreateCombo("Select FSL from list", 8, 96, 297, 25)

GUICtrlSetData(-1, "0200 Langley (PUD203) (B.Post Cut-off:16h00)|0300 Tabernacle (PUD008) (B.Post Cut-off:16h00)")

$Combo2 = GUICtrlCreateCombo("Postcode", 320, 96, 73, 25)

GUICtrlSetData(-1, "E1|E2|E3|E4|E5|E6|E7|E8|E9|E10|E11|E12|E13|E14|E15|E16|E17|E18|EC1|EC2|EC3|EC4|N1|N2|N3|N4|N5|N6|N7|N8|N9|N10|N11|N12|N13|N14|N15|N16|N17|N18|N19|N20|N21|N22|NW1|NW2|NW3|NW4|NW5|NW6|NW7|NW8|NW9|NW10|NW11|SE1|SE2|SE3|SE4|SE5|SE6|SE7|SE8|SE9|SE10|SE11|SE12|SE13|SE14|SE15|SE16|SE17|SE18|SE19|SE20|SE21|SE22|SE23|SE24|SE25|SE26|SE27|SE28|SW1|SW2|SW3|SW4|SW5|SW6|SW7|SW8|SW9|SW10|SW11|SW12|SW13|SW14|SW15|SW16|SW17|SW18|SW19|SW20|W1|W2|W3|W4|W5|W6|W7|W8|W9|W10|W11|W12|W13|W14|WC1|WC2")

$Label1 = GUICtrlCreateLabel("---- Travel times are agreed running times between Geodis and IBM." & @LF & "---- ETA calculated includes 30 min pull/pack and a 20-30 minute break on journeys longer than 6 hours." & @LF & "---- Traffic hotspots are more likely to have revisions to the ETA." & @LF & "If ordering between 1530 and 1900 please add 30 mins to the time listed" , 8, 8, 380, 73)

$Button1 = GUICtrlCreateButton("Calculate", 144, 128, 123, 25, 0)

GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

The rest of the code then does some rounding of running times to the nearest half hour and calls on the running times which are laid out like this...

Case $guimsg = $Button1

Select

;------------------------------------------------------------------------

;info below for postcode E1

Case GUICtrlRead($Combo2) = "E1"

If GUICtrlRead($Combo1) = "0200 Langley (PUD203) (B.Post Cut-off:16h00)" Then

$Journeytimehour = 2

$Journeytimeminutes = 30

$TravelHotspot = 1

Call("ETAcheck")

EndIf

If GUICtrlRead($Combo1) = "0300 Tabernacle (PUD008) (B.Post Cut-off:16h00)" Then

$Journeytimehour = 1

$Journeytimeminutes = 10

$TravelHotspot = 1

Call("ETAcheck")

EndIf

;----------------------------------------------------------------

;-------------------------------------------------------

I'm really at a loss as nothing is jumping out at me. I've gone right through the code compairing old to new and can't see where I've made the faux par. Any help greatly received.

Cheers

Paul

Share this post


Link to post
Share on other sites
water

Welcome to AutoIt and the forum!

The error message you get is - most of the time - caused by a missing quote before the line displayed by SciTE.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
PJarman

Sir, you are a Gent and a Scolar!

As I thought it was pointing me at a problem in the GUI, I'd not thought to look at line 1508 where there was a quotation missing!

Share this post


Link to post
Share on other sites
water

Glad to be of service :D


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
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
Sign in to follow this  

×