poplat Posted April 8, 2005 Share Posted April 8, 2005 (edited) Hello everybody, I've wrote several scripts using AutoIt and all of them work perfectly, but .... I'd like to combine all of my script with one GUI So I've made one and I have a little problem .... I'm using AutoIt for a week so I donot know everything yet .... The problem is that I have 3 radio , and each radio has its own input, how can i make other radio inputs disabled when one radio was chosen Here is my sript, I would be greatful for any help #include <GUIConstants.au3> Opt("GUIOnEventMode", 1) $konsola = GUICreate('Automat Lotus Notes - POPLAT') GUISetOnEvent($GUI_EVENT_CLOSE, "zamknij") GUISetState(@SW_SHOW) ; nazwa grupy GuiCtrlCreateGroup("Wybierz konfiguracje Lotus Notes", 10, 10, 380, 380) ; konfiguracja ln dla nowego sklepu $radio1 = GuiCtrlCreateRadio(" Konfiguracja Lotus Notes dla nowego sklepu ", 20, 40) GuiCtrlSetState(-1, $GUI_CHECKED) $imie1 = GuiCtrlCreateInput("Wprowadź Imię Ajenta", 50, 70, 230, 20) $nazwisko1 = GuiCtrlCreateInput("Wprowadź Nazwisko Ajenta", 50, 100, 230, 20) $mpk1 = GuiCtrlCreateInput("Wprowadź Nr Sklepu bez "&"Z", 50, 130, 230, 20) ; konfiguracja ln na podstawie user.id $radio2 = GuiCtrlCreateRadio(" Konfiguracja Lotus Notes w przypadku awarii (user.id) ", 20, 160) $imie2 = GuiCtrlCreateInput("Wprowadź Imię Ajenta", 50, 190, 230, 20) $nazwisko2 = GuiCtrlCreateInput("Wprowadź Nazwisko Ajenta", 50, 220, 230, 20) $mpk2 = GuiCtrlCreateInput("Wprowadź Nr Sklepu bez "&"Z", 50, 250, 230, 20) ; konfiguracja ln dla brzednia $radio3 = GuiCtrlCreateRadio(" Konfiguracja Lotus Notes dla komputerów szkoleniowych (Brzednia) ", 20, 280) $nrstanowiska = GuiCtrlCreateInput("Wprowadź Nr stanowiska", 50, 310, 230, 20) ; przycisk zaniechaj $zaniechaj = GuiCtrlCreateButton("Zaniechaj", 90, 347, 100, 27) GUICtrlSetOnEvent($zaniechaj, "Zaniechaj") ; przycisk dalej $dalej = GuiCtrlCreateButton("Dalej", 220, 347, 100, 27) GUICtrlSetState(-1,$GUI_FOCUS) GUICtrlSetOnEvent($dalej, "Dalej") ; GUI MESSAGE LOOP GuiSetState() While GuiGetMsg() <> $GUI_EVENT_CLOSE WEnd Func Dalej() ;here will be include EndFunc Func Zaniechaj() MsgBox(0, "Automat Lotus Notes - POPLAT", "Przerwane przez użytkownika") Exit EndFunc Func radio2() ;??? EndFunc Func zamknij() Exit EndFunc thx, poplat Edited April 9, 2005 by poplat Link to comment Share on other sites More sharing options...
phillip123adams Posted April 8, 2005 Share Posted April 8, 2005 The problem is that I have 3 radio , and each radio has its own input, how can i make other radio inputs disabled when one radio was chosen<{POST_SNAPBACK}>Have you seen the function GuiCtrlSetState?Set an event for each radio button, and have those functions enable or disable the appropriate controls. Phillip Link to comment Share on other sites More sharing options...
quaizywabbit Posted April 8, 2005 Share Posted April 8, 2005 (edited) add a "Group" control, and put the radio's inside it EDIT: whoops! helps if I read a bit more attentively Edited April 8, 2005 by quaizywabbit [u]Do more with pre-existing apps![/u]ANYGUIv2.8 Link to comment Share on other sites More sharing options...
poplat Posted April 9, 2005 Author Share Posted April 9, 2005 Have you seen the function GuiCtrlSetState?Set an event for each radio button, and have those functions enable or disable the appropriate controls.<{POST_SNAPBACK}>Yes i know the command and already use it in the script, but i do not know how to combine thesse coommand to work properly Link to comment Share on other sites More sharing options...
poplat Posted April 11, 2005 Author Share Posted April 11, 2005 thx to everybody that helped me, i finaly make it all work Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now