PDA

View Full Version : If I convert a file by using timer , but it will appear a dialog box I want skip it.


maxarus
03-12-2008, 06:30 AM
If I convert a file by using timer , but it will appear a dialog box as illustrates in figure1 when i clicked "OK" button anotho dialog box will also appear.
The problem is I want to skip theses 2 dialog boxes automatically without any click. How to do? Thanks a lot!!




This is my code that i wrote :
rollout mainrollout "test timer" width:164 height:112
(


label test "0" pos:[38,13] width:65 height:26
timer clock "testClock" interval:10000


on clock tick do

(


theClasses = exporterPlugin.classes

exportFile (GetDir #scene + "/converttest" ) using:theClasses[28]

)

)

createdialog mainrollout

RustyKnight
03-12-2008, 11:40 AM
I could be mean and say that you didn't read the docs...but it is more likely that in your haste, you simply missed, but...The docs have this to say with reagrds to the export functionThe #noPrompt flag prevents any configuration or control dialogs from being displayed in which case the default configuration is used.exportFile <filename_string> [ #noPrompt ] [ selectedOnly:<boolean> ] [ using:<maxclass> ]Now, you shouldn't need the "using" class if you append the correct file extension, but if you're interested, I think it is "VrmlImp" (that is "using:VrmImp"), but you could check it by making a call to "exporterPlugin.classes", this will list all the avaliable expoters.

Shane

ps: It would be better to have posted in the original thread...keeps things clean ;)

maxarus
03-13-2008, 04:31 AM
http://www.freewebs.com/poppinny/vrml.JPG

Figure 1

http://www.freewebs.com/poppinny/vrml2.JPG
Figure2

I would like yes in figure1 and ok in figure2

RustyKnight
03-13-2008, 11:11 PM
If the #noprompt option is not working for you (sorry if you already tried this), you need to look at DialogMonitorOPS and UIAccessor. This is a little more complicated and I suggest some time reading the docs and trying a few things first, but, basically you will be able to find out when a dialog window is opened and press the buttons you want.

It's all rather cool, but can be a little tricky to get it to work the way you expect it to (or at least it was for more)

Shane

maxarus
03-14-2008, 08:37 AM
Thank you so much for your answer. I can do it.

RustyKnight
03-15-2008, 06:20 AM
Glad I could help :D

Shane

CGTalk Moderation
03-15-2008, 06:20 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.