Morthawt Posted October 6, 2014 Share Posted October 6, 2014 I am curious, what would cause a script to always crash when trying to Tidy it up? I put my script into the VMware Guest I use to make my tutorials and it Tidied fine, even after I made sure it had the latest version of both AutoIt and scite editor. This is a script I wrote as a fun little thing to generate TeamSpeak 3 identities and check their unique ID for words and if found export them to a file so I could use them. But at some point during coding the Tidy tool just crashes every time. I do not have this issue with my other scripts. expandcollapse popup#RequireAdmin AutoItSetOption('TrayAutoPause', 0) AutoItSetOption('MouseCoordMode', 0) Global $SuccessCount = 0, $Button_Export[2] = [380, 56], $Button_ADD[2] = [48, 58], $Button_DEL[2] = [129, 56], $Button_IMP[2] = [387, 329], $Box_NextLevel[2] = [232, 115], $Area_ID_LIST[2] = [87, 96], $Box_LastID[2] = [287, 292] HotKeySet('!x', '_exit') Func _exit() Exit EndFunc DirCreate(@ScriptDir & '\Morthawt''s ID Creator ID''s\Words Anywhere') DirCreate(@ScriptDir & '\Morthawt''s ID Creator ID''s\Starts With A Word') DirCreate(@ScriptDir & '\Morthawt''s ID Creator ID''s\Contains Long Word') Sleep(5000) BlockInput(1) While 1 ButtonAdd() ButtonIMP() Sleep(20) CheckLevel() WEnd Func ButtonAdd() WinActivate('Identities') WinWaitActive('Identities') MouseClick('main', $Button_ADD[0], $Button_ADD[1], 1, 0) EndFunc Func ButtonDEL() WinActivate('Identities') WinWaitActive('Identities') MouseClick('main', $Area_ID_LIST[0], $Area_ID_LIST[1], 1, 0) Send('^a') Sleep(20) Send('{DELETE}') WinActivate('Confirmation') WinWaitActive('Confirmation') Send('{ENTER}') EndFunc Func ButtonIMP() Sleep(20) ClipPut(10) EndFunc Func CheckLevel() Local $UID, $level, $firstwordis Static Local $LastWasSuccessful, $TotalCount If Not IsBool($LastWasSuccessful) then $LastWasSuccessful = True WinActivate('Identities') WinWaitActive('Identities') MouseClick('main', $Area_ID_LIST[0], $Area_ID_LIST[1], 1, 0) Send('{END}') MouseClick('main', $Box_LastID[0], $Box_LastID[1], 1, 0) Send('^a') Sleep(20) Send('^c') Sleep(20) $UID = ClipGet() $level = 'X' $Anywordcontents = CheckUID($UID) $Firstwordcontents = CheckUID($UID, 1) If UBound($Anywordcontents) Then If UBound($Firstwordcontents) Then $firstwordis = $Firstwordcontents[0] $path = '\Morthawt''s ID Creator ID''s\Words Anywhere' If UBound($Firstwordcontents) Then $path = '\Morthawt''s ID Creator ID''s\Starts With A Word' For $lengthcheck in $Anywordcontents If StringLen($lengthcheck) > 4 Then $path = '\Morthawt''s ID Creator ID''s\Contains Long Word' Next ConsoleWrite(@CRLF & '*SUCCESS____ ') $SuccessCount += 1 MouseClick('main', $Button_Export[0], $Button_Export[1], 1, 0) WinWait('Export Identity') WinActivate('Export Identity') $UID2 = StringReplace($UID, '\', ' ') $UID2 = StringReplace($UID2, '/', ' ') ClipPut('"' & @ScriptDir & $path & '\[' & $SuccessCount & '] ' & $UID2 & '"') Send('^v') Send('{ENTER}') FileWriteLine(@ScriptDir & '\ID''s Created.txt', 'Number of ID: ' & $SuccessCount & ' Unique ID: ' & $UID) ConsoleWrite('Number: ' & $SuccessCount & ' ID: ' & $UID & @CRLF) ConsoleWrite('Words: ') For $words in $Anywordcontents If $Words == $firstwordis Then ConsoleWrite('*[' & $words & ']*, ') Else ConsoleWrite($words & ', ') EndIf Next $LastWasSuccessful = True Else If $LastWasSuccessful then ConsoleWrite(@CRLF & '*FAILURE* ') ConsoleWrite('+') $LastWasSuccessful = False EndIf $TotalCount += 1 If IsInt($TotalCount / 100) Then ButtonDEL() EndFunc Func CheckUID($_input, $_UUID_Word_At_Start_Only = 0) Local $regexedfile = FileRead(@ScriptDir & '\regexed-english.txt'), $dictionaryfile = FileRead(@ScriptDir & '\english-piped.txt'), $RegexDictionary = StringSplit($regexedfile, '@', 3), $WordDictionary = StringSplit($dictionaryfile, '@', 3) $startornot = '' If $_UUID_Word_At_Start_Only Then $startornot = '^' Local $_result[0] For $a = 0 To UBound($RegexDictionary) - 1 $testregex = StringRegExp($_input, $startornot & $RegexDictionary[$a], 1) If UBound($testregex) Then For $testresults In $testregex If StringLen($WordDictionary[$a]) > 2 Then ReDim $_result[UBound($_result) + 1] $_result[UBound($_result) - 1] = $testresults EndIf Next EndIf Next If UBound($_result) < 1 Then SetError(1) Return EndIf Return $_result EndFunc The script it's self is probably useless without the other files but those are not needed to run a simple Tidy. I would appreciate some insight into this problem. For now I can just copy/paste my code too and from VMware but it is, as you can imagine, annoying. Free and easy Autoit scripting video tutorials (plus more videos always coming!) General video tutorials, especially correct and safe TeamSpeak permissions tutorials. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 6, 2014 Moderators Share Posted October 6, 2014 Morthawt,That script runs without problem for me - I am using Tidy AutoIt3 v14.801.2025.2. 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...
Morthawt Posted October 6, 2014 Author Share Posted October 6, 2014 Yeah I have no idea what is going on. I even uninstalled AutoIt and scite editor and installed fresh and still it will not Tidy.. ;( Free and easy Autoit scripting video tutorials (plus more videos always coming!) General video tutorials, especially correct and safe TeamSpeak permissions tutorials. Link to comment Share on other sites More sharing options...
Morthawt Posted October 6, 2014 Author Share Posted October 6, 2014 Ok after trying things that just shouldn't work since you said it Tidies for you also... I think I figured it out. Here is the full path to my file locally: "H:Autoit projectsTeamSpeak ID Generation ProgramsTeamSpeak create new IDs to look for nice.au3" If I Tidy it, it crashes every time. If I save the filename but straight to "H:" it tidies fine. If I leave the file in the same original location and rename to 123.au3 it also tidies. So I think there is a bug in Tidy.exe relating to the length of the path/filename. Free and easy Autoit scripting video tutorials (plus more videos always coming!) General video tutorials, especially correct and safe TeamSpeak permissions tutorials. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 6, 2014 Moderators Share Posted October 6, 2014 Morthawt,When renamed the script crashes for me too - so there is the answer: use shorter names! 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...
Morthawt Posted October 6, 2014 Author Share Posted October 6, 2014 Can you pass this up the chain and hopefully see if it can be resolved? I can use shorter names for now but still, that really hampers organization. Free and easy Autoit scripting video tutorials (plus more videos always coming!) General video tutorials, especially correct and safe TeamSpeak permissions tutorials. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 6, 2014 Moderators Share Posted October 6, 2014 Morthawt,I am sure Jos will look in when he sees the thread title - but I will prod him if he seems to have missed it. 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...
Morthawt Posted October 6, 2014 Author Share Posted October 6, 2014 Thanks M23 Free and easy Autoit scripting video tutorials (plus more videos always coming!) General video tutorials, especially correct and safe TeamSpeak permissions tutorials. Link to comment Share on other sites More sharing options...
Developers Jos Posted October 6, 2014 Developers Share Posted October 6, 2014 There is a newer Tidy version available since sep 21 that probably fixes this -> v14.801.2025.3 Could you try this first before I start digging into this? 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...
Morthawt Posted October 6, 2014 Author Share Posted October 6, 2014 Sure, how do I get it? I already uninstalled autoit and scite editor and installed all fresh from the site and that did not help. Free and easy Autoit scripting video tutorials (plus more videos always coming!) General video tutorials, especially correct and safe TeamSpeak permissions tutorials. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted October 6, 2014 Moderators Share Posted October 6, 2014 https://www.autoitscript.com/autoit3/scite/download/beta_SciTE4AutoIt3/ Also, when you say VMWare Guest, are you talking Workstation or an actual Guest (vCenter), and which version either way? If the version of Tidy does not resolve, I can do some VM testing. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Morthawt Posted October 6, 2014 Author Share Posted October 6, 2014 Thanks. Jos, that one works flawlessly. Free and easy Autoit scripting video tutorials (plus more videos always coming!) General video tutorials, especially correct and safe TeamSpeak permissions tutorials. Link to comment Share on other sites More sharing options...
Developers Jos Posted October 6, 2014 Developers Share Posted October 6, 2014 It is always surprising that multiple people find the same bug within a few weeks while it was there for many years already. 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...
Morthawt Posted October 6, 2014 Author Share Posted October 6, 2014 I have had this problem once before but I never figured out what it was and it never happened since, until now. Free and easy Autoit scripting video tutorials (plus more videos always coming!) General video tutorials, especially correct and safe TeamSpeak permissions tutorials. 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