Problems with Keyguard and AM 4.6.1 and 4.70

Support and discussions about KeyGuard Studio Professional for AdventureMaker.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Problems with Keyguard and AM 4.6.1 and 4.70

Postby Sedani Studio » Wed Jun 27, 2012 1:45 am

Fellow AM Users:

I have searched through the forums, with no luck on this topic, so thank you in advance. The problem I am experiencing is that when I enable the Keyguard plugin (4.11) in a project, I get the error message contained in the attachment. I'm trying to understand what is wrong. My frames are 900 x 600 - could that be it? I've tried it on both x32 and x64 systems, and the problem appears in both places.

Also, when I am able to use both without errors, the Keyguard plugin causes a small strip at the bottom of the window when working in the 360 panorama mode. Has anyone else experienced this?

I'm developing a keystroke help system with Keyguard in my project, and don't want to lose its functionality. However, when I disenable the plugin, the problems go away.

My most attempt to understand the problem consisted only of a new project with about 3 frames, with no other scripting involved. The problems still came up. Does Shadowhunter or anyone else have any suggestions? I didn't see any of the problems I'm facing in the known limitations documentation of the plugin.

Ideas?

Thanks,

Sedani Studio
Attachments
Error Executing Script in AM 470.jpg
This is the error I receive when test launching the project.
Error Executing Script in AM 470.jpg (93.17 KiB) Viewed 5955 times
User avatar
Sedani Studio
Member
 
Posts: 35
Joined: Tue Aug 12, 2008 4:26 pm
Location: Colorado, USA

Postby mercedes » Wed Jun 27, 2012 7:30 am

I'm developing a keystroke help system with Keyguard in my project, and don't want to lose its functionality. However, when I disenable the plugin, the problems go away.



It looks like you are using a line of code that KG doesn't support...

What exactly are you trying to do..?
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby ShadowHunter » Wed Jun 27, 2012 8:14 am

Hi,

Thank you for your questions:

1. There is no "RenderTextReset" method in KeyGuard hence the error. Where did you get this method and what would you like to accomplish?

2. The space at the button when using the panoramic plugin was reported to me a about two weeks ago, I did not know about this before. I will look into it and try to fix it in the next release which will also be compatible with AM 4.7.0 and with Windows 7 in general.

I do recommand to use KeyGuard 5 rather than 4.11, you can use the undocumented event:

Sub KeyGuard_KeyPressedAdvanced(ret)
MsgBox "Key " & ret(0) & " was pressed"
End Sub

To use all keystrokes without to much trouble.

Good luck,

With best regards,

ShAdOwHuNtEr
User avatar
ShadowHunter
Forum Admin and Games Page admin
 
Posts: 1304
Joined: Fri Jun 06, 2003 10:37 pm
Location: Belgium

Postby ShadowHunter » Wed Jun 27, 2012 3:17 pm

UPDATE:

Hi, I did a bit more investigation:

In version 4.11 there is no RenderTextReset methode, but in version 5 there is. This methode is called when launching the game, this is defined in the PL1 file.

This means you have the PL1 file of version 5 and are using plugin 4.11, please check it and pay attention to the locations (on Windows 7 it should be in the user/documents folder)

With best regards,

ShAdOwHuNtEr
User avatar
ShadowHunter
Forum Admin and Games Page admin
 
Posts: 1304
Joined: Fri Jun 06, 2003 10:37 pm
Location: Belgium

Thanks for the help!

Postby Sedani Studio » Wed Jun 27, 2012 5:45 pm

Shadowhunter and Mercedes:

Thank you for your kind responses to my dilemma. Ok - I guess there are two things. (1) what have I done so far and (2) what is my goal.

(1) I haven't really done anything so far other than add an opening frame, some opening music and a hotspot link to another couple of frames (about 4 frames so far - nothing special). Thus far, I have not done any coding of procedures. I deleted the original project and started fresh. Right before the opening frame pops up, the error message (Error in Game.AddAdditionalComponent) appears. When I hit "ok", the second message pops up several times (repeatedly after every click on "ok" in the dialogue box).

(2) Ultimately, my goal is to use keystrokes to take the player to an "evidences" page. On certain still frames (non-panoramic), there will be a hotspot that can be clicked on to take a picture or record a sound. Later, by pressing the "H" button, the player is transported to a screen where pictures can be reviewed and sounds listened to again without traveling back to where they were recorded. I've actually managed to do this on a couple of test projects, and it works fine.

Back to #1 - it looks like somehow it's not recognizing the plugin. I've made sure that it's the Keyguard 5 files, even looking in the coded procedures to make sure. After installing Keyguard 5, I copied and pasted the .pl1 file and the .ocx files from where they were installed (in Program Files x(86)/Adventure Maker v. 4.7.0 etc) into the shared plugins folder in my documents. And, as I said, I went in to "modify plugins" (no changes made) to verify that I had version 5 and not version 4.11 in the folder.

I did later enter my previous user name and key (from version 4.11) into the appropriate places in the code. Perhaps I need to update these as it doesn't seem to have made a difference.

Sorry to be such a bother! It's just adding so much functionality to my project, I wanted to be sure I didn't have to lose out on it. However, as I stated before, when I disenable the plugin in project properties, the problems disappear. Weird!

I am working on an x64 system, for full disclosure.

Man, I hope this ends up being something really silly that I've overlooked!

Thanks!

Sedani Studio
Attachments
AddAdditionalComponent Error in AM 470 1.jpg
The first error that pops up.
AddAdditionalComponent Error in AM 470 1.jpg (97.67 KiB) Viewed 5904 times
Error Executing Script in AM 470 New 2.jpg
The second error that pops up.
Error Executing Script in AM 470 New 2.jpg (74.29 KiB) Viewed 5912 times
Last edited by Sedani Studio on Wed Jun 27, 2012 6:41 pm, edited 2 times in total.
User avatar
Sedani Studio
Member
 
Posts: 35
Joined: Tue Aug 12, 2008 4:26 pm
Location: Colorado, USA

One other thing I've tried...

Postby Sedani Studio » Wed Jun 27, 2012 5:54 pm

For what it's worth, I also tried simply installing the .pl1 and .ocx files directly into my shared plugins folder (in my documents) by reinstalling Keyguard and indicating that folder path. It did install them there, but there's been no change.

I get the feeling there's something obvious I'm missing, given that no one else has mentioned any of these things in the posts.
User avatar
Sedani Studio
Member
 
Posts: 35
Joined: Tue Aug 12, 2008 4:26 pm
Location: Colorado, USA

Postby ShadowHunter » Wed Jun 27, 2012 8:40 pm

Hi,

Error 1. Okay the Class ID you provided is the one from KeyGuard.MainControl, so this means that AM was not able to register the plugin for some reason (or the installer for that matter)

Error 2. Because it was not registerd AM cannot find the OCX and thus cannot call any method or property.

So, let's try to resolve this by beginning to check if the OCX was registered correctly:

Open regeditor (regedit) and search for the CLSID, it should be in HKEY_CLASSES_ROOT\CLSID\{F7436B2F-937E-4DF7-88B7-0C68E5F9E027} and the value is KeyGuard.MainControl

Should you not be able to find the key (use search function in regedit) then try to register it manually by using regsvr32 and check again...

Please let me know the outcome of this...

With best regards,

ShAdOwHuNtEr
User avatar
ShadowHunter
Forum Admin and Games Page admin
 
Posts: 1304
Joined: Fri Jun 06, 2003 10:37 pm
Location: Belgium

I found it in the registry

Postby Sedani Studio » Wed Jun 27, 2012 10:02 pm

Shadowhunter:

Ok, I did as you instructed. I was able to find the CLSID folder, and it contained the code you mentioned, but it is not in the HKEY_CLASSES_ROOT\CLSID folder. Instead, it is found in the HKEY_CLASSES_ROOT\Keyguard.MainControl\CSLID folder (see attached picture).

What would be the next step?

Thanks!
Attachments
Registry Editor.jpg
Registry Editor.jpg (107.02 KiB) Viewed 5887 times
User avatar
Sedani Studio
Member
 
Posts: 35
Joined: Tue Aug 12, 2008 4:26 pm
Location: Colorado, USA

Postby ShadowHunter » Wed Jun 27, 2012 10:55 pm

Hi,

Is this the only location were you find it?

If you continue to search 'F3' is there no entry at the location I mentioned?

I mean no HKEY_CLASSES_ROOT\CLSID\{F7436B2F-937E-4DF7-88B7-0C68E5F9E027} ?

In that case please try to register the OCX manually, copy the OCX to the c:\windows\system32 folder and register it with

regsvr32 keyguard.ocx (click windows 'start' button and in the search text box enter the command)

What happens? Was the registration succesfull? If so, please try again...

With best regards,

ShAdOwHuNtEr
User avatar
ShadowHunter
Forum Admin and Games Page admin
 
Posts: 1304
Joined: Fri Jun 06, 2003 10:37 pm
Location: Belgium

On to the next step!

Postby Sedani Studio » Thu Jun 28, 2012 5:03 am

That is right, there is no HKEY_CLASSES_ROOT\CLSID\{F7436B2F-937E-4DF7-88B7-0C68E5F9E027} folder. I then did as you instructed, and got the following error (attached picture). Bummer ... I suspected it was a problem with the fact that I'm running an x64 system.

Is there a workaround? Or will I just need to compile my project on an x32 system? Will this affect the compatibility of the final product?

I tried copying the .ocx file into the SysWOW64 folder, as well, but got the same result after attempting to register in as you described using regsvr32 keyguard.ocx

Thank you so much for your help!
Attachments
RegSvr32 error.jpg
RegSvr32 error.jpg (72.79 KiB) Viewed 5876 times
User avatar
Sedani Studio
Member
 
Posts: 35
Joined: Tue Aug 12, 2008 4:26 pm
Location: Colorado, USA

Postby ShadowHunter » Thu Jun 28, 2012 6:19 am

Hi,

I tried on a x86 and x64 machine:

I could reproduce the problem on a 64 bit system, however I could register it by using the 64bit variant of regsvr32...

Okay, do this:

1. Copy the OCX to the SysWOW64 folder and to the System32

2.Register like this: C\Windows\SysWOW64\regsvr32.exe "c:\Windows\System32\KeyGuard.ocx"

3. If succuss, try AM and KeyGuard again...

4. If at step 2 the problem was not solved try registering like this C:\Windows\SysWOW64\regsvr32.exe KeyGuard.ocx

With best regards,

ShAdOwHuNtEr
User avatar
ShadowHunter
Forum Admin and Games Page admin
 
Posts: 1304
Joined: Fri Jun 06, 2003 10:37 pm
Location: Belgium

Registering the .ocx file

Postby Sedani Studio » Thu Jun 28, 2012 6:12 pm

Ok, the .ocx files were pasted, and I did what you asked in #2 - this gave me just a search box.

When I did #4, I got various errors, which I've attached as pictures. I tried various ways of doing this, such as simply typing C:\Windows\SysWOW64\regsvr32.exe KeyGuard.ocx into the search box or typing in regsvr32.exe C:\Windows\SysWOW64\regsvr32.exe, for example. Please let me know if I'm doing that wrong!
Attachments
RegSvr32 error 4.jpg
Another error
RegSvr32 error 4.jpg (80.62 KiB) Viewed 5853 times
RegSvr32 error 2.jpg
Error #1
RegSvr32 error 2.jpg (79.67 KiB) Viewed 5853 times
RegSvr32 error 3.jpg
Error #2
RegSvr32 error 3.jpg (83.01 KiB) Viewed 5853 times
User avatar
Sedani Studio
Member
 
Posts: 35
Joined: Tue Aug 12, 2008 4:26 pm
Location: Colorado, USA

Postby ShadowHunter » Thu Jun 28, 2012 10:18 pm

Hi,

I verified it on a super recent x64 WIN7 machine (with SSD yeah 8) ) and it worked without a problem...

1. Copy KeyGuard.ocx to C:\windows\system32\
2. Run exactly like this: C\Windows\SysWOW64\regsvr32.exe "c:\Windows\System32\KeyGuard.ocx"

This means that we run the 64 version of regsvr which resides in the SysWOW64 folder to register the 32 bit OCX located in the system32 folder...

With best regards,

ShAdOwHuNtEr
User avatar
ShadowHunter
Forum Admin and Games Page admin
 
Posts: 1304
Joined: Fri Jun 06, 2003 10:37 pm
Location: Belgium

I can't seem to make this work

Postby Sedani Studio » Thu Jun 28, 2012 11:54 pm

I'm doing exactly as instructed - I've copied the .ocx files into the appropriate folders, etc. - even copied and pasted the text right off of your response into the text search box. Nothing happens when I put it in the text search box and hit enter. Apparently, it isn't finding anything to execute. Or I get the error like in the previous post.

Maybe I should call Dell about this one. Any other ideas?

The problem might be that it's not recognizing the regvsr32.exe in the SysWOW64 folder. I've tried some alternatives just to see what happens. When I just put in the first part of what you instructed me (i.e. C\Windows\SysWOW64\regsvr32.exe) it isn't finding anything. It does, however, when I write it as C: at the beginning, but gives an error that says:

The module "c:windows\system32\keyguard.ocx" was loaded but the call to DllRegisterServer failed with error code 0x80004005"

I appreciate your expertise!
User avatar
Sedani Studio
Member
 
Posts: 35
Joined: Tue Aug 12, 2008 4:26 pm
Location: Colorado, USA

Postby ShadowHunter » Fri Jun 29, 2012 7:32 am

Hi,

I have taken a screenshot of what I done, this is on a x64 WIN7 device, as you can see no problem.

Now, the error you mentioned means "access denied" so it could be you have to run regsvr32 with an elevated command prompt. Do this:

1. Click on Windows 7 Start Button
2. Go to All Programs and next to Accessories
3. Right on Command Prompt and select ?Run as Administrator?

Enter the command string here... Did it work? If not we have to try more advanced stuff :wink:

With best regards,

ShAdOwHuNtEr
Attachments
Screenshot - 29_06_2012 , 8_31_14.jpg
x64 Windows 7 via NORMAL prompt (you should try the elevated prompt)
Screenshot - 29_06_2012 , 8_31_14.jpg (24.82 KiB) Viewed 5835 times
User avatar
ShadowHunter
Forum Admin and Games Page admin
 
Posts: 1304
Joined: Fri Jun 06, 2003 10:37 pm
Location: Belgium

It worked.. but there are new problems

Postby Sedani Studio » Fri Jun 29, 2012 4:42 pm

Shadowhunter:

Thank you!!!!!!! That seems to have worked. The screenshot really helped.

I am experiencing some new problems, however. There appears to be a conflict with the AM Panorama plugin (not the cubic plugin), however. Again, all I have is an initial frame, with a hotspot link to a second frame. The second frame uses the AM Panorama plugin. I also have a few other frames connected to one another using the panorama plugin. No scripting on my part yet, no variables. Just some frames and links.

Interestingly enough, when I disable the AM Panorma plugin, the problems go away, so perhaps this should be a different thread? Or does the fact that I cannot seem to get KeyGuard and the Panorama plugin to coexist mean it should stay here?

I've attached the error messages I'm receiving. The first couple happen on the initial frame, and the last 3 when I link to the second frame.
Attachments
New Error 1.jpg
New Error 1.jpg (114.92 KiB) Viewed 5821 times
New Error 2.jpg
New Error 2.jpg (113.64 KiB) Viewed 5821 times
New Error 3.jpg
New Error 3.jpg (84.32 KiB) Viewed 5821 times
New Error 4.jpg
New Error 4.jpg (59.93 KiB) Viewed 5821 times
New Error 5.jpg
New Error 5.jpg (106.25 KiB) Viewed 5821 times
User avatar
Sedani Studio
Member
 
Posts: 35
Joined: Tue Aug 12, 2008 4:26 pm
Location: Colorado, USA

Postby ShadowHunter » Fri Jun 29, 2012 9:41 pm

Hi,

Alright, I'm glad the initial problem is solved :D

Now for the other errors:

The first error probably occured due to:

* Using KeyGuard Studio in compression mode and the OCX in non-compression mode or visa versa
* Or the POL-file was corrupted (located in the frames folder, this is the file that holds the data for a specific frame)

So, please check the help file for compression and non-compression mode. Compression is default enabled when fresh installed, to change KGS to non-compression you have to perform change a key in the registry located here: HKEY_CURRENT_USER\Software\ShadowHunter\KeyGuard change the value of "UseCompression" from 99 to 16. If this entry does not exist you can create it manuall (type REG_SZ)

To change the OCX from compression to non-compression you have to alter the "Component("KeyGuard").Object.General_DisableCompression = False" to "True" which can be found when you select to edit a plugin, under the tab "Startup", the top textbox.

If the file is corrupt simply delete the POL-file in the "Frames" directory of you project folder and draw it again.
Note: it is best to restart and reload your project during each test or change. Sometimes the OCX is not unloaded completely due to the edit mode of AM, if so certain values stay in the memory.

For the second problem:

The Panoramic plugin and KeyGuard can exists next to eachother BUT with a lot of limitations.

- KeyGuard can only be used for keystrokes, not (yet) for polygons, hint cursors or text rendering...
- A pixel shift happens but this is already solved in the next release of KeyGuard (stay tuned)
- The cursor won't change anymore, also fixed in the next release

And finally the limitation that is causing your problem. This happens when you have move from non panoramic frame but with KeyGuard and go to a panoramic frame using a transition (depending on the speed of your computer COULD also happen with no transitions but I never saw that)

The reason for this is perhaps to complex to explain in detail but involves hWnd and hDC changes by the panoramic plugin whilst KeyGuard already has info on the previous handles (hWnd = windows handle, hDC = device context handle), I was not yet able to solve this behaviour... but I'm working on it.

This error does not appear when you start the game by using a frame that uses the panaromic plugin and has a KeyGuard function. The other way arround: moving from pana to only a KeyGuard frame poses no problems.

Disabling the transition might of course also fix the problem...

I hope this information can help you.

With best regards,

ShAdOwHuNtEr
Last edited by ShadowHunter on Sat Jun 30, 2012 6:12 am, edited 1 time in total.
User avatar
ShadowHunter
Forum Admin and Games Page admin
 
Posts: 1304
Joined: Fri Jun 06, 2003 10:37 pm
Location: Belgium

Thank you again - I'll get back on this in a week or so

Postby Sedani Studio » Sat Jun 30, 2012 5:35 am

Shadowhunter:

Your help is very much appreciated. I'm leaving town for about a week, but will get back to this when I return.

Thanks again!
User avatar
Sedani Studio
Member
 
Posts: 35
Joined: Tue Aug 12, 2008 4:26 pm
Location: Colorado, USA

Re: Thank you again - I'll get back on this in a week or so

Postby ShadowHunter » Sat Jun 30, 2012 6:13 am

Sedani Studio wrote:Shadowhunter:

Your help is very much appreciated. I'm leaving town for about a week, but will get back to this when I return.

Thanks again!


Have a good trip :D
User avatar
ShadowHunter
Forum Admin and Games Page admin
 
Posts: 1304
Joined: Fri Jun 06, 2003 10:37 pm
Location: Belgium

Problems with Keyguard w 4.71

Postby Stitches » Tue Nov 26, 2013 5:25 pm

Question for Shadow Hunter:
After converting hotspots and redesigning them (to create a path for a sprite) how do you constrain walk path? When reloaded into AM the player just wanders off randomly way outside of the hotspot instead of walking the constructed path.
http://www.youtube.com/user/MaynardStaly/videos and http://libertycap.webs.com
“With a bit of luck, his life was ruined forever. Always thinking that just behind some narrow door in all of his favorite bars, men in red woolen shirts are getting incredible kicks from things he’ll never know.”
User avatar
Stitches
Active Member
 
Posts: 71
Joined: Tue Nov 12, 2013 3:56 am
Location: UK


Return to KeyGuard Studio Professional

Who is online

Users browsing this forum: No registered users and 1 guest

cron