by CarlitoGil » Fri Jul 05, 2013 10:39 am
When a Search Script calls
SDB.ProcessMessages from a timer and the Auto-tag window is closed MM throws an error:
Code: Select all
Error executing script event
Invalid pointer operation
This is a sample script:
Code: Select all
Dim bHalt
bHalt = False
Sub StartSearch(oPanel, sSearchTerm, sSearchArtist, sSearchAlbum)
Script.RegisterEvent SDB.CreateTimer(0), "OnTimer", "Timeout"
End Sub
Sub FinishSearch(oPanel)
bHalt = True
Script.UnRegisterAllEvents
End Sub
Sub Timeout(tTimer)
tTimer.Enabled = False
SDB.Tools.Sleep(1000)
SDB.ProcessMessages
If bHalt Then
msgbox("Halted! but will throw an error!")
Else
tTimer.Enabled = True
End If
End Sub
4.0.7.1511
Windows 8 x64
When a Search Script calls [b][i]SDB.ProcessMessages[/i][/b] from a timer and the Auto-tag window is closed MM throws an error:
[code]Error executing script event
Invalid pointer operation[/code]
This is a sample script:
[code]Dim bHalt
bHalt = False
Sub StartSearch(oPanel, sSearchTerm, sSearchArtist, sSearchAlbum)
Script.RegisterEvent SDB.CreateTimer(0), "OnTimer", "Timeout"
End Sub
Sub FinishSearch(oPanel)
bHalt = True
Script.UnRegisterAllEvents
End Sub
Sub Timeout(tTimer)
tTimer.Enabled = False
SDB.Tools.Sleep(1000)
SDB.ProcessMessages
If bHalt Then
msgbox("Halted! but will throw an error!")
Else
tTimer.Enabled = True
End If
End Sub[/code]
4.0.7.1511
Windows 8 x64