ksmith247 Posted June 25, 2007 Share Posted June 25, 2007 Thanks to all of you who have answered my questions in the past. Psalty will be happy to learn that I am on to a new script. This one should be quite simple. All I want is to list computers in a GUI, allow the user to select the computer they want to share to and click a button to make the connection. I have thought about radio buttons and have checked the GUICtrlCreateRadio sample but I'm afraid that may be to much once the list of choices grows to 15 or 20. So I thought about GUICtrlCreateCombo and that seems like a more logical choice. My problem is I'm not really sure how to get started. I could move forward using the GUICtrlCreateRadio example but I don't know how to make the thing wait for a button click. I would assume that whether coming from a radio button or a combo box list, the actual code that makes something happen would be similar. I'm pretty good a picking things up once they have been dumbed down a bit and most of what I have read doesn't make much sense to me. If anyone feels like helping out an old desktop support guy I sure would appreciate a push in the right direction. Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size] Link to comment Share on other sites More sharing options...
enaiman Posted June 26, 2007 Share Posted June 26, 2007 Indeed - to create a combobox will be much easier since you could have so many choices. I'm wondering if you're using OnEventMode. If you do the I could help you with this because I've used that myself. Anyway here is a sample of what you can do: $combo = GUICtrlCreateCombo("", coords here, coords here, coords here, coords here, BitOR($CBS_DROPDOWNLIST, $WS_VSCROLL, $CBS_SORT)) GUICtrlSetOnEvent(-1, "comboChange") This will make your combo to be readonly and sorted. then you can make a function to do whatever you want when something change in the combobox (something is selected) Func comboChange() Switch GUICtrlRead ($combo) Case content1 do stuff here Case content2 do other stuff here ... and so on .... EndSwitch EndFunc This is OnEventMode but you can rewrite the code to get what is the best for you. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
ksmith247 Posted June 26, 2007 Author Share Posted June 26, 2007 Thanks for the input. I will give this a shot in the morning. Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size] Link to comment Share on other sites More sharing options...
ksmith247 Posted June 26, 2007 Author Share Posted June 26, 2007 I have spent much of the day trying to make this work and finally got a simple message loop to function. It seems that I cannot comprehend OnEventMode at this time. Thanks for the tip though. Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size] Link to comment Share on other sites More sharing options...
Valuater Posted June 26, 2007 Share Posted June 26, 2007 This is a great way to see if a box/radio is cheked Func _IsChecked($control) Return BitAnd(GUICtrlRead($control),$GUI_CHECKED) = $GUI_CHECKED EndFuncoÝ÷ ÙKjëh×6If _IsChecked($radio1) then 8) 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