Jump to content

A script crashes Tidy on PC but not VMware Guest. Even installed Autoit fresh


Recommended Posts

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.

#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.

Link to comment
Share on other sites

  • Moderators

Morthawt,

That script runs without problem for me - I am using Tidy AutoIt3 v14.801.2025.2. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Moderators

Morthawt,

When renamed the script crashes for me too - so there is the answer: use shorter names! :D

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Developers

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

  • Moderators

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

  • Developers

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...