AndrewG Posted November 6, 2009 Share Posted November 6, 2009 Hello everyone, I have a GUI with two buttons; a play button and a stop button. Basicly what happens is When the play button is pressed a while loop is started and a number counter starts. When the stop button is pressed the loop is suppose to exit but I can't get it to exit. I can't see what's wrong, Would somebody help me with this. Thanks for your time. expandcollapse popup#include <GUIConstants.au3> Opt("MustDeclareVars", 1) Global $frmMain, $g_btnPlay, $g_btnStop, $sMessage, $msg Global $i_isPlay = 0 Global $i_Count = 1 $frmMain = GUICreate("Learning Looping", 800, 400, (@DesktopWidth - 800)/2, (@DesktopHeight - 400)/2,-1,-1) ;Master Play Controls $g_btnPlay = GUICtrlCreateButton("Play", 10, 360, 40, 30, -1, -1) $g_btnStop = GUICtrlCreateButton("Stop", 50, 360, 40, 30, -1, -1) ;Messages GUICtrlCreateGroup("Messages", 450, 180, 220, 140, -1, -1) $sMessage = GUICtrlCreateLabel("", 460, 200, 200, 100, -1, -1) GUICtrlCreateGroup("", -99, -99, 1,1);Close group GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $g_btnPlay btnPlay() Case $msg = $g_btnStop btnStop() Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd ;Play Function Func btnPlay() If $i_isPlay == 0 Then $i_isPlay = 1 GUICtrlSetData($sMessage, $i_isPlay) PlayLoop() ElseIf $i_isPlay == 1 Then Return Else Return EndIf EndFunc ;Stop Function Func btnStop() If $i_isPlay == 1 Then $i_isPlay = 0 GUICtrlSetData($sMessage, $i_isPlay) PlayLoop() ElseIf $i_isPlay == 0 Then Return Else Return EndIf EndFunc ;Loop function Func PlayLoop() While $i_isPlay == 1 $i_Count = $i_Count + 1 GUICtrlSetData($sMessage, $i_isPlay & @CRLF & " Looping" & @CRLF & $i_Count) If $i_isPlay == 0 Then GUICtrlSetData($sMessage, $i_isPlay & " Stoping") ExitLoop EndIf WEnd EndFunc Link to comment Share on other sites More sharing options...
JackDinn Posted November 6, 2009 Share Posted November 6, 2009 well you need to poll for the stop button in the loop your currently in so :- expandcollapse popup#include <GUIConstants.au3> Opt("MustDeclareVars", 1) Global $frmMain, $g_btnPlay, $g_btnStop, $sMessage, $msg Global $i_isPlay = 0 Global $i_Count = 1 $frmMain = GUICreate("Learning Looping", 800, 400, (@DesktopWidth - 800) / 2, (@DesktopHeight - 400) / 2, -1, -1) ;Master Play Controls $g_btnPlay = GUICtrlCreateButton("Play", 10, 360, 40, 30, -1, -1) $g_btnStop = GUICtrlCreateButton("Stop", 50, 360, 40, 30, -1, -1) ;Messages GUICtrlCreateGroup("Messages", 450, 180, 220, 140, -1, -1) $sMessage = GUICtrlCreateLabel("", 460, 200, 200, 100, -1, -1) GUICtrlCreateGroup("", -99, -99, 1, 1);Close group GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $g_btnPlay btnPlay() Case $msg = $g_btnStop btnStop() Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd ;Play Function Func btnPlay() If $i_isPlay == 0 Then $i_isPlay = 1 GUICtrlSetData($sMessage, $i_isPlay) PlayLoop() ElseIf $i_isPlay == 1 Then Return Else Return EndIf EndFunc ;==>btnPlay ;Stop Function Func btnStop() If $i_isPlay == 1 Then $i_isPlay = 0 GUICtrlSetData($sMessage, $i_isPlay) PlayLoop() ElseIf $i_isPlay == 0 Then Return Else Return EndIf EndFunc ;==>btnStop ;Loop function Func PlayLoop() While $i_isPlay == 1 $msg = GUIGetMsg() Select Case $msg = $g_btnStop btnStop() Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect $i_Count = $i_Count + 1 GUICtrlSetData($sMessage, $i_isPlay & @CRLF & " Looping" & @CRLF & $i_Count) If $i_isPlay == 0 Then GUICtrlSetData($sMessage, $i_isPlay & " Stoping") ExitLoop EndIf WEnd EndFunc ;==>PlayLoop Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 6, 2009 Share Posted November 6, 2009 While you are trapped in the While/WEnd loop of PlayLoop(), the GUI message loop is not running, so button hits are not detected. You might want to learn event mode instead of message loops for your GUIs. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
JackDinn Posted November 6, 2009 Share Posted November 6, 2009 yea your right but the problem with GUIOnEventMode", 1 is that it dont receive events again until you have returned from the func called from a previous event, so in his case while its in the "playloop" func he would have to manually poll for the stop button anyhow! This is the main reason why iv never really used this method. Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
AndrewG Posted November 7, 2009 Author Share Posted November 7, 2009 well you need to poll for the stop button in the loop your currently in so :- expandcollapse popup#include <GUIConstants.au3> Opt("MustDeclareVars", 1) Global $frmMain, $g_btnPlay, $g_btnStop, $sMessage, $msg Global $i_isPlay = 0 Global $i_Count = 1 $frmMain = GUICreate("Learning Looping", 800, 400, (@DesktopWidth - 800) / 2, (@DesktopHeight - 400) / 2, -1, -1) ;Master Play Controls $g_btnPlay = GUICtrlCreateButton("Play", 10, 360, 40, 30, -1, -1) $g_btnStop = GUICtrlCreateButton("Stop", 50, 360, 40, 30, -1, -1) ;Messages GUICtrlCreateGroup("Messages", 450, 180, 220, 140, -1, -1) $sMessage = GUICtrlCreateLabel("", 460, 200, 200, 100, -1, -1) GUICtrlCreateGroup("", -99, -99, 1, 1);Close group GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $g_btnPlay btnPlay() Case $msg = $g_btnStop btnStop() Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd ;Play Function Func btnPlay() If $i_isPlay == 0 Then $i_isPlay = 1 GUICtrlSetData($sMessage, $i_isPlay) PlayLoop() ElseIf $i_isPlay == 1 Then Return Else Return EndIf EndFunc ;==>btnPlay ;Stop Function Func btnStop() If $i_isPlay == 1 Then $i_isPlay = 0 GUICtrlSetData($sMessage, $i_isPlay) PlayLoop() ElseIf $i_isPlay == 0 Then Return Else Return EndIf EndFunc ;==>btnStop ;Loop function Func PlayLoop() While $i_isPlay == 1 $msg = GUIGetMsg() Select Case $msg = $g_btnStop btnStop() Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect $i_Count = $i_Count + 1 GUICtrlSetData($sMessage, $i_isPlay & @CRLF & " Looping" & @CRLF & $i_Count) If $i_isPlay == 0 Then GUICtrlSetData($sMessage, $i_isPlay & " Stoping") ExitLoop EndIf WEnd EndFunc ;==>PlayLoop Thank you very much for the answer. Link to comment Share on other sites More sharing options...
AndrewG Posted November 7, 2009 Author Share Posted November 7, 2009 yea your right but the problem with GUIOnEventMode", 1 is that it dont receive events again until you have returned from the func called from a previous event, so in his case while its in the "playloop" func he would have to manually poll for the stop button anyhow!This is the main reason why iv never really used this method.Which method are you referring to? The GUIOnEventMode, 1 or the way I have written my script? Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted November 7, 2009 Share Posted November 7, 2009 (edited) yea your right but the problem with GUIOnEventMode", 1 is that it dont receive events again until you have returned from the func called from a previous event, so in his case while its in the "playloop" func he would have to manually poll for the stop button anyhow!This is the main reason why iv never really used this method.That's a stupid argument, that is easily fixed by letting the play button set a global variable and then return the script. The variable is then checked in the main-loop and if it is True it does something. Since you aren't processing any event the click on STOP would be ran directly and you could then set the flag to False.It's not any harder than using GUIGetMsg(). OnEvent Mode is actually better since it wouldn't force "sleeps" everywhere, slowing down your script where you don't want to. Edited November 7, 2009 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
JackDinn Posted November 7, 2009 Share Posted November 7, 2009 (edited) That's a stupid argument, that is easily fixed by letting the play button set a global variable and then return the script. The variable is then checked in the main-loop and if it is True it does something. Since you aren't processing any event the click on STOP would be ran directly and you could then set the flag to False.yea i understand , but im just saying my point of view, it's fine here except he would have to rearrange his script (not a problem here) but iv found that using event mode 1 forces you to have all you "workings" inside 1 "main" loop. I mean you can shoot out from your main loop to change a flag, setup a gui, do some calculation etc etc that's fine as long as you don't intend to hang around inside any called functions. Personally I like to have separate parts to a program in separate functions, if 1 main loop contains all the workings for the whole program it gets a bit congested.Anyhow its just my opinion, some situations lend themselves to eventmode 1 and other dont.Each to his/her own Edited November 7, 2009 by JackDinn Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
AndrewG Posted November 7, 2009 Author Share Posted November 7, 2009 (edited) Thanks JackDinn and others for the help so far. Originally I was working with Opt("GUIOnEventMode", 1) but after reading the Autoit help My understanding became that the function that stated the loop was not returning to the gui so there was no way the stop function was going to be called. So I tried the Mesage-loop mode. Now I tried to exit the while loop in Opt("GUIOnEventMode", 1) as suggested by the other poster but ended up not being able to get it to work. My understanding at this point is that in order to call the btnStop function while the While loop is executing. I would have to capture the control-ID for stop button. Then compare the captured control-Id with the one stored in the variable holding the control-Id for the control that was clicked when the control was created at run time. If that was eveluated to true then the stop function would be called and the $i_isPlay flag variable value would change. So the while loop should exit. It's not happening. The brain I have been given just doesn't see what is wrong. I understand the Message-loop mode solution now that I see it. I need someone to explain what is wrong in my code useing the On event mode to me. Would somebody help me out? Thank you for your time. expandcollapse popup#include <GUIConstants.au3> ;Loop Not working Opt("MustDeclareVars", 1) Opt("GUIOnEventMode", 1) Global $frmMain, $g_btnPlay, $g_btnStop, $sMessage, $i_CtrlID Global $i_isPlay = 0 Global $i_Count = 1 $frmMain = GUICreate("Learning Looping", 800, 400, (@DesktopWidth - 800)/2, (@DesktopHeight - 400)/2,-1,-1) GUISetOnEvent($GUI_EVENT_CLOSE,"ExitApp") ;Master Play Controls $g_btnPlay = GUICtrlCreateButton("Play", 10, 360, 40, 30, -1, -1) GUICtrlSetOnEvent($g_btnPlay, "btnPlay") $g_btnStop = GUICtrlCreateButton("Stop", 50, 360, 40, 30, -1, -1) GUICtrlSetOnEvent($g_btnStop, "btnStop") ;Messages GUICtrlCreateGroup("Messages", 450, 180, 220, 140, -1, -1) $sMessage = GUICtrlCreateLabel("", 460, 200, 200, 100, -1, -1) GUICtrlCreateGroup("", -99, -99, 1,1);Close group GUISetState(@SW_SHOW) While 1 sleep(1000) WEnd Func ExitApp() Exit EndFunc ;Play Function Func btnPlay() If $i_isPlay == 0 Then $i_isPlay = 1 GUICtrlSetData($sMessage, $i_isPlay) PlayLoop() ElseIf $i_isPlay == 1 Then Return Else Return EndIf EndFunc ;Stop Function Func btnStop() If $i_isPlay == 1 Then $i_isPlay = 0 GUICtrlSetData($sMessage, $i_isPlay) PlayLoop() ElseIf $i_isPlay == 0 Then Return Else Return EndIf EndFunc ;Loop function Func PlayLoop() While $i_isPlay == 1 $i_CtrlID = @GUI_CTRLID ;$i_CtrlID = GUIGetMsg() If $i_CtrlID = $g_btnStop Then btnStop() EndIf #cs ;############################################################# ;Poll GUIGetMsg for stop button. ;This Solution: for Message-loop Mode version of script $msg = GUIGetMsg() Select Case $msg = $g_btnStop btnStop() Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect ;############################################################# #ce $i_Count = $i_Count + 1 GUICtrlSetData($sMessage, $i_isPlay & @CRLF & " Looping" & @CRLF & $i_Count) If $i_isPlay == 0 Then GUICtrlSetData($sMessage, $i_isPlay & " Stoping") ExitLoop EndIf WEnd EndFunc Edited November 7, 2009 by AndrewG Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 7, 2009 Moderators Share Posted November 7, 2009 AndrewG,I have simplified your code quite a bit and added a fair few comments to explain why. I hope you can follow:expandcollapse popup#include <GUIConstants.au3> Opt("MustDeclareVars", 1) Opt("GUIOnEventMode", 1) Global $frmMain, $g_btnPlay, $g_btnStop, $sMessage, $i_CtrlID = 0 Global $i_isPlay = False ; Makes it easier to toggle between True/False Global $i_Count = 1 $frmMain = GUICreate("Learning Looping", 800, 400, (@DesktopWidth - 800) / 2, (@DesktopHeight - 400) / 2) ; Not needed if only Default ,-1,-1) GUISetOnEvent($GUI_EVENT_CLOSE, "ExitApp") ;Master Play Controls $g_btnPlay = GUICtrlCreateButton("Play", 10, 360, 40, 30) ; Not needed if only Default , -1, -1) GUICtrlSetOnEvent($g_btnPlay, "btnPlay") $g_btnStop = GUICtrlCreateButton("Stop", 50, 360, 40, 30) ; Not needed if only Default , -1, -1) GUICtrlSetOnEvent($g_btnStop, "btnStop") ;Messages GUICtrlCreateGroup("Messages", 450, 180, 220, 140) ; Not needed if only Default , -1, -1) $sMessage = GUICtrlCreateLabel("", 460, 200, 200, 100) ; Not needed if only Default , -1, -1) GUICtrlCreateGroup("", -99, -99, 1, 1);Close group GUISetState(@SW_SHOW) While 1 Playloop() ; See if we need to play WEnd Func ExitApp() Exit EndFunc ;==>ExitApp ;Play Function Func btnPlay() $i_CtrlID = @GUI_CtrlId ; Save the ID of the button as a flag for Playloop() If $i_isPlay = False Then ; == 0 Then == is only for comparing case sensitive strings $i_isPlay = Not $i_isPlay ; Told you it is was easier! GUICtrlSetData($sMessage, $i_isPlay) ;ElseIf $i_isPlay == 1 Then Not needed as $i_IsPlay can only be True/False ; Return Else Return EndIf EndFunc ;==>btnPlay ;Stop Function - see above for explanation of changes Func btnStop() $i_CtrlID = @GUI_CtrlId If $i_isPlay = True Then $i_isPlay = Not $i_isPlay Else Return EndIf EndFunc ;==>btnStop ;Loop function Func PlayLoop() While $i_isPlay = 1 ; Again no need for == ; We only get here is the play button was pressed $i_Count = $i_Count + 1 GUICtrlSetData($sMessage, $i_isPlay & @CRLF & " Looping" & @CRLF & $i_Count) Sleep(500) ; Just so you can see what is going on in the label - my old eyes cannot cope with anything less WEnd ; We can get here if the stop button was pressed or if the ButtonID has been reset to 0 ; So if we do not check we get flickering in the label - try removing the If...Then part and see! If $i_CtrlId = $g_btnStop Then GUICtrlSetData($sMessage, $i_isPlay & @CRLF & "Stopping") ; Reset the buttonID so we do not fire anything when we loop next time $i_CtrlID = 0 EndFunc ;==>PlayLoopAlthough I can see what you were trying to do, I am a great believer in the KISS* principle and you, in my opinion, were getting a bit over-complicated. Not that you were wrong to try and do it another way - when I code I always think of Kipling: "There are nine and sixty ways of constructing tribal lays, and every single one of them is right!" Please ask if anything is unclear.M23* Keep It Simple Stupid 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...
Fubarable Posted November 8, 2009 Share Posted November 8, 2009 Newbie lurker and thread hijacker (sorry!) but what do you mean by this comment (repeated): ; Not needed if only Default , -1, -1) Thanks! Link to comment Share on other sites More sharing options...
Mat Posted November 8, 2009 Share Posted November 8, 2009 He has not included parameters for the styles and extended styles for the function on that line. It is a fairly common practice, but can get confusing when you see differences between the number of parameters shown in the helpfile and code. Mat AutoIt Project Listing Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 8, 2009 Moderators Share Posted November 8, 2009 Fubarable,Mat has it exactly. The OP's code read (for example):$g_btnPlay = GUICtrlCreateButton("Play", 10, 360, 40, 30, -1, -1)The final 2 parameters are merely setting the Style and Extended_Style to the default values and are not really needed. As I was simplifying the code as much as I could, I took the opportunity to point this out by ending the line where it could by inserting a ";" and a comment - leaving the unneccesary code at the end of the line:$g_btnPlay = GUICtrlCreateButton("Play", 10, 360, 40, 30) ; Not needed if only Default , -1, -1)As a general rule, anything you can do to reduce the code size is repaid in the reduced size of an eventual compiled exeLook Mat - he prefers lines like this:_WinAPI_SetWindowLong($hExplorer, $GWL_STYLE, -1064828928)to this:_WinAPI_SetWindowLong($hExplorer, $GWL_STYLE, BitOr($WS_POPUP, $WS_CHILD, $WS_BORDER))It is all a matter of personal preference. 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...
Mat Posted November 8, 2009 Share Posted November 8, 2009 (edited) Look Mat - he prefers lines like this: _WinAPI_SetWindowLong($hExplorer, $GWL_STYLE, -1064828928) to this: _WinAPI_SetWindowLong($hExplorer, $GWL_STYLE, BitOr($WS_POPUP, $WS_CHILD, $WS_BORDER)) It is all a matter of personal preference. M23 That not only saves on the line length, but also an include, I have just released my next project, which is 3000+ lines, and uses 10 different GUI's. The only includes are _SendMessage.Au3 and Array.au3, both I am only using 1 function from. (Which reminds me, I'm going to copy those into my code too.) Includes will very often double the length of your code and declare a lot more variables than you can imagine. To hell with readability, its a program and I am the sole developer. UDF's are a different story, I do try and make those readable. Mat Edit: probably not the best thing to be teaching people new to AutoIt to do is it Edit 2:And yet...I am sure you can see how this makes reading the thread much easier - and saves on server space Edited November 8, 2009 by Mat AutoIt Project Listing Link to comment Share on other sites More sharing options...
JackDinn Posted November 8, 2009 Share Posted November 8, 2009 Yea sorry i know we are hijacking this thread a little but iv often wondered if there is a method/app to pick out the "used" func's & constants from your #includes and put them into your script ? so then you can get rid of a lot of the extras that get included in your script when you use an #include. (as mentioned above) i have seen Obfuscator but i kinda get put off as soon as i see the comment that goes something like "Using Obfuscator will make your script very difficult to read!" and im not even sure if thats what its for. Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 8, 2009 Moderators Share Posted November 8, 2009 Mat,To carry on with the advanced tutorial now that we have started - do you use the /SO option with Obfuscator? That strips all the unused constants and functions from any includes and seriously reduces the size of your final exe/au3. Jos has done a wonderful job with it and I find it can save as much as half the size of a script.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...
Moderators Melba23 Posted November 8, 2009 Moderators Share Posted November 8, 2009 jackDinn,I have just seen your post.Obfuscator can make your script difficult to read - but it all depends on the parameters you set. You can read all about it from within SciTE via the <Help - SciTE Help> menu. There are a whole range of switches which allow you to shrink your script, make it difficult to read, etc. But you still keep your original script unchanged whenever you use it - it is only the compiler that has to deal with the Obfuscated version.Do try it and see, It is a real boon to the AutoIt community - and no I am not being paid by Jos to say that! 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...
Developers Jos Posted November 8, 2009 Developers Share Posted November 8, 2009 (edited) i have seen Obfuscator but i kinda get put off as soon as i see the comment that goes something like "Using Obfuscator will make your script very difficult to read!" and im not even sure if thats what its for.Yea, well the original intent of Obfuscators was to .... Obfuscate the script to make it hard to read and thus harder to change by others. I added the /StripOnly type functionally later to it as Obfuscator had all the needed information available to know whether Variables/Functions were used somewhere in the script and didn't want to make it a separate spin-off program. Edited November 8, 2009 by Jos 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...
Developers Jos Posted November 8, 2009 Developers Share Posted November 8, 2009 Do try it and see, It is a real boon to the AutoIt community - and no I am not being paid by Jos to say that! Sure you do... I pay you 5% each month of what I get. 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...
JackDinn Posted November 8, 2009 Share Posted November 8, 2009 LOL, looks like you will be getting another 5% shortly then, if all goes well as im going to go have another good hard look at Obfuscator and this time get past the "makes your script hard to read" bit Cheers chaps. Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D 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