Type Mismatch error for a variable not in my script?

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Type Mismatch error for a variable not in my script?

Re: Type Mismatch error for a variable not in my script?

by wtanksleyjr » Thu Aug 09, 2012 9:19 am

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

Re: Type Mismatch error for a variable not in my script?

by Lowlander » Tue Aug 07, 2012 12:56 pm

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:

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

Type Mismatch error for a variable not in my script?

by wtanksleyjr » Tue Aug 07, 2012 12:39 pm

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

Top