' ------------------------------------------------------------------------------------ ' autorun.vbs ' This script is intended to be embedded in a all-in-one album of JPS stereoscopic pictures. ' When the all-in-one album is started the script is executed and will create keybaord ' shortcuts for controling the way the stereo pictures are displayed. ' ' During slideshow, pressing the Ctrl key and one of number keys on the top of ' the keyboard (not the numeric keypad) will change the display: ' ' - Ctrl+0: Side by side with 4:3 centering ' - Ctrl+1: Single image viewing ' - Ctrl+2: Over/Under viewing ' - ///////Ctrl+3: Yellow-blue and Green-magenta anaglyphs ' - Ctrl+4: Cycle between different red-cyan anaglyphs ' - Ctrl+5: Swap left and right images ' - Ctrl+6: Mirror first picture ' - Ctrl+7: Mirror second picture ' - Ctrl+8: Vertically interlaced image for Sharp 3D (should be used with zoom 1:1) ' - Ctrl+9: Reset to default values (side-by-side, no mirror, no swap, no resize,...). ' - ////Ctrl+=: Split an anaglyph (giving a side-by-side picture), color then B&W ' - Ctrl+Alt+M: Display the setup screen of the JPS module ' ' Important: The JPS viewer module (MAX_JPSView.dll) must be included in the all-in-one ' album (use the "Add MAX extensions" button for instance). The autorun.vbs ' script (without changing its name) must also be included in the all-in-one ' album. ' ------------------------------------------------------------------------------------ option explicit Const bReg = False App.ClearTrace app.AddCustomTool ">JPS side by sideZ", "3|" &_ "var jpsMAX, fsv, k, nMode, bSwap;" & vbCRLF &_ "App.ClearTrace();" & vbCRLF &_ "var jpsMAX = App.GetMAX( ""MAX_JPSView"" );" & vbCRLF &_ "if (jpsMAX != null) {" & vbCRLF &_ " jpsMAX.Execute( ""mode=0"" );" & vbCRLF &_ " jpsMAX.Execute( ""swap=0"" );" & vbCRLF &_ " jpsMAX.Execute( ""resizeJPS=0"" );" & vbCRLF &_ " jpsMAX.Execute( ""resizeJPS_W=1024"" );" & vbCRLF &_ " jpsMAX.Execute( ""resizeJPS_H=768"" );" & vbCRLF &_ " jpsMAX.Execute( ""centerJPS=1"" );" & vbCRLF &_ " fsv = App.GetFullScreenView();" & vbCRLF &_ " if (fsv != null) fsv.ReloadPicture( true );" & vbCRLF &_ "}", 48, 2, bReg app.AddCustomTool ">JPS one pictureZ", "3|" &_ "var jpsMAX, fsv, k, nMode, bSwap;" & vbCRLF &_ "App.ClearTrace();" & vbCRLF &_ "var jpsMAX = App.GetMAX( ""MAX_JPSView"" );" & vbCRLF &_ "if (jpsMAX != null) {" & vbCRLF &_ " jpsMAX.Execute( ""mode=1"" );" & vbCRLF &_ " fsv = App.GetFullScreenView();" & vbCRLF &_ " if (fsv != null) fsv.ReloadPicture( true );" & vbCRLF &_ "}", 49, 2, bReg app.AddCustomTool ">JPS over/underZ", "3|" &_ "var jpsMAX, fsv, k, nMode, bSwap;" & vbCRLF &_ "App.ClearTrace();" & vbCRLF &_ "var jpsMAX = App.GetMAX( ""MAX_JPSView"" );" & vbCRLF &_ "if (jpsMAX != null) {" & vbCRLF &_ " jpsMAX.Execute( ""mode=2"" );" & vbCRLF &_ " fsv = App.GetFullScreenView();" & vbCRLF &_ " if (fsv != null) fsv.ReloadPicture( true );" & vbCRLF &_ "}", 50, 2, bReg ''app.AddCustomTool ">JPS Gray anaglyph", "1|" & sMyAlbumlFolder & "ChangeJPSMax_GrAna.vbs", 51, 2, True app.AddCustomTool ">JPS AnaglyphZ", "3|" &_ "var jpsMAX, fsv, nMode, bSwap;" & vbCRLF &_ "App.ClearTrace();" & vbCRLF &_ "jpsMAX = App.GetMAX( ""MAX_JPSView"" );" & vbCRLF &_ "if (jpsMAX != null) {" & vbCRLF &_ " jpsMAX.Execute( ""mode=?"" );" & vbCRLF &_ " nMode = parseInt( jpsMAX.GetResult() );" & vbCRLF &_ " App.Trace( ""Current mode is: "" + nMode );" & vbCRLF &_ " bSwap = parseInt( jpsMAX.GetResult() );" & vbCRLF &_ " // if we are not in the anaglyph mode already, swap the pictures" & vbCRLF &_ " if ((nMode != 3 && nMode != 4 && nMode != 9 && nMode != 11) && !bSwap) jpsMAX.Execute( ""swap=1"" );" & vbCRLF &_ " if (nMode == 11)" & vbCRLF &_ " jpsMAX.Execute( ""mode=9"" );" & vbCRLF &_ " else if (nMode == 9)" & vbCRLF &_ " jpsMAX.Execute( ""mode=4"" );" & vbCRLF &_ " else if (nMode == 4)" & vbCRLF &_ " jpsMAX.Execute( ""mode=3"" );" & vbCRLF &_ " else if (nMode == 3)" & vbCRLF &_ " jpsMAX.Execute( ""mode=17"" );" & vbCRLF &_ " else" & vbCRLF &_ " jpsMAX.Execute( ""mode=11"" );" & vbCRLF &_ " fsv = App.GetFullScreenView();" & vbCRLF &_ " if (fsv != null) fsv.ReloadPicture( true );" & vbCRLF &_ "}", 52, 2, bReg ''app.AddCustomTool ">JPS Anaglyph", "3|" & sMyAlbumlFolder & "ChangeJPSMax_Anaglyph.vbs", 52, 2, bReg app.AddCustomTool ">JPS Swap picturesZ", "3|" &_ "var jpsMAX, fsv, k, nMode, bSwap;" & vbCRLF &_ "App.ClearTrace();" & vbCRLF &_ "var jpsMAX = App.GetMAX( ""MAX_JPSView"" );" & vbCRLF &_ "if (jpsMAX != null) {" & vbCRLF &_ " jpsMAX.Execute( ""swap=?"" );" & vbCRLF &_ " bSwap = parseInt( jpsMAX.GetResult() );" & vbCRLF &_ " jpsMAX.Execute( ""swap="" + (1-bSwap) );" & vbCRLF &_ " fsv = App.GetFullScreenView();" & vbCRLF &_ " if (fsv != null) fsv.ReloadPicture( true );" & vbCRLF &_ "}", 53, 2, bReg app.AddCustomTool ">JPS Mirror Pic 1Z", "3|" &_ "var jpsMAX, fsv, bMirror;" & vbCRLF &_ "App.ClearTrace();" & vbCRLF &_ "var jpsMAX = App.GetMAX( ""MAX_JPSView"" );" & vbCRLF &_ "if (jpsMAX != null) {" & vbCRLF &_ " jpsMAX.Execute( ""mirror1=?"" );" & vbCRLF &_ " bMirror = parseInt( jpsMAX.GetResult() );" & vbCRLF &_ " jpsMAX.Execute( ""mirror1="" + (1-bMirror) );" & vbCRLF &_ " fsv = App.GetFullScreenView();" & vbCRLF &_ " if (fsv != null) fsv.ReloadPicture( true );" & vbCRLF &_ "}", 54, 2, bReg app.AddCustomTool ">JPS Mirror Pic 2Z", "3|" &_ "var jpsMAX, fsv, bMirror;" & vbCRLF &_ "App.ClearTrace();" & vbCRLF &_ "var jpsMAX = App.GetMAX( ""MAX_JPSView"" );" & vbCRLF &_ "if (jpsMAX != null) {" & vbCRLF &_ " jpsMAX.Execute( ""mirror2=?"" );" & vbCRLF &_ " bMirror = parseInt( jpsMAX.GetResult() );" & vbCRLF &_ " jpsMAX.Execute( ""mirror2="" + (1-bMirror) );" & vbCRLF &_ " fsv = App.GetFullScreenView();" & vbCRLF &_ " if (fsv != null) fsv.ReloadPicture( true );" & vbCRLF &_ "}", 55, 2, bReg app.AddCustomTool ">JPS Horizontally and Vertically", "3|" &_ "var jpsMAX, fsv, k, nMode, bSwap;" & vbCRLF &_ "App.ClearTrace();" & vbCRLF &_ "var jpsMAX = App.GetMAX( ""MAX_JPSView"" );" & vbCRLF &_ "if (jpsMAX != null) {" & vbCRLF &_ " jpsMAX.Execute( ""mode=?"" );" & vbCRLF &_ " nMode = parseInt( jpsMAX.GetResult() );" & vbCRLF &_ " if (nMode == 8)" & vbCRLF &_ " jpsMAX.Execute( ""mode=7"" );" & vbCRLF &_ " else" & vbCRLF &_ " jpsMAX.Execute( ""mode=8"" );" & vbCRLF &_ " jpsMAX.Execute( ""centerJPS=1"" );" & vbCRLF &_ " //App.Monitors = 1; // Sharp 3D monitors is on monitor #1" & vbCRLF &_ " fsv = App.GetFullScreenView();" & vbCRLF &_ " if (fsv != null) fsv.ReloadPicture( true );" & vbCRLF &_ "}", 56, 2, bReg app.AddCustomTool ">JPS Restore defaultZ", "3|" &_ "var jpsMAX, fsv, k, nMode, bSwap;" & vbCRLF &_ "App.ClearTrace();" & vbCRLF &_ "var jpsMAX = App.GetMAX( ""MAX_JPSView"" );" & vbCRLF &_ "if (jpsMAX != null) {" & vbCRLF &_ " jpsMAX.Execute( ""reset"" );" & vbCRLF &_ " fsv = App.GetFullScreenView();" & vbCRLF &_ " if (fsv != null) fsv.ReloadPicture( true );" & vbCRLF &_ "}", 57, 2, bReg 'app.AddCustomTool ">JPS split anaglyph", "3|" & sMyAlbumlFolder & "ChangeJPSMax.vbs", 187, 2, True app.AddCustomTool "JPS Setup", "3|" &_ "jpsMAX = App.GetMAX( ""MAX_JPSView"" );" & vbCRLF &_ "if (jpsMAX != null) jpsMAX.Setup();" & vbCRLF, &h4D, 6, bReg dim alb set alb = App.GetCurrentAlbum if not alb is Nothing then alb.sAlbumCopyright = alb.sAlbumCopyright & vbCRLF & vbCRLF &_ "---------------------------------------------------------------------------------------------" & vbCRLF &_ " Viewing stereo pictures" & vbCRLF &_ "---------------------------------------------------------------------------------------------" & vbCRLF &_ "During slideshow, press the Ctrl key and one of the number keys on the top of the keyboard:" & vbCRLF &_ "" & vbCRLF &_ " - Ctrl+0: Side by side with 4:3 centering" & vbCRLF &_ " - Ctrl+1: Single image viewing" & vbCRLF &_ " - Ctrl+2: Over/Under viewing" & vbCRLF &_ " - Ctrl+4: Cycle between different red-cyan anaglyphs" & vbCRLF &_ " - Ctrl+5: Swap left and right images" & vbCRLF &_ " - Ctrl+6: Mirror first picture" & vbCRLF &_ " - Ctrl+7: Mirror second picture" & vbCRLF &_ " - Ctrl+8: Vertically interlaced image " & vbCRLF &_ " - Ctrl+9: Reset to default values (side-by-side, no mirror, no swap, no resize,...)." & vbCRLF &_ " - Ctrl+Alt+M: Display the setup screen of the JPS module" end if App.Trace "Done!", -1, 7