PDA

View Full Version : Carriage Return or ESC



bradl
08-11-2003, 03:27 PM
If I create a macro type Lscript that perform some function that requires a keyboard entry like "Enter" or "ESC" how do I put this in the script?

Thanks,

bradl
08-12-2003, 01:45 PM
Come on... anybody...

Is this even possible?

bradl
08-12-2003, 01:57 PM
For instance, here is a layout script I have been using for years. It saves the scene and all objects, so I know I have "everything" saved. I have it mapped to the Home key:

SaveAllScene.ls:
_________________________

generic
{
Refresh();
SaveScene();
SaveAllObjects();
Refresh();
}
_________________________

I have to respond to two dialogs each time:
Warning: Overwrite existing file- Yes/No (enter = yes)
Are You sure you want to save all objects- Yes/No (enter = yes)

I would prefer to have the script dismiss the dialogs, so I need a keyboard "Enter" command (maybe there is a modifer for the 'save' commands above that would work?)

Additionally, I would like to have a render frame (F9) that automatically dismisses the dialog with the keyboard command "ESC".

evenflcw
08-12-2003, 04:41 PM
I have a simular autosaving script called Save Scenes & Objects by JB.

generic
{

AutoConfirm(1);
SaveScene();
SaveAllObjects();
AutoConfirm(0);

}

AutoConfirm(1) turns autoconfirmation on for the subsequent lines. And AutoConfirm(0) turns it back off again so it won't affect other confirmation boxes in LW.

The refreshes are a small and nice touch btw, I'm gonna add that here too, I think you could skip one of them though(?).

bradl
08-12-2003, 07:00 PM
Man that rocks! Thank you, thank you, thank you...

BTW... thank you!

I read the entire SDK and did not read a hint of this. Now that I know what to look for I probably will see it. Life is funny that way.

bradl
08-12-2003, 10:14 PM
In another thread I am trying to dismiss the Render Status dialog after an F9. Since it should have been posted here, I will.

Based on the AutoConfirm I was able to get the SaveAll script working fine but on the Render Status dialog it will work, but only if you do not return the value to 0. If you return to 0, it does not nothing, if you don't it works but the behavior continues on other dialogs as well. How can I make it wait for the window to dismiss then reset to 0?

Nothing happens:
_________________
@version 2.0
@warnings
@script generic

generic
{
Refresh();
AutoConfirm(1);
RenderFrame();
AutoConfirm(0);
}
__________________



Dialog dismisses but Autoconfirm remains True:
_________________
@version 2.0
@warnings
@script generic

generic
{
Refresh();
AutoConfirm(1);
RenderFrame();
//AutoConfirm(0);
}
__________________