Orkhayiq Posted March 3, 2010 Share Posted March 3, 2010 (edited) In my script I have 2 parts. The code inside a While Select Case and the code outside of it above where all the GUICreate.. etc goes. (Sorry, Still learning so I gotta elaborate on simple things I don't know terms for or whatever just to get my point across! )I have $DirectX_CmbBox which is a ComboBox with the set data of "Auto|9|10|11" and I'd like my radio buttons to be disabled $GUI_DISABLE when the user selects "9" from the ComboBox except for the first radio button of $AF_Radio_1x. I have managed to make the radio buttons disabled if the ComboBox GUICtrlReads "9" and when the control reads Auto, 10 or 11 they are enabled though I have one problem. The radio buttons are constantly flashing/blinking.All the code is inside a While amongst other Cases. The code itself that I've written so far is most likely long winded and not very efficient, but all I'd really like help with is stopping the controls from blinking (the radio buttons).expandcollapse popupCase GUICtrlRead($DirectX_CmbBox) = "9" GUICtrlSetState($AF_Radio_1x, $GUI_CHECKED) GUICtrlSetState($AA_Radio_2x, $GUI_DISABLE) GUICtrlSetState($AA_Radio_4x, $GUI_DISABLE) GUICtrlSetState($AA_Radio_8x, $GUI_DISABLE) GUICtrlSetState($AA_Radio_8xQ, $GUI_DISABLE) GUICtrlSetState($AA_Radio_16x, $GUI_DISABLE) GUICtrlSetState($AA_Radio_16xQ, $GUI_DISABLE) Case GUICtrlRead($DirectX_CmbBox) = "10" GUICtrlSetState($AA_Radio_2x, $GUI_ENABLE) GUICtrlSetState($AA_Radio_4x, $GUI_ENABLE) GUICtrlSetState($AA_Radio_8x, $GUI_ENABLE) GUICtrlSetState($AA_Radio_8xQ, $GUI_ENABLE) GUICtrlSetState($AA_Radio_16x, $GUI_ENABLE) GUICtrlSetState($AA_Radio_16xQ, $GUI_ENABLE) Case GUICtrlRead($DirectX_CmbBox) = "11" GUICtrlSetState($AA_Radio_2x, $GUI_ENABLE) GUICtrlSetState($AA_Radio_4x, $GUI_ENABLE) GUICtrlSetState($AA_Radio_8x, $GUI_ENABLE) GUICtrlSetState($AA_Radio_8xQ, $GUI_ENABLE) GUICtrlSetState($AA_Radio_16x, $GUI_ENABLE) GUICtrlSetState($AA_Radio_16xQ, $GUI_ENABLE) Case GUICtrlRead($DirectX_CmbBox) = "Auto" GUICtrlSetState($AA_Radio_2x, $GUI_ENABLE) GUICtrlSetState($AA_Radio_4x, $GUI_ENABLE) GUICtrlSetState($AA_Radio_8x, $GUI_ENABLE) GUICtrlSetState($AA_Radio_8xQ, $GUI_ENABLE) GUICtrlSetState($AA_Radio_16x, $GUI_ENABLE) GUICtrlSetState($AA_Radio_16xQ, $GUI_ENABLE)I always do my best to check and understand the helpfile before asking, forgive me if I missed the answer.TIA! Edited March 3, 2010 by Orkhayiq Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 3, 2010 Moderators Share Posted March 3, 2010 (edited) Orkhayiq, The trick to prevent flashing is to check if the control is already in the state you want before (re)setting it: #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) $hCheck = GUICtrlCreateCheckbox(" Switch", 10, 10, 100, 20) $hRadio_1 = GUICtrlCreateRadio(" Radio 1", 10, 50, 100, 20) $hRadio_2 = GUICtrlCreateRadio(" Radio 2", 10, 90, 100, 20) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch If GUICtrlRead($hCheck) = 1 Then GUICtrlSetState($hRadio_1, $GUI_DISABLE) If BitAND(GUICtrlGetState($hRadio_2), $GUI_DISABLE) <> $GUI_DISABLE Then GUICtrlSetState($hRadio_2, $GUI_DISABLE) Else GUICtrlSetState($hRadio_1, $GUI_ENABLE) If BitAND(GUICtrlGetState($hRadio_2), $GUI_ENABLE) <> $GUI_ENABLE Then GUICtrlSetState($hRadio_2, $GUI_ENABLE) EndIf WEnd I hope that the difference between the way the 2 radios are dealt with is clear. M23 Edited March 3, 2010 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Orkhayiq Posted March 3, 2010 Author Share Posted March 3, 2010 (edited) I'm working on figuring out my problem with your example. Just a quick question before I attack it properly. Is your example meant to have Radio 2 flashing? Is this to show me the difference or just an error on your side or something? Radio 1 is fine. Thanks. Edited March 3, 2010 by Orkhayiq Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 3, 2010 Moderators Share Posted March 3, 2010 Orkhayiq,Sorry - a "copy-paste" error meant I got the titles the wrong way round. I have edited the post above. The top radio should flash, the bottom one remain steady, i.e. 1 = flash and 2 = not!Apologies again! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Orkhayiq Posted March 3, 2010 Author Share Posted March 3, 2010 Human error. What can you do.. ..Fix it, like you did! Thanks Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 3, 2010 Moderators Share Posted March 3, 2010 Orkhayiq,As the English saying goes:To err is human, to forgive divine*. Guess you live on Mount Olympus then..... M23*Alexander Pope, An Essay on CriticismEnglish poet & satirist (1688 - 1744) Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Orkhayiq Posted March 3, 2010 Author Share Posted March 3, 2010 (edited) Funnily, Mr. Pope's old residency is nearby where I live.I'm no Zeus but I try What I've managed so far:If GUICtrlRead($DirectX_CmbBox) = "9" Then If BitAND(GUICtrlGetState($AA_Radio_1x), $GUI_UNCHECKED) <> $GUI_UNCHECKED Then GUICtrlSetState($AA_Radio_1x, $GUI_CHECKED) If BitAND(GUICtrlGetState($AA_Radio_2x), $GUI_DISABLE) <> $GUI_DISABLE Then GUICtrlSetState($AA_Radio_2x, $GUI_DISABLE) If BitAND(GUICtrlGetState($AA_Radio_4x), $GUI_DISABLE) <> $GUI_DISABLE Then GUICtrlSetState($AA_Radio_4x, $GUI_DISABLE) If BitAND(GUICtrlGetState($AA_Radio_8x), $GUI_DISABLE) <> $GUI_DISABLE Then GUICtrlSetState($AA_Radio_8x, $GUI_DISABLE) If BitAND(GUICtrlGetState($AA_Radio_8xQ), $GUI_DISABLE) <> $GUI_DISABLE Then GUICtrlSetState($AA_Radio_8xQ, $GUI_DISABLE) If BitAND(GUICtrlGetState($AA_Radio_16x), $GUI_DISABLE) <> $GUI_DISABLE Then GUICtrlSetState($AA_Radio_16x, $GUI_DISABLE) If BitAND(GUICtrlGetState($AA_Radio_16xQ), $GUI_DISABLE) <> $GUI_DISABLE Then GUICtrlSetState($AA_Radio_16xQ, $GUI_DISABLE) Else If BitAND(GUICtrlGetState($AA_Radio_2x), $GUI_ENABLE) <> $GUI_ENABLE Then GUICtrlSetState($AA_Radio_2x, $GUI_ENABLE) If BitAND(GUICtrlGetState($AA_Radio_4x), $GUI_ENABLE) <> $GUI_ENABLE Then GUICtrlSetState($AA_Radio_4x, $GUI_ENABLE) If BitAND(GUICtrlGetState($AA_Radio_8x), $GUI_ENABLE) <> $GUI_ENABLE Then GUICtrlSetState($AA_Radio_8x, $GUI_ENABLE) If BitAND(GUICtrlGetState($AA_Radio_8xQ), $GUI_ENABLE) <> $GUI_ENABLE Then GUICtrlSetState($AA_Radio_8xQ, $GUI_ENABLE) If BitAND(GUICtrlGetState($AA_Radio_16x), $GUI_ENABLE) <> $GUI_ENABLE Then GUICtrlSetState($AA_Radio_16x, $GUI_ENABLE) If BitAND(GUICtrlGetState($AA_Radio_16xQ), $GUI_ENABLE) <> $GUI_ENABLE Then GUICtrlSetState($AA_Radio_16xQ, $GUI_ENABLE) EndIfI can't manage to get the $AF_Radio_1x button to always be checked If GUICtrlRead($DirectX_CmbBox) = "9". Also, if another radio button was previously checked.. and I choose "9" in the ComboBox then the previous just greys out but doesn't remove the check meaning I can then select the first radio button as well resulting in 2 buttons checked. (One enabled checked, one disabled checked.)I'm guessing if I can manage to get the first button ($AF_Radio_1x) to be checked on "9" then it'll remove the last checked one.Edited code to include:If BitAND(GUICtrlGetState($AA_Radio_1x), $GUI_UNCHECKED) <> $GUI_UNCHECKED Then GUICtrlSetState($AA_Radio_1x, $GUI_CHECKED)Simpler than I thought!I can settle for the functionality of how it's working now. But..What would be better is if the previously selected Radio Button would uncheck on selecting "9" (like it does already) but then recheck the last selected button before it had GUISetState'ed it to the first button.Thanks once again M23 Edited March 3, 2010 by Orkhayiq Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 3, 2010 Moderators Share Posted March 3, 2010 Orkhayiq,Just a thought. If you created your $AA_Radio* controls in IMMEDIATE succession, you could use a loop to save your fingers a whole load of typing. A quick example:#include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) $hRadio_1 = GUICtrlCreateRadio(" Radio 1", 10, 10, 100, 20) GUICtrlCreateRadio(" Radio 2", 10, 50, 100, 20) GUICtrlCreateRadio(" Radio 3", 10, 90, 100, 20) GUICtrlCreateRadio(" Radio 4", 10, 130, 100, 20) GUICtrlCreateRadio(" Radio 5", 10, 170, 100, 20) GUISetState() Sleep(2000) For $i = $hRadio_1 To $hRadio_1 + 4 GUICtrlSetState($i, $GUI_DISABLE) Next Sleep(2000) For $i = $hRadio_1 To $hRadio_1 + 4 GUICtrlSetState($i, $GUI_ENABLE) Next While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEndRemember - you must have the controls created in IMMEDIATE succession or the ControlIDs are not successive and this will not work. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Orkhayiq Posted March 3, 2010 Author Share Posted March 3, 2010 Cheers for the advice. I'll see what I can do. In the meanwhile. Is there anyway to stop the first radio button from being checked unless it is actually clicked. At the moment, if the mouseovers the "9" in the ComboBox list it causes it to check the first Radio Button. If I could make it only cause the reaction if it is actually clicked would be better. Got any suggestions where to start? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 3, 2010 Moderators Share Posted March 3, 2010 Orkhayiq,Perhaps if you let me see a bit more of the code, I might be able to suggest something...... Four Case statements do not a script make! PM the code if you do not want it in open forum.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Orkhayiq Posted March 3, 2010 Author Share Posted March 3, 2010 (edited) The code isn't a money-maker so I don't mind posting it here! ..But it's bloated, messy and too much to look through so I cut out the rest unrelated to the topic. expandcollapse popup#include <GUIConstantsEx.au3> #include <ComboConstants.au3> GUICreate("TEST", 500, 500) GUISetState(@SW_SHOW) ; DIRECTX $Graphics_DirectX_ini = IniRead ( @MyDocumentsDir&"\BFBC2\settings.ini", "Graphics", "DxVersion", "NotFound" ) $DirectX_CmbBox = GUICtrlCreateCombo("", 130, 300, 110, 20, $CBS_DROPDOWNLIST) $DxVars = GUICtrlSetData(-1, "Auto|9|10|11", $Graphics_DirectX_ini ) ; ANTI-ALIASING $AA = GUICtrlCreateGroup("Anti-Aliasing", 255, 300, 215, 55) GUICtrlSetFont($AA, "8", 1000) $Graphics_AA_ini = IniRead ( @MyDocumentsDir&"\BFBC2\settings.ini", "Graphics", "MSAA", "NotFound" ) $AA_Radio_1x = GUICtrlCreateRadio( "1x", 265, 315, -1, 13) $AA_Radio_2x = GUICtrlCreateRadio( "2x", 305, 315, -1, 13) $AA_Radio_4x = GUICtrlCreateRadio( "4x", 345, 315, -1, 13) $AA_Radio_8x = GUICtrlCreateRadio( "8x", 385, 315, -1, 13) $AA_Radio_8xQ = GUICtrlCreateRadio( "8xQ", 425, 315, -1, 13) $AA_Radio_16x = GUICtrlCreateRadio( "16x", 265, 335, -1, 13) $AA_Radio_16xQ = GUICtrlCreateRadio( "16xQ", 305, 335, -1, 13) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit EndIf If GUICtrlRead($DirectX_CmbBox) = "9" Then If BitAND(GUICtrlGetState($AA_Radio_1x), $GUI_UNCHECKED) <> $GUI_UNCHECKED Then GUICtrlSetState($AA_Radio_1x, $GUI_CHECKED) If BitAND(GUICtrlGetState($AA_Radio_2x), $GUI_DISABLE) <> $GUI_DISABLE Then GUICtrlSetState($AA_Radio_2x, $GUI_DISABLE) If BitAND(GUICtrlGetState($AA_Radio_4x), $GUI_DISABLE) <> $GUI_DISABLE Then GUICtrlSetState($AA_Radio_4x, $GUI_DISABLE) If BitAND(GUICtrlGetState($AA_Radio_8x), $GUI_DISABLE) <> $GUI_DISABLE Then GUICtrlSetState($AA_Radio_8x, $GUI_DISABLE) If BitAND(GUICtrlGetState($AA_Radio_8xQ), $GUI_DISABLE) <> $GUI_DISABLE Then GUICtrlSetState($AA_Radio_8xQ, $GUI_DISABLE) If BitAND(GUICtrlGetState($AA_Radio_16x), $GUI_DISABLE) <> $GUI_DISABLE Then GUICtrlSetState($AA_Radio_16x, $GUI_DISABLE) If BitAND(GUICtrlGetState($AA_Radio_16xQ), $GUI_DISABLE) <> $GUI_DISABLE Then GUICtrlSetState($AA_Radio_16xQ, $GUI_DISABLE) Else If BitAND(GUICtrlGetState($AA_Radio_2x), $GUI_ENABLE) <> $GUI_ENABLE Then GUICtrlSetState($AA_Radio_2x, $GUI_ENABLE) If BitAND(GUICtrlGetState($AA_Radio_4x), $GUI_ENABLE) <> $GUI_ENABLE Then GUICtrlSetState($AA_Radio_4x, $GUI_ENABLE) If BitAND(GUICtrlGetState($AA_Radio_8x), $GUI_ENABLE) <> $GUI_ENABLE Then GUICtrlSetState($AA_Radio_8x, $GUI_ENABLE) If BitAND(GUICtrlGetState($AA_Radio_8xQ), $GUI_ENABLE) <> $GUI_ENABLE Then GUICtrlSetState($AA_Radio_8xQ, $GUI_ENABLE) If BitAND(GUICtrlGetState($AA_Radio_16x), $GUI_ENABLE) <> $GUI_ENABLE Then GUICtrlSetState($AA_Radio_16x, $GUI_ENABLE) If BitAND(GUICtrlGetState($AA_Radio_16xQ), $GUI_ENABLE) <> $GUI_ENABLE Then GUICtrlSetState($AA_Radio_16xQ, $GUI_ENABLE) EndIf WEnd If you select any other value besides "9" on the dropdown and click any other radio box than the first one, and then, move-over the dropdown value "9" and it'll set the radio button to the first one. I'd rather it only happen on mouse-click than mouse-over. Dig in. Also: Four Case statements do not a script make! Eh? Oh.. I guess you meant 'make a script!' that took far too long to figure out hah. Edited March 3, 2010 by Orkhayiq Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 3, 2010 Moderators Share Posted March 3, 2010 Orkhayiq,First things first:"One swallow does not a summer make, nor one fine day; similarly one day or brief time of happiness does not make a person entirely happy"Aristotle (384 BC - 322 BC); -----------Now let us talk of AutoIt, "of cabbages and kings, of why the sea is boiling hot, and whether pigs have wings"*You need to look at the state of the Combobox and wait until it is no longer open before actioning the Case statements. Try this line:If GUICtrlRead($DirectX_CmbBox) = "9" And _GUICtrlComboBox_GetDroppedState($DirectX_CmbBox) = False Thenand add #Include <GuiComboBox.au3> at the top of the script. I only get the "1x" Radio selected if I select 9 in the Combo, not if I mouse-over it with the Combo still open.You may have to unselect all the Radios after you have run each Case statement though - I often find you need to reset all controls to a neutral state before any reselection.I hope this helps. M23* Lewis Carroll - Through the Looking-Glass and What Alice Found There - 1872 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Orkhayiq Posted March 4, 2010 Author Share Posted March 4, 2010 (edited) ..you and your quotes! Thank you very much, that line worked like a charm!Couldn't of done it without you.I don't fully understand what you meant by the possible need to unselect the Radios after running each Case, but all seems fine so I don't think I'm getting any problems All that is left to do with my outstanding IniWriter is to attach an Icon to replace the AutoIt default. I managed to find out how to do so using the Aut2exe.exe. The only problem I have is this. It's not essential but it would be nice to fix since with Vista and Win7, most applications come with high-res .icos as standard. Any idea?Was a Win7 bug. I did try refresh, moving to different folders when it was giving the error but now, on a later attempt, it is working perfectly.Thanks, officially finished my prog! ..naturally I've come up with something else I could do. When the user presses the about window, I'd like to display the compiled .ico instead of a question mark(32) icon for example. I'll see if I can figure it out..Also a question: Do you know if the .exe compiler writes comments into and .exe? like ; This is a comment. Would it be present inside the .exe but left out from running like how the script handles it, or would it not be written at all? (I'm deleting comments just to make it smaller and more like a finished piece.) Edited March 4, 2010 by Orkhayiq Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 4, 2010 Moderators Share Posted March 4, 2010 Orkhayiq, I don't fully understand what you meant by the possible need to unselect the Radios after running each CaseIf you run the script you posted (with my additions) then you will see what I mean. Select anything other than 9 in the Combo and the "1x" radio remain unchecked. Select 9 and it is checked. Reselect anything else and it remains checked. Do you want it selected for the other cases or not? That is why I said that resetting everything at the end of an operation is not a bad thing as you then start from a known point. When the user presses the about window, I'd like to display the compiles .ico instead of a question mark(32) iconYou might like to look at this excellent UDF which may help. Do you know if the .exe compiler writes comments into and .exe?No, it strips everything bar code. So you have no need to delete your comments - then you might stand a chance of understanding the code in a few months, weeks (or in my case days! ) time. You might like to look at Obfuscator - Jos initially wrote it to befuddle anyone trying to look at the compiled script, but it has developed over time into something much more powerful which amongst other things helps make your exes much smaller. You get it with the full SciTE4AutoIt3 package, which you can download here. I cannot recommend it highly enough - you get lots of goodies to make your life easier. In fact most people wonder how they ever lived without it once they have installed it! (Another commission payment please Jos! ) M23 P.S. No quotes this time, did you notice? Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Orkhayiq Posted March 4, 2010 Author Share Posted March 4, 2010 (edited) If you run the script you posted (with my additions) then you will see what I mean. Select anything other than 9 in the Combo and the "1x" radio remain unchecked. Select 9 and it is checked. Reselect anything else and it remains checked. Do you want it selected for the other cases or not?That is why I said that resetting everything at the end of an operation is not a bad thing as you then start from a known point. Ah I think I understand you now!You might like to look at this excellent UDF which may help. I did do a search or two but wasn't probably searching the right keywords it seems. If I can implement it within a couple hours that'll be good otherwise I'll keep this in mind for future projects, thanks. EDIT: Looks like I already have that UDF, didn't know it had that functionality. Now to do some reading, testing, compiling then deploying!No, it strips everything bar code. So you have no need to delete your comments - then you might stand a chance of understanding the code in a few months, weeks (or in my case days! ) time.Ahh, very nice. Now I gotta copy the comments back in from my outdated backup .au3! Atleast I won't be making this mistake again. You might like to look at Obfuscator - Jos initially wrote it to befuddle anyone trying to look at the compiled script, but it has developed over time into something much more powerful which amongst other things helps make your exes much smaller. You get it with the full SciTE4AutoIt3 package, which you can download here. I cannot recommend it highly enough - you get lots of goodies to make your life easier. In fact most people wonder how they ever lived without it once they have installed it! (Another commission payment please Jos! )I've downloaded the SciTE full pack a couple days ago an noticed a lot of the menubar submenus had a lot more in 'em!I tried using the Obfuscator without much success. It's most likely my code or error on my behalf because I couldn't get it to work! ..and it looked like it was making my code bigger than actually smaller. 1000 lines of code transformed into 9000 haha and the filesize of the compiled .exe went up to the same size as the one packing a 200kb high res icon included. I'm doing something wrong here I know it. Well, I've got time to figure it out at another point. 680kb for my mini-app is just fine for me liking.Thanks for all your help! P.S No quotes? I knew you'd run out soon Hahah Edited March 4, 2010 by Orkhayiq Link to comment Share on other sites More sharing options...
Developers Jos Posted March 4, 2010 Developers Share Posted March 4, 2010 (Another commission payment please Jos! )I give you 10% of what I am payed for it. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 4, 2010 Moderators Share Posted March 4, 2010 Orkhayiq,Your code probably became bigger because all of the include files were added. You might want to use Obfusctor with the /StripOnly parameter to get rid of all the functions in the include files that you are not using.It takes a while to get used to all the new toys in the full SciTE version, but it is worth persevering as they really do help. Jos,Getting better - it was only 5% last time. Although I suppose that as even 100% would still be nothing, I have not really gained anything! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Orkhayiq Posted March 5, 2010 Author Share Posted March 5, 2010 (edited) In that case I'll take a cut please too. I just discovered the Koda(FormDesigner) and oh my God..This is great! Wish I'd known about it at the start of the project. Making big GUI changes at the end of the project can be a pain moving all the elements around!I'm guessing you can use it to change the layout at any point relatively easily..Lovely beginners tool and for the lazy advanced ones too Looks like an all-round time saver.We live and learn, and I've got a lot of the later left.. in fact, quite a lot of both.Haha, take it easy Edited March 5, 2010 by Orkhayiq 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