Hello!
I have an problem with filein() function, i try to load *.ms file(size 17KB) with main logic which contains only class definition, via macro, but debugger tells me some like: "class does not exist".
global The_QSubDTogg -- var for Instance of QuickSubDPreview struct
MsFolderPath = (symbolicPaths.getPathValue "$userScripts")+"\\DmitryG Tools\\QuickSubDPreview\\" -- Default Script folder Path
on execute do
(
if The_QSubDTogg == undefined do
(
local MsPath = MsFolderPath + "QuickSubDPreview.ms"
if doesFileExist MsPath == false do
(
return (messageBox "Can't locate main script file\n=>Reinstall tool to fix it!")
)
filein MsPath -- problem here
The_QSubDTogg = QuickSubDPreview() -- make instance
)
The_QSubDTogg.ToggSubD()
)
I tryed to put >sleep 1< function before making instance of class and problem is gone, but i think that is not universal solution(because it depends of meny factors: file size, PC speed, sleep function value, ect. ).
Maybe someone have idea how to solve it in another way?
By Dmitry Gubkin · 2017-11-26