|
Can You Please Test This Folks?
About Truespace Archives
These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.
They are retained here for archive purposes only.
Can You Please Test This Folks? // SDK, Plug-in & 3rd Party Area
Post by frootee // Oct 4, 2008, 11:55am
frootee
Total Posts: 2667
|
Hi Everyone. I've been working on a plugin for the past several months.
This particular piece is just a simple VB Script Object, but since it will be used in
conjunction with the plugin, I am putting a test version here.
Could you do me a favor? Please test this. It's a simple VB Script command
which will display a standard Windows File-Open dialog. But I read online
that this method may not work, IF it is not executed from an application which
has been created with Microsoft Visual Studio. I know that truespace has been
created with Visual Studio, but I need to make sure it works, Just In Case.
So this is what you do:
1. Download the object. It will be in the Link Editor, called
VB_DLG.
2. Click the Start button.
3. You should see a dialog popup on your screen. If you do Not, please post here, and indicate whether or not you have a development application (Like Visual Studio) present on your system.
If this does not work there are other ways to get it working, but this is the most direct.
Thanks everyone!
Oh and, if you are a plugin developer or a scriptor, feel free to use this item as a starting point.
Froo |
Post by RichLevy // Oct 4, 2008, 12:03pm
RichLevy
Total Posts: 1140
|
Igot a dialog up on my screen
Error Event
Source object:/project/camera Viewer example/VB_DLG
error unspecified script error
Line 8 char:1
Script text:Set objdlgs=CreateObject("MSComDlg.CommonDialog")
Looks like you worked on my system.
Congradulations.
Rich |
Post by frootee // Oct 4, 2008, 12:09pm
frootee
Total Posts: 2667
|
Thanks Rich. Hm... even though you got the dialog up, you also got an error. Ok. I'll check out the workarounds suggested online then.
I wasn't sure if it would work or not.
Do you have a developer application installed on your system?
Thanks,
Froo |
Post by RichLevy // Oct 4, 2008, 12:13pm
RichLevy
Total Posts: 1140
|
I may... though I have not used anything in a while so I am not sure... let me check...
Rich |
Post by RichLevy // Oct 4, 2008, 12:18pm
RichLevy
Total Posts: 1140
|
Nothing in there right now, but I have the remains of a MS Studio install I removed awhile back...
That of any use?
Rich |
Post by hultek43 // Oct 4, 2008, 12:43pm
hultek43
Total Posts: 234
|
Downloaded, dragged from Explorer to library in stack. Neither r-click/load or drag to LE reveal this mysterious object :confused: |
Post by RichLevy // Oct 4, 2008, 12:55pm
RichLevy
Total Posts: 1140
|
I just double clicked on the icon on my desktop and it opened TS 7.6 and was in the LE...
Your mileage may vary.
Rich |
Post by hultek43 // Oct 4, 2008, 1:44pm
hultek43
Total Posts: 234
|
4 of 4 methods that all should have worked have failed so far to produce anything in my LE window. |
Post by frootee // Oct 4, 2008, 1:46pm
frootee
Total Posts: 2667
|
hi hultek.
Did you try loading the file using the truespace menu? File-> Load?
EDIT: I see the problem please stand by... DOH! |
Post by frootee // Oct 4, 2008, 2:08pm
frootee
Total Posts: 2667
|
OK I uploaded a corrected version. Sorry about that.
Rich, could you please download this and retest? I had built this using a different version of truespace originally. DOH! No wonder it didn't work! :D
Thanks,
Froo |
Post by RichLevy // Oct 4, 2008, 2:17pm
RichLevy
Total Posts: 1140
|
still the same error for me...
I am using ts7.61B3b2 though... sorry beta took out ts7.6
rich |
Post by frootee // Oct 4, 2008, 2:21pm
frootee
Total Posts: 2667
|
That's cool thanks for testing it Rich.
All of the systems I've tested that one CommonDialog script on have a Visual Studio app installed. I think my other one does not have that installed so I'll try it there too.
There is a workaround I can try (not truespace specific). If that doesn't work, I'll spend some more time on this and just do it the C++ way. Basically all I want to do is to allow the user to select the directory in which their files are stored, as opposed to forcing them to have to type the directory name in. That's not user friendly. :)
thanks man.
Froo |
Post by Chef_eam // Oct 4, 2008, 2:29pm
Chef_eam
Total Posts: 18
|
I downloaded it, loaded it up and it did bring up the file open dialog. I do have VS2008 Express installed on this computer |
Post by frootee // Oct 4, 2008, 4:41pm
frootee
Total Posts: 2667
|
Cool thanks Chef. |
Post by robert // Oct 4, 2008, 4:59pm
robert
Total Posts: 609
|
Got an error as well,:( I have Microsoft Visual C++ 2008 express edition.http://bestsmileys.com/wink/3.gif
Source object: /Project/Space 3D/VBCMD_DLG
Error: Unspecified script error
Line: 8, Char: 1
Script text: Set objDlgs =
CreateObject("MSComDlg.CommonDialog")
Other than that nothing else happened.:( |
Post by frootee // Oct 4, 2008, 5:00pm
frootee
Total Posts: 2667
|
wow that sucks.
Thanks for testing Robert!
BTW here's the link to the stuff I am looking at:
http://www.aspfree.com/c/a/Windows-Scripting/Workarounds-for-Common-Dialogs-in-WSH/ |
Post by robert // Oct 4, 2008, 5:09pm
robert
Total Posts: 609
|
I've been meaning to get more involved with scripting, both in tS and in general. I have a PhysX card and it uses Visual C++ for programming the scenes, sadly I never got around to it. Wish I could help, but I never really got started.
But looking at this code it's pretty straightforward and seems like it would work. |
Post by hultek43 // Oct 4, 2008, 5:22pm
hultek43
Total Posts: 234
|
Well, I got it loaded and found it. I get the same error as robert. |
Post by frootee // Oct 5, 2008, 4:26am
frootee
Total Posts: 2667
|
thanks for testing guys. This is the first page of the article which I was pointing to:
http://www.aspfree.com/c/a/Windows-Scripting/User-Interaction-with-Common-Dialogs-in-WSH/
Note this is quoted on that page:
Please keep in mind that due to the nature of the examples that follow, they may not work in all situations or under every condition. These are all workarounds! While I will be making the attempt to provide code that should work, it's not possible for me to accurately forecast every scenario that may arise.
Now, another note; I tried this with jscript and it did not work at all. Jscript rejected it. VBscript accepted it. Not sure if that's a bug or not but since it's not guaranteed to work I'm not worried about it at this point.
Thanks for testing, and I will have more later.
Froo |
Post by early // Oct 5, 2008, 4:55am
early
Total Posts: 46
|
Same failure here. I'm sure it's licensing as the article says.
The UserAccounts.CommonDialog example works fine. (XP SP3, no MS developer environments). |
Post by frootee // Oct 5, 2008, 5:10am
frootee
Total Posts: 2667
|
Thanks Early. I have that one ready now, which uses the UserAccounts dialog.
We don't need no Steenking Dev environment! :D
OK folks; please try this one and let me know if you get an error or not.
Thank you VERY MUCH for testing this.
Froo |
Post by early // Oct 5, 2008, 5:40am
early
Total Posts: 46
|
Problem: UserAccounts isn't supported by Vista.
Can or should Caligari incorporate a CommonDialog function in the SDK? |
Post by robert // Oct 5, 2008, 5:40am
robert
Total Posts: 609
|
Sorry still failed this time...
Source object: /Project/Space 3D/VBCMD_DLG
Error: Microsoft VBScript runtime error
Description: ActiveX component can't create object:
'UserAccounts.CommonDialog'
Error code: 0x800a01ad - (null)
Line: 17, Char: 1
Script text: Set objDlgs =
CreateObject("UserAccounts.CommonDialog")
I tried doing this with the original one before but just never mentioned it as it still returned an error. |
Post by frootee // Oct 5, 2008, 5:53am
frootee
Total Posts: 2667
|
thanks early and Robert.
Hm...
How about regular File Open dialogs created in Visual Studio 2008?
Is there a synonym for UserAccounts dialogs in Vista?
I may need to have two separate builds; one for XP, one for Vista.
Yes, having a Common Dialog for Truespace would be a good idea.
Thanks
Jason |
Post by robert // Oct 5, 2008, 5:56am
robert
Total Posts: 609
|
Yeah the main issue does seem to be Vista related. I'm running Vista Ultimate. Everyone else should post their system as well, then we will know if it's operating system related. |
Post by RichLevy // Oct 5, 2008, 5:58am
RichLevy
Total Posts: 1140
|
Vista Home 32bit
This failed for me also.
Rich |
Post by frootee // Oct 5, 2008, 6:02am
frootee
Total Posts: 2667
|
thanks guys.
well here's one solution for vista but it looks kinda kludgy.
http://microsoft-server-operating-systems.hostweb.com/TopicMessages/microsoft.public.windows.server.scripting/1975138/1/Default.aspx
So I may just refactor the C++ dialog code and bring it here as a plugin to test.
thanks!
Froo |
Post by early // Oct 5, 2008, 6:03am
early
Total Posts: 46
|
A quick Google search show a lot of script writers asking the same questions. Maybe someone has already found a 'common' common dialog approach. Of course, instead of two builds, you could just incorporate an OS check.
If you're forced into using IE to access the control, you might want to look at my IE and XML automation objects for some options. |
Post by frootee // Oct 5, 2008, 6:10am
frootee
Total Posts: 2667
|
cool thanks early.
Could you post a link please?
Thanks!
Yes, checking the OS would be good. I wouldn't be able to test it on a Vista machine since I do not have access so I'll post it here once I get some solutions. |
Post by Chef_eam // Oct 5, 2008, 6:15am
Chef_eam
Total Posts: 18
|
Second one gives an error.
Vista Home Premium 32 bit |
|