Jump to content

Combobox strings to give editbox data


 Share

Recommended Posts

Hello, Hereby I'd like to ask for the devs proffesional help cause there is
something I can not get to work. I have an Combobox containing 3 strings.
When I choose one, I'd wish for the 'readonly'editbox to hold some data from
each string, a different data.

string 1-> GUICtrlEdit /Edit1 : data ; blabla
string 2-> GUICtrlEdit /Edit1  : data ; random typin
string 3-> GUICtrlEdit /Edit1 : data ; other info

Just to give an example

I have a hunge it has something to do with
Case
$Combo1,
GuiCtrlSetData
and a read command.

I shall provide a KodaForm generated code script.au3 below but I'm kinda lost in how to get it done.
If only I had the beginning from one of the strings I'd make the ones for the other strings myself.

Kind regards Theo Van Der Wal, Frieschepalen, Holland
 

 

theolonghair.au3

Edited by theolonghair
added info and example
Link to comment
Share on other sites

So, I violated a rule? :(
Please be specific cause it is not my intention I want to make something that
violates the user rules of a game; quake live I merely wanted to make a user friendly
overall program that holds specific info of practice routines in that game with 3 main
weapons, hence the Combobox strings. Roughly said the editbox would contain guidelines
of practice offline.
I can imagine you think the way you are thinking right now, and it looks like my word against yours...
In which Case you have the last word, cause you have an somewhat authority here of which I am
aware of. So yes, If you don't trust it than ofcourse by all means do not help me progress with my help file.
Otherwise I'd much appreciate the question answered in my first post.

Kind regards Theo van der Wal. Holland.

Link to comment
Share on other sites

  • Moderators

theolonghair,

Autobert has no authority here - but I do.

As you describe the script:

user friendly
overall program that holds specific info of practice routines in that game with 3 main
weapons, hence the Combobox strings. Roughly said the editbox would contain guidelines
of practice offline.

I judge that this is a permissible thread, so I am leaving it open for the moment.

However, I recommend that you read the Forum rules before you post again just to make sure that in the future you keep away from anything that might infringe them.

M23

 

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

I judge that this is a permissible thread, so I am leaving it open for the moment.

However, I recommend that you read the Forum rules before you post again just to make sure that in the future you keep away from anything that might infringe them.

M23

 

First off, I thank you very much Melba23, for giving me the chance to proof my intentions.
I feel priveledged.
I can keep my progress updated here.
And I could even show the final results to several devs of the forums on quake live.

Just to correspond and verify it is an helpful, all in one tutorial interface.
I most certain feel obligated to go through the forum rules as you mentioned. I should have before hand. I know.

w k regards  Theo van der Wal Frieschepalen Holland.

Link to comment
Share on other sites

  • Moderators

theolonghair,

This is how you react to a combo  selection:

#include <GUIConstantsEx.au3>
#include <EditConstants.au3>
#include <ComboConstants.au3>
#include <MsgBoxConstants.au3>

Opt("GUIOnEventMode", 1)

$Form1_1 = GUICreate("Form1", 901, 601, 183, 114)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1_1Close")

$Tab1 = GUICtrlCreateTab(0, 0, 436, 404)
$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")

$Edit1 = GUICtrlCreateEdit("", 8, 48, 208, 200, BitOR($GUI_SS_DEFAULT_EDIT,$ES_READONLY))
GUICtrlSetData(-1, "Edit1")
$Combo1 = GUICtrlCreateCombo("", 56, 24, 161, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Lightning Gun|Rocket Launcher|Rail Gun")
GUICtrlSetOnEvent($Combo1, "_Combo")
$Label1 = GUICtrlCreateLabel("Weapon", 8, 27, 45, 17)

$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")
$TabSheet3 = GUICtrlCreateTabItem("TabSheet3")
$TabSheet4 = GUICtrlCreateTabItem("TabSheet4")
GUICtrlCreateTabItem("")

GUISetState(@SW_SHOW)

While 1
    Sleep(100)
WEnd



Func _Combo()
    MsgBox($MB_SYSTEMMODAL, "Cobo Selection", GUICtrlRead($Combo1))
EndFunc



Func Form1_1Close()
    Exit
EndFunc

What do you want to happen to the edit when a selection is made?

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

theolonghair,

The edit to get some text.

That much I could guess.....

So from where do you get this text, based on the combo selection? From a file? From a website? Help us to help you by giving us the details of what you are trying to achieve.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

theolonghair,

We do not just write code for you - what have you tried yourself?

You can easily store text within a script - it is far from impossible. Just assign it to a variable.

Reading from a file is also not difficult - have you looked in the Help file for a suitable function? FileRead would seem a likely candidate.....

Do some work yourself and we will help you work through any problems - just do not expect us to do it all.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Melba, may I ? for a clue only  :)

As there are several ways to achieve this, one simple and secure is the use of a hardcoded 2D array

Global $data[3][2] = [ _
                    ["Lightning Gun", "data1 LG"], _ 
                    ["Rocket Launcher", "data2 RL"], _ 
                    ["Rail Gun", "data3 RG"] ]

 

Link to comment
Share on other sites

To answer your question to what I've done for myself

I got 2 books from the play store  about autoIt^^
Had to buy it though but reading them whenever I have the time is bearing fruit.
Thanks for your input, Mikell.

I recently made something that applied to my job.
I do have few images that should be within the GUI,
but I have to figure out how to keep the images in the GUI
so currently I can't show the result compared to what I've got on my pc.
(I've read about this in the books I downloaded/ bought ie; installer paths)..

The Tabs hold the info of which specific product we process,
Below the Edit holds the raw materials we extract from the product\Tab selected.
Nothing is really automated but I felt fulfilled I came that far.
-starting with a form
-making tabs
-making editboxes
-fitting images.

And yes I want to figure things out myself, apologies if I went a little off-topic but
I felt a little obliged to show you this. this upload was just for show and tell.

Greetings theo van der Wal.

 

dopjes.jpg

Van Gansewinkel Groep.au3

waterbakpuin.jpg

Van Gansewinkel Groep.exe

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

×
×
  • Create New...