Jump to content

Some GUI help realy needed...


AoRaToS
 Share

Recommended Posts

Ok, I use a function to make lets say 2 child GUI, the same function, only difference is the title which is a different ip address... ofcourse the buttons on the first one stop working because the variables are now assigned to the second window, so how can I set the variables I want somewhat dynamicaly, something like:

$ipaddress & $Okbutton = GUICtrlCreate.... or so so that each ok button is different,so then if I get the window title & $okbutton i have the one I want...It sounds stupid maybe but I can't do it :/

the second part doesn't have to be a variable,just a word to recognise it,so $ipaddress & "ok" would be fine....How can I do that??

This ofcourse doesn't work:

$chatgetclientid & "." & $MessageShow = GUICtrlCreateEdit('', 7, 5, 386, 130,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_MULTILINE+$ES_READONLY)

So what I need is each child window to have it's own variables for buttons,editboxes and the rest...

Edited by AoRaToS

s!mpL3 LAN Messenger

Current version 2.9.9.1 [04/07/2019]

s!mpL3 LAN Messenger.zip

s!mpL3

Link to comment
Share on other sites

I find it easier to keep straight if i use things like $okbutton and $okbutton2. Also your while loop should be While winactive("guione") and While winactive ("guitwo"). In my current project I have about 10 gui's all with different variables for go buttons for easy finding when something goes wrong.

Giggity

Link to comment
Share on other sites

Ok, I use a function to make lets say 2 child GUI, the same function, only difference is the title which is a different ip address... ofcourse the buttons on the first one stop working because the variables are now assigned to the second window, so how can I set the variables I want somewhat dynamicaly, something like:

$ipaddress & $Okbutton = GUICtrlCreate.... or so so that each ok button is different,so then if I get the window title & $okbutton i have the one I want...It sounds stupid maybe but I can't do it :/

the second part doesn't have to be a variable,just a word to recognise it,so $ipaddress & "ok" would be fine....How can I do that??

This ofcourse doesn't work:

$chatgetclientid & "." & $MessageShow = GUICtrlCreateEdit('', 7, 5, 386, 130,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_MULTILINE+$ES_READONLY)

So what I need is each child window to have it's own variables for buttons,editboxes and the rest...

I recommend that you use arrays for the gui names and the controlds. If the design is the same for all the child windows you need a function to create a child which is passed the next index

Global $childGui[10],$btns[10]

$nextwindowNum = 3
createChild($nextWindowNum)

.
.
..
Func NextWindowNum($iw)
   $childGui[$iw] = guicreate(...
   $btns[3] = GuiCtrlCreateButton(...........

.
.
endfunc
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

The GUIs are the same, the problem is I don't know how many they are beforehand and also I don't know their names,the name are a computer name and an IP address for every window...

I thought of an array but I'll still need to create different variables for each child created, If I can do that then I'll see to it that the variables contain the IP and then all is easy cause I just use the ip part of the let's say 2xvariable to act,so $ipaddress + Edit would mean 192.168.0.1_Edit for one GUI and 192.168.0.3_Edit for another, then if I just send to $sendIP & "_Edit" I have the Edit I want to use... :/ but I can't seem to be able to do that...Any other suggestions?I need more opinions please ;)

Or an example of what I just showed if it's possible...

s!mpL3 LAN Messenger

Current version 2.9.9.1 [04/07/2019]

s!mpL3 LAN Messenger.zip

s!mpL3

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...