All I needed to know was what the problem was, I came up with a fix for it right away. If it needs the filename then it's as simple as just checking the registry entry for it, this works for other ActiveX's as well.
var axfn; var axid; axfn=''; axid='{8856F961-340A-11D0-A96B-00C04FD705A2}'; registry_set_root(2);
axfn=registry_read_string_ext('CLSID\'+axid+'\InProcServer32\',''); registry_set_root(0);
if axfn!='' and file_exists(axfn) { var i; i=gmax_create(argument0,axfn,axid);
gmax_setdims(i,argument1,argument2,argument3,argument4); return i; } else return 0;That's what I use for my 'ie_create' script, just replace the 'axid' for it to use it with another ActiveX. I didn't include the IE Go script because it's not required that you run that code, and I also added a check to see if the registry entry exists for it- and that the file for it exists so that it doesn't freeze the game trying to create the ActiveX when it can't find the file or because it didn't return anything from the registry check. I've only tested this on XP and haven't had someone test this on vista yet, but it should work fine with it. I'll run checks later to see if the newer version fixes any of the problems that I reported before. The only thing is that the coding changes the person's registry set root, so people should just change the second set to the default that they use- or run this code first if they only use it at the very start. On a side note, for the GMAX example, you can use this for the room start code. You're going to have to fix the dll yourself, if it was working in the last version then just keep testing what you think may be causing it until you find what you did wrong.
var axfn; var axid; axid=''; registry_set_root(2);
//Microsoft Internet Explorer
axid='{8856F961-340A-11D0-A96B-00C04FD705A2}';
axfn=registry_read_string_ext('CLSID\'+axid+'\InProcServer32\','');
axfn=string_replace(axfn,'%SystemRoot%',environment_get_variable("windir"));
if axfn!='' and file_exists(axfn) { ax_MSIE=gmax_create(window_handle(),axfn,axid);
//resize/move Internet Explorer control
gmax_setdims(ax_MSIE,0,20,room_width/2,150);
// navigate to test document
gmax_execute(ax_MSIE,"Navigate",gmax_util_mkprm("",environment_get_variable("windir")+"\Web\tip.htm")); }
//Windows System Monitor Control
axid='{C4D2D8E0-D1DD-11CE-940F-008029004347}';
axfn=registry_read_string_ext('CLSID\'+axid+'\InProcServer32\','');
axfn=string_replace(axfn,'%SystemRoot%',environment_get_variable("windir"));
if axfn!='' and file_exists(axfn) { ax_WSMC=gmax_create(window_handle(),axfn,axid);
//resize system monitor control
gmax_setdims(ax_WSMC,room_width/2,20,room_width/2,room_height-20); }
//Microsoft Windows Media Player
axid='{6BF52A52-394A-11d3-B153-00C04F79FAA6}';
axfn=registry_read_string_ext('CLSID\'+axid+'\InProcServer32\','');
axfn=string_replace(axfn,'%SystemRoot%',environment_get_variable("windir"));
if axfn!='' and file_exists(axfn) { ax_MWMP=gmax_create(window_handle(),axfn,axid);
//resize/move WMP control
gmax_setdims(ax_MWMP,0,190,room_width/2,room_height-190); }
registry_set_root(0);You can get an idea enough from both of these on how to make it for the other ActiveX controls.
Edit: tested and not working on vista unfortunately, it will need seperate coding for that or an alternate solution then. Only flash and wmp worked on vista, wmp with my most recent update of the coding and flash worked before- ie just froze. You're just going to have to fix the dll yourself, it was working the last version so just keep checking things that you think may be causing the problem that you changed from the last version and take care of it. I chose this dll because I wanted the program window active set back to it without minimizing and restoring it after ie was clicked on, but the crashing and freezing and not loading is too troublesome. All of the other browser dll's lacked that feature, and mixing your dll wth it didn't fix it- so I had to use the ie feature from your's which came with the activex problems.
Edited by RazonEX, 07 August 2008 - 09:24 PM.