mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 32
P
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Feb 2003
Posts: 32
I have found a bug (perhaps "oversight" is a better word for it) involving $sfile and $sdir, dialogs opened on the desktop and the script editor.

This is pretty obscure and frankly I am not surprised by the outcome, but here is how to reproduce it:

Code:
dialog test {
  title "test"
  option dbu
  size -1 -1 100 100
  button "Test" 1,5 5 90 90
}
on 1:dialog:test:sclick:1:{
  var %x = $sfile($mircdir,Test)
}


Open the dialog using the -d switch to open it on the desktop like so:

Code:
/dialog -dm test test


Click the large "Test" button. Leaving the file selection dialog open, open the script editor to the file that contains the above code. Add or modify any text and click "Ok" to save the file and close the editor.

Activate the "test" dialog and click "Cancel" on the file selection dialog. The result:

Code:
* /h‘ê: not connected to server


This seems to only occur when setting a variable to the result of the $sfile, using the /echo command to display it results in an /echo error but no funky text.

I have also noticed this problem when editing a file while a loop using WhileFix.dll is being executed.

The problem is obvious; in both cases the mIRC interpreter pauses processing when the DLL is called or the dialogs are opened. Opening the editor and modifying the file containing the rest of the code confuses mIRC (as would be expected) and it pukes, sometimes crashing altogether.

The solution seems simple to me, lock the editor or prevent the edited file from being updated until the code is finished being processed.

Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
I can't reproduce that at all.
Tried putting at the top of a file and deleteing/pasting stuff under it, tried putting it at the bottom and deleting/pasting stuff from above it. Nothing.


Link Copied to Clipboard