sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    UI.openURL(executable + params)

    Scheduled Pinned Locked Moved Developers' Forum
    17 Posts 6 Posters 3.7k Views 6 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W Offline
      Whaat
      last edited by

      @unknownuser said:

      'Dos' window is visible in the background so it is not clean solution.

      I think if you use the command "start" before the name of the executable, the dos window will disappear after executing the batch file.

      start kerkythea.exe script.kst

      Whaat

      SketchUp Plugins for Professionals

      1 Reply Last reply Reply Quote 0
      • T Offline
        tomasz
        last edited by

        Thanks Azuby,
        Don't worry. I am not familiar with MACs at all. You are simply at the much higher level of programming then me, so most of what you are writing sounds like a Chinese to me 😄 I simply would like to start Kerkythea on MAC with start.kst file as a parameter (file to be opened when KT starts).
        By the way, next version of KT is expected in few months and it will be available for MAC!
        It is what Giannis says.

        Thanks Whaat,
        I have done some investigation and the line in the batch file should look like:
        start "" "C:\Program Files\Kerkythea\Kerkythea.exe" "start.kst"
        Now it works (PC only 😞 )!

        Tomasz

        Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

        1 Reply Last reply Reply Quote 0
        • T Offline
          tomasz
          last edited by

          Azuby, I have finally understood what you have written in you first post (I am not very familiar with standard Ruby methods). It works excellent with "dir", but for some reason KT is being opened only when I close SU otherwise SU is hanging and KT awaiting to start (edit - it takes about 40sec KT to start).

          system("Kerkythea.exe start.kst")
          
          s=`Kerkythea.exe start.kst`
          

          works fine. Is it possible to run KT as a separate thread,
          so SU would be still working?

          Tomasz

          Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

          1 Reply Last reply Reply Quote 0
          • T Offline
            tomasz
            last edited by

            s=`c;/Program Files/Kerkythea/Kerkythea.exe "c;\\Program Files\\Kerkythea\\start.kst"`
            

            It is script that will run exe with parameter in "" (PC).
            For MAC I presume I will have to replace all \ by /.

            Still don't know how to keep SU alive when KT is running.

            Tomasz

            Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

            1 Reply Last reply Reply Quote 0
            • A Offline
              azuby
              last edited by

              Moin,

              you can't do this with Ruby threads, they let Sketchup freeze while your other application is running. The code would be

              Thread.new do `WHATEVER` end
              

              Also you can't use exec or fork. The only way would be writing a really simple server application, running it on localhost and call it from Sketchup.

              azuby

              *error initus :: Blocks | CurrentDate | d/Code | extensionmanager | FFlipper | HideEdges | MeasuredArea | ModelHistory | PluginsHelp | PronButton | SAWSO | SCP | SU²CATT

              Bad English? PM me, correct me. :smile:**

              1 Reply Last reply Reply Quote 0
              • TIGT Online
                TIG Moderator
                last edited by

                Any ideas what's causing this glitch ?

                help=Sketchup.find_support_file("RoofHelp.mht","Plugins/")
                #=big file, but works...

                help=Sketchup.find_support_file("RoofHelp.pdf","Plugins/")
                #=small file, but not working ???

                UI.messagebox("ERROR\nRoof Help File NOT found.") if not UI.openURL("file:///"+help)

                On a PC with Vista UI.openURL will open almost any type of file except a PDF ?

                This is delaying my beta issue of Roof.rb as it needs a help file !

                TIG

                1 Reply Last reply Reply Quote 0
                • T Offline
                  tomasz
                  last edited by

                  The file name is case sensitive. Does it matter?
                  Try dir with the folder and look for the file.upcase.
                  Tomasz

                  Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

                  1 Reply Last reply Reply Quote 0
                  • TIGT Online
                    TIG Moderator
                    last edited by

                    I don't think it's the case or another thought I had was even blank-spaces in paths (tried gsub 20% etc without any change in results).

                    It just seems to dislike PDF files - other types - mht, htm, doc, txt et al work OK...

                    Is it a setting in Vista ?

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      tomasz
                      last edited by

                      I have no idea. I am working on XP.

                      Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

                      1 Reply Last reply Reply Quote 0
                      • TIGT Online
                        TIG Moderator
                        last edited by

                        @unknownuser said:

                        I have no idea. I am working on XP.

                        Thanks anyway.

                        Just upgraded to a new PC - Core 2 Quad with 2Gb RAM - but it runs Vista...

                        Vista seems to be the problem...

                        TIG

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post
                        Buy SketchPlus
                        Buy SUbD
                        Buy WrapR
                        Buy eBook
                        Buy Modelur
                        Buy Vertex Tools
                        Buy SketchCuisine
                        Buy FormFonts

                        Advertisement