UniStudent Posted June 15, 2007 Share Posted June 15, 2007 hi all i have a few simple questions about my gui. the questions are bellow but i think it all makes more sense if you run the program or at least look at the code. so i have uploaded the file and i have put the appropriates q? by the the area of script that i think it belongs with. 1. is it possible to get my program to sense how many Hard drives my computer has then display the appropriate number of check boxes 2. how do i make the passes item un usable until options (Classified- DoD 5220-22.M or Top Secret- Guttman Algorithm are selected) 3. How do i stop the passes item going lower than 1 and higher than 35 4. How do i set the Button color with out losing the pic? 5. How do i make a Case statement run another Case statement any help on any of these items would be great thanks againoptions.au3 Link to comment Share on other sites More sharing options...
BrettF Posted June 15, 2007 Share Posted June 15, 2007 Q1- Yes. Try this in your code. I think you know where it goes I also added the label ; TREEVIEW DrivOP $DriveOP = GuiCtrlCreateTreeView(70, 130, 41, 80, $TVS_CHECKBOXES); is it posiable to get my program to sense how many drives my computer has then disply the aproprout number of check boxes $drives = DriveGetDrive ("FIXED") $x = 132 For $i = 1 to $drives[0] $label = DriveGetLabel($drives[$i]) GuiCtrlCreateTreeViewItem($drives[$i], $DriveOP) GuiCtrlCreateLabel($label, 110, $x, 80, 20) $x += 16 Next GUICtrlSetColor ($DriveOP,0xD00000) GUICtrlSetBkColor ($DriveOP,0x4AB5FF) GuiCtrlCreateLabel("Select securaty settings:", 70, 270, 200, 20) I've got to go now... So probably not much more help from me Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
UniStudent Posted June 15, 2007 Author Share Posted June 15, 2007 thanks Bert most us full Link to comment Share on other sites More sharing options...
UniStudent Posted June 15, 2007 Author Share Posted June 15, 2007 ace now iv solved prob 4 the button 1 as well. Link to comment Share on other sites More sharing options...
ResNullius Posted June 15, 2007 Share Posted June 15, 2007 3. How do i stop the passes item going lower than 1 and higher than 35 Use GuiCtrlSetLimit(). Add the limit statement after you create your UpDown control, thus: GuiCtrlCreateLabel("Passes", 340, 270) ;How do i stop the passes item going lowere than 1 and higher than 35 GuiCtrlCreateInput("2", 340, 285, 40, 20) GuiCtrlCreateUpDown(-1) GUICtrlSetLimit(-1,35,1) 5. How do i make a Case statement run another Case statement You can nest another "Select/EndSelect" inside an existing Case Hope that helps Link to comment Share on other sites More sharing options...
UniStudent Posted June 18, 2007 Author Share Posted June 18, 2007 tar man thats a great help but i still don't really understand the nesting the case statement, any chance of a little more help Link to comment Share on other sites More sharing options...
ResNullius Posted June 19, 2007 Share Posted June 19, 2007 tar man thats a great help but i still don't really understand the nesting the case statement, any chance of a little more help Here's a simple example, note the 2nd Select construct "nested" inside of the 1st Select after the second Case - Case StringInStr($Str,"John"). If you change the "Smith" in the variable $str to "Brown", you will only get the message box with "John" from the last Case of the nested select. And if that was too confusing, just run the sample $str = "John Smith" Select Case StringInStr($Str,"Joe") MsgBox(0,"","Joe") Case StringInStr($Str,"John") Select Case StringInStr($Str,"Smith") MsgBox(0,"",$Str) Case Else MsgBox(0,"","John") EndSelect EndSelect Link to comment Share on other sites More sharing options...
UniStudent Posted June 19, 2007 Author Share Posted June 19, 2007 Here's a simple example, note the 2nd Select construct "nested" inside of the 1st Select after the second Case - Case StringInStr($Str,"John"). If you change the "Smith" in the variable $str to "Brown", you will only get the message box with "John" from the last Case of the nested select. And if that was too confusing, just run the sample $str = "John Smith" Select Case StringInStr($Str,"Joe") MsgBox(0,"","Joe") Case StringInStr($Str,"John") Select Case StringInStr($Str,"Smith") MsgBox(0,"",$Str) Case Else MsgBox(0,"","John") EndSelect EndSelect lol no i understand how to nest the case what i don't understand is well let me demonstrate with my code: Case $msg = $Hellpbutton1 Msgbox(64,"PUP- Quick Star Help","Select one of the options etc") Case $msg = $SUBMenuHELPitem $msg = $SUBMenuaboutitem1 Case $msg = $SUBMenuaboutitem1 MsgBox(64,"About","PUP - Data deletion program etc") what id like to do is get Case $msg = $SUBMenuHELPitem to run Case $msg = $SUBMenuaboutitem1 or at least display its msgbox with out just copying and pasting it in. sorry i should have been more clear. any ideas or have i just missed the plot Link to comment Share on other sites More sharing options...
ResNullius Posted June 19, 2007 Share Posted June 19, 2007 what id like to do is get Case $msg = $SUBMenuHELPitem to run Case $msg = $SUBMenuaboutitem1 or at least display its msgbox with out just copying and pasting it in. sorry i should have been more clear. any ideas or have i just missed the plot Either: Case $msg = $SUBMenuHELPitem OR $msg = $SUBMenuaboutitem1 MsgBox(64,"About","PUP - Data deletion program etc") Or, to use your original code structure, checkout the ContinueCase example in the helpfile. Link to comment Share on other sites More sharing options...
UniStudent Posted July 3, 2007 Author Share Posted July 3, 2007 ha stare thanks guys just the ticket 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