I have this script that runs when I select Computer, it collapses the tree. It works fine on my desktop with Windows 7 but crashes on my laptop with Windows 10.
option explicit
' ComputerCollapse
' (c) 2016 Jerry
' This is a script for Directory Opus.
' See http://www.gpsoft.com.au/DScripts/redirect.asp?page=scripts for development information.
' Called by Directory Opus to initialize the script
Function OnInit(initData)
initData.name = "ComputerCollapse"
initData.version = "1.0"
initData.copyright = "(c) 2016 Jerry"
' initData.url = "https://resource.dopus.com/viewforum.php?f=35"
initData.desc = "Collapse all drives and folders when Computer selected"
initData.default_enable = true
initData.min_version = "12.0"
End Function
' Called after a new folder is read
Function OnAfterFolderChange(afterFolderChangeData)
If afterFolderChangeData.result Then
' DOpus.Output afterFolderChangeData.tab.path
' Check if the path is Computer
If Left(afterFolderChangeData.tab.path, 11) = "::{20D04FE0" Then
'DOpus.Output "Found Computer"
Dim objCmd
Set objCmd = DOpus.CreateCommand
objCmd.RunCommand("Go ROOT=collapse NOSCRIPT")
objCmd.RunCommand("Go CURRENT EXPANDTREE NOSCRIPT")
Set objCmd = Nothing
End If
End If
End Function
Jon got the email, while I didn't. So it looks like the bounce was only for some of the addresses it gets routed to. Possibly a mail server rejecting the message due to anti-spam false positives.
It may not make a difference, as I haven't been able to reproduce the crash yet, but it's worth a try:
option explicit
' ComputerCollapse
' (c) 2016 Jerry
' This is a script for Directory Opus.
' See http://www.gpsoft.com.au/DScripts/redirect.asp?page=scripts for development information.
' Called by Directory Opus to initialize the script
Function OnInit(initData)
initData.name = "ComputerCollapse"
initData.version = "1.0"
initData.copyright = "(c) 2016 Jerry"
' initData.url = "https://resource.dopus.com/viewforum.php?f=35"
initData.desc = "Collapse all drives and folders when Computer selected"
initData.default_enable = true
initData.min_version = "12.0"
End Function
' Called after a new folder is read
Function OnAfterFolderChange(afterFolderChangeData)
If afterFolderChangeData.result Then
' DOpus.Output afterFolderChangeData.tab.path
' Check if the path is Computer
If Left(afterFolderChangeData.tab.path, 11) = "::{20D04FE0" Then
'DOpus.Output "Found Computer"
Dim objCmd
Set objCmd = DOpus.CreateCommand
objCmd.SetSourceTab(afterFolderChangeData.tab)
objCmd.AddLine("Go ROOT=collapse NOSCRIPT")
objCmd.AddLine("Go CURRENT EXPANDTREE NOSCRIPT")
objCmd.Run
Set objCmd = Nothing
End If
End If
End Function