pspad:
--------------------------------------------------------------------------------
_Fixes:_
cripting - if script runs when PSPad closes, message with script error appeared
--------------------------------------------------------------------------------


Hello. Unfortunately the error message is still there. Here is an example code
that is more realistic. (No loop in "Init".)

' TestLoop.vbs
const module_name  = "TestLoop"         'this name must be unique !!!
const module_ver   = "0.001"            'version

sub MyTestLoop()
  Dim MyDateTime
  Do
    MyDateTime = Now()
    Call logSetLine(0, MyDateTime)
    ' do something else
    Sleep(10) 
  Loop
end sub

' name "Init" is required, its called automatically during initialization to
create menu items
sub Init
  Call logAddLine("Press Ctrl+U to start the loop")
  addMenuItem "Test-Funktion", "TestMenu", "MyTestLoop", "Ctrl+U"
end sub


Suggestion: If the error message cannot be avoided, you could use
"Application.MessageBox". With this MessageBox I can read the error message (the
message text) and handle the problem myself. (With the other MsgBoxes I cannot
read out the Message Text (e.g. ShowMessage and MessageDlg).

Example: Application.MessageBox('Welcome.', 'Test', MB_OK);

-- 
<https://forum.pspad.com/read.php?6,73503,73522>
PSPad freeware editor https://www.pspad.com

Odpovedet emailem