sab0tage Posted August 6, 2010 Share Posted August 6, 2010 I wrote a script last year that let me interrogate a barcode scanner over a COM port, using MSCOMM32.ocx. It works perfectly fine in XP, but I've got a new laptop from work to replace my old XP box, but it won't open the MSCOMM32Lib object. I've copied over the MSCOMM32.ocx and registered it, and the registry entries for it are identical to the ones on the XP box, so that appears to be all good. The error I get is "Variable must be of type "Object". From what I've read, MSCOMM32.ocx should work on Win7 but I'm just not having an success. Does anyone have any idea what might be going wrong? Regards, Owen Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 6, 2010 Share Posted August 6, 2010 Ensure it's not 64bit Win7, and add #RequireAdmin to the top of your script. Even if you don't ultimately want to run it that way, it will point to the problem if that fixes it. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
sab0tage Posted August 8, 2010 Author Share Posted August 8, 2010 Ensure it's not 64bit Win7, and add #RequireAdmin to the top of your script. Even if you don't ultimately want to run it that way, it will point to the problem if that fixes it.It's not 64bit, but I didn't try running it as administrator, which I'll try next.Thanks for the suggestion. Link to comment Share on other sites More sharing options...
sab0tage Posted August 10, 2010 Author Share Posted August 10, 2010 It's not 64bit, but I didn't try running it as administrator, which I'll try next.Thanks for the suggestion.I'm not having any luck even being run as administrator. I'm at a complete loss! Link to comment Share on other sites More sharing options...
ceasar Posted August 10, 2010 Share Posted August 10, 2010 Did you copy it to the Syswow folder? If you didn't, try it and reregister the ocx. Link to comment Share on other sites More sharing options...
sab0tage Posted August 12, 2010 Author Share Posted August 12, 2010 Did you copy it to the Syswow folder?If you didn't, try it and reregister the ocx.I don't appear to have a syswow folder, is it not only required if running the 64-bit version of Windows 7 (or vista)? Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted August 12, 2010 Share Posted August 12, 2010 (edited) Are you talking about SysWOW64? That's where x64 Windows have the x86 files (the x64 files go to System32). Edit: And it has nothing to do with Vista or 7. Don't know how you came to that conclusion. Edited August 12, 2010 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
sab0tage Posted August 16, 2010 Author Share Posted August 16, 2010 Are you talking about SysWOW64? That's where x64 Windows have the x86 files (the x64 files go to System32).Edit: And it has nothing to do with Vista or 7. Don't know how you came to that conclusion.I have the 32-bit version of Windows 7, not 64. The drivers are also 32-bit and have been placed in the \system32 directory and have been registered successfully (apparently) with regsrv32. I've even looked at the threads while running on an XP box with process explorer to make sure it's not calling any unusual dlls that might be missing, but no joy. Link to comment Share on other sites More sharing options...
wkain1 Posted August 16, 2010 Share Posted August 16, 2010 (edited) You have to actually install VB6 to get that dll to function on Windows according to some other posts. I have since moved to a different solution though. Someone on the forums made a dll and UDF though that has worked pretty good for me on Windows 7. http://www.autoitscript.com/forum/index.php?s=&showtopic=45842&view=findpost&p=341916 Edited August 16, 2010 by wkain1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now