Jump to content
Sign in to follow this  
AoRaToS

Some GUI help realy needed...

Recommended Posts

AoRaToS

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.8.8 [30/09/2015]

Download Here

s!mpL3

Share this post


Link to post
Share on other sites
youknowwho4eva

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

Share this post


Link to post
Share on other sites
martin

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.

Share this post


Link to post
Share on other sites
AoRaToS

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.8.8 [30/09/2015]

Download Here

s!mpL3

Share this post


Link to post
Share on other sites
AoRaToS

Anyone that can help?I don't think this is the hardest question made... ;)

Maybe what I need is dynamic variables?But how can I do that...?


s!mpL3 LAN Messenger

Current version 2.9.8.8 [30/09/2015]

Download Here

s!mpL3

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  

×