UI.openURL(executable + params)
-
@unknownuser said:
Azuby - how it will look using your backtick?
Germans are not funny , so I don't know, whether this is just fun question. Backticks are one of these little diacritic marks i.e. French use on "a", "e" and so on: "à", "è" ... Look my code above, I wrote
**dir**
. Between the backticks you write the call as you would write it in batch file or command line; for a coloured directory listing on Mac you could writels -Glas
orls -G -l -a -s
. If you do not need the result of the call, just information whether it failed or not, use the "system" call, if you want to get the result, than use backticks. And if you want to kill Sketchup, use "exec"azuby
-
@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
-
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
-
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
-
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
-
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
-
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 !
-
The file name is case sensitive. Does it matter?
Try dir with the folder and look for the file.upcase.
Tomasz -
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 ?
-
I have no idea. I am working on XP.
-
@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...
Advertisement