After I install the extension I wrote (via MMIP), it runs correctly the first time I trigger it, and from then on it pauses a long time and then pops up a dialog box:
"Error #13 - Microsoft VBScript runtime error
Type mismatch 'ExportCSV'
File: <my only VBS script file>, Line: 1, Column: 0"
The line it's pointing to is the following:
const AppTitle = "Podstrand"
Naturally, the word 'ExportCSV' doesn't appear in my script.
I can "fix" this by reinstalling the MMIP again; then it will run once, and from then on produce the same error (or a similar one -- I've seen one error that was different, and unfortunately I didn't record what it was).
Has anyone seen anything like this before? Surely I'm forgetting something in the Install.ini, right?
All my source code, and a current MMIP, is at https://bitbucket.org/wtanksleyjr/podstrand/src/; the VBScript isn't very large yet, so it shouldn't be forbidding (I'm converting from an older Python app to VBScript).
-Wm
Type Mismatch error for a variable not in my script?
Moderators: Gurus, Addon Administrators
-
- Posts: 31
- Joined: Fri Dec 11, 2009 9:40 am
Re: Type Mismatch error for a variable not in my script?
Link fails, also ExportCSV would seem to point to included CSV option under File > Create Reports. Perhaps your Scripts.ini entry is incorrect for your script.
ExportCSV entry in scripts.ini:
ExportCSV entry in scripts.ini:
Code: Select all
[ExportCSV]
FileName=Export.vbs
ProcName=ExportCSV
Order=4
DisplayName=File List (CS&V)
Description=Exports list of selected files to a .csv file
Language=VBScript
ScriptType=1
Download MediaMonkey ♪ License ♪ Knowledge Base ♪ MediaMonkey for Windows 2024 Help ♪ MediaMonkey for Android Help
Lowlander (MediaMonkey user since 2003)
Lowlander (MediaMonkey user since 2003)
-
- Posts: 31
- Joined: Fri Dec 11, 2009 9:40 am
Re: Type Mismatch error for a variable not in my script?
Lowlander, thank you for a quick and well-studied answer!
Following the path you suggested I was able to solve the problem -- the ExportCSV was, I think, a false lead, and I'm not sure why; but you were right that the main part of the fix was in Install.ini.
First, there was an entry in the "c:\program files" (global) Script.ini, leftover from my MM3 work; but removing it didn't fix the problem.
Second, I found the problem in Install.ini AND the vbs -- I had been running the install function at the top level of the vbs, but because I used the same file for the normal operation, I think it was trying to re-run the install every time it ran. I changed the [Execute] section of the Install.ini to use a "Function=" line, and deleted the function calls from the top level of the vbs file, and so far everything's running normally.
Changes are now pushed to my public repo -- thank you for your help!
-Wm
Following the path you suggested I was able to solve the problem -- the ExportCSV was, I think, a false lead, and I'm not sure why; but you were right that the main part of the fix was in Install.ini.
First, there was an entry in the "c:\program files" (global) Script.ini, leftover from my MM3 work; but removing it didn't fix the problem.
Second, I found the problem in Install.ini AND the vbs -- I had been running the install function at the top level of the vbs, but because I used the same file for the normal operation, I think it was trying to re-run the install every time it ran. I changed the [Execute] section of the Install.ini to use a "Function=" line, and deleted the function calls from the top level of the vbs file, and so far everything's running normally.
Changes are now pushed to my public repo -- thank you for your help!
-Wm