Variables, I think ?

  • Thread starter Thread starter Keith(Southend)
  • Start date Start date
K

Keith(Southend)

I'm wondering if this is not the correct term for what I am trying to
achieve. In the following there are a number of, what I call variables,
that I want to be able create a form to select:

http://www.ogimet.com/synopsc.phtml.en

http://www.ogimet.com/display_synop...&anof=2009&mesf=06&dayf=26&horaf=14&send=send
"Austri" "2009" "06" "26" "02" "2009" "06" "26" "14"

On the form I have created:
The dates for a start and end time, I have used ComboBox(s) for
Year/Month/Day/Hour for both Begin and End.
The first 'name', which represents a Country (I'm looking at using a
CheckListBox containing CheckBox(s)(38 off).
Not quite sure where the web address fits into this yet.

Screen dump:
http://www.southendweather.net/VB_Ogimet.pdf

I've been searching to get some examples of doing these tasks but with
no success, hence the question as I may not have the correct terminology.
Any tips/pointers/advice would be much appreciated.

Many thanks
 
You'll need to be more specific. You explained what your form is and what
it is collecting, but what, exactly is your question?

-Scott
 
You will populate the comboboxes using constants, because things like the
number of months in a year and the number of days in a month do not change.
Your years could be constants also, or you might initialize the combobox
using current year, current year -1, current year -2 etc, in which case you
would be calculating the values (which probably involves using some
temporary variables). For now, just use constants.

Once the user has confirmed their selections in the comboboxes (presumably,
by pressing Send) you will get the selected combobox values into variables.
You will then use these variables when you compose the message you need to
send.

It's not likely you wll find an example similar to what you are trying to
do, and if you did you might find it is more complex than you need right at
the moment. I would recommend you look for a simple example relating to how
user input (specifically, combox selection) gets converted into a set of
variables. Then you can look at how to format your message (probably an
example to do with string formatting) and then, when you have confirmed your
message is formatted exactly as per the user selections, how to send and
retrieve your message.

I would recommend adding a temporary text box to your form so you can see
every single step of that process of accessing the combobox selections and
building the message string.
 
Keith(Southend) said:
I'm wondering if this is not the correct term for what I am trying to
achieve. In the following there are a number of, what I call variables,
that I want to be able create a form to select:

http://www.ogimet.com/synopsc.phtml.en

http://www.ogimet.com/display_synop...&anof=2009&mesf=06&dayf=26&horaf=14&send=send

"Austri" "2009" "06" "26" "02" "2009" "06" "26" "14"

On the form I have created:
The dates for a start and end time, I have used ComboBox(s) for
Year/Month/Day/Hour for both Begin and End.
The first 'name', which represents a Country (I'm looking at using a
CheckListBox containing CheckBox(s)(38 off).
Not quite sure where the web address fits into this yet.

Screen dump:
http://www.southendweather.net/VB_Ogimet.pdf

I've been searching to get some examples of doing these tasks but with
no success, hence the question as I may not have the correct terminology.
Any tips/pointers/advice would be much appreciated.

Many thanks

The screen looks fine to me. I'm not sure I follow the question about
variables. When it comes to some point, your user will want to perform
some action, like a button click, to generate the URL string above, and
perhaps use a webclient to get the data you showed.

Generating the url will be the fun part. It looks to me as if the site
is a Spanish based site. Everything after the ? in the url are, more or
less, parameters to the call. "estado=Austri" would be the parameter
for the country, presumably Austria. What little Spanish I know tells
me the ano, anof (year), hora, horaf (hour), mes, mesf (month) and day,
dayf (day) params probably involve the start and end times. ord is
probably sort order. Tipo, send and nil are unknown to me. You may
want to just try not including those in a web browser to see what effect
they have on the results. You can simply type or paste test strings
into the browser to try to get clues to those params.
 
Keith,

If I understand your question correct, then the definition "values" comes
the closest to me.

What is on the page are strings, which are converted to other value types,
and returned again converted back to strings on the second page.

Because of the DateTime format you can see that on the second page the
converted DateTime Value with the overloaded version of ToString of that is
showed.
(This of course if the page would have been .Net, but we can see that a
generator is used to create the first page).

Cor
 
Scott said:
You'll need to be more specific. You explained what your form is and what
it is collecting, but what, exactly is your question?

-Scott

Scott, I find the form bit quite easy, it's understanding the language
and (wiring) that goes behind it. I think I got the answer(s) I was
looking for in some of the other replies. Basically, I'm searching to
understand how to do things and as the dates/times etc were the things I
need to change every time I run the program, I was calling these
'variables', however, in VB, these are actually 'constants', if I'm
understanding this correctly.

Like many things,once you've got the building blocks down you can start
working out and up, I'm still laying the foundations here ;-)

Thanks
 
Thanks for your replies 'Cor', 'Mike' & 'James', I've copied them into a
word doc so I can digest them as I move forward. Lot of useful pointers
there and I can see I've still got to understand the whole language
concept so I know what every bit of code does. I keep on trying to run
before I can walk, but am moving forward slowly.

Many thanks
 
Back
Top