OS is Win=0 / OSX = 1
Hey there.
Is it possible to get a true/false message (0/1) depending on which OS HH is running?
Unfortunately, the Usine Path module seems to be static. I hoped it would update the path dynamically
depending on which OS HH3 is currently running, but it doesn't.
Basically, I just need the Path module to update the path on .wkp loading and all would be fine.
But it is not.
Any ideas?
Thanks,
tL.
Is it possible to get a true/false message (0/1) depending on which OS HH is running?
Unfortunately, the Usine Path module seems to be static. I hoped it would update the path dynamically
depending on which OS HH3 is currently running, but it doesn't.
Basically, I just need the Path module to update the path on .wkp loading and all would be fine.
But it is not.
Any ideas?
Thanks,
tL.
this script should to the job, connecting 'on itit' or path loadd pulse to refresh
Code: Select all
//////////////////////////
// Extract usine app path with refresh button
/////////////////////////
// declaration
var refresh,textOut : Tparameter;
var position : integer;
var pathstr : string;
var is_windows : Tparameter;
// initialisation : create parameters
procedure init;
begin
refresh := CreateParam('get_path',ptButton);
SetIsOutPut(refresh,false);
textOut := CreateParam('path',ptTextField);
SetIsInPut(textOut,false);
is_windows := CreateParam('is_windows',ptSwitch);
SetIsInPut(is_windows,false);
end;
// Callback
procedure callBack(n:integer);
begin
pathstr := GetApplicationPath();
setStringValue(textout,pathstr);
position := pos('Win',pathstr);
if(position>0) then begin
setValue(is_windows,1);
end;
end;Awesome. Yes, this works great. Thanks a lot, man!
Well done 23FX !
great script!
but easier with the file-path-delimiter module
if the output is '/' its OSX if the out is '' it's WIN
senso+++
but easier with the file-path-delimiter module
if the output is '/' its OSX if the out is '' it's WIN
senso+++
Olivier Sens
www.brainmodular.com
www.brainmodular.com
One little thing though in general with this setup:
@Senso:
It seems that the Sampler tries to load the files even before an "on init" can change the path so
that the files get found immediately.
I still get a long file not found/search list when loading a workspace. When the search is over and nothing was found,
wkp loading completes and THEN the path gets triggered and all samples are there as soon as I enable the engine .
The thing that I did is to move between OSX and Windows without always having to relocate the files.
So again, this works now automatically thanks to 23fx23's script, but it still doesn't suppress the file not found/search
stuff. Even if it should? Is there any way around this?
I mean it does work but I still have quite some downtime until the (in this case unnecessary) search process is over.
Thanks & best,
tL.
@Senso:
It seems that the Sampler tries to load the files even before an "on init" can change the path so
that the files get found immediately.
I still get a long file not found/search list when loading a workspace. When the search is over and nothing was found,
wkp loading completes and THEN the path gets triggered and all samples are there as soon as I enable the engine .
The thing that I did is to move between OSX and Windows without always having to relocate the files.
So again, this works now automatically thanks to 23fx23's script, but it still doesn't suppress the file not found/search
stuff. Even if it should? Is there any way around this?
I mean it does work but I still have quite some downtime until the (in this case unnecessary) search process is over.
Thanks & best,
tL.
@23fx23
So it seems there might be a problem.
I get always a 1 (1=win10) from the script. I noticed when loading a workspace back on OSX.
I thought it worked flawless, because I imported OSX workspaces into Windows,
and there was no problem.
However: The workspace on OSX also outputs a 1. How come? Any idea?
Thanks,
tL.
So it seems there might be a problem.
I get always a 1 (1=win10) from the script. I noticed when loading a workspace back on OSX.
I thought it worked flawless, because I imported OSX workspaces into Windows,
and there was no problem.
However: The workspace on OSX also outputs a 1. How come? Any idea?
Thanks,
tL.
No, that doesn't work here.but easier with the file-path-delimiter module
if the output is '/' its OSX if the out is '' it's WIN
senso+++
Always get "/"
I did a Path delim going into a string =
that checks against "/" and I get always a 1 on Win10 and on OSX as well...
(Meaning OSX path delimitation. Also on Win10, no change)
Any idea why that is?

mmm that's strange, sadly can't really debug here as i don't have a mac. what the script is supposed to do is check the install path ie:
"C:Usine Hollyhock Win64 3.0.166" of currently running usine instance the script is trigged from and check if it contains "Win"
i suppose the path of the OSX doesn't contain Win? can't figure the problem.. strange path delim wouldn't work as well..
what do you see as path on the text out of script when run on OSX?
"C:Usine Hollyhock Win64 3.0.166" of currently running usine instance the script is trigged from and check if it contains "Win"
i suppose the path of the OSX doesn't contain Win? can't figure the problem.. strange path delim wouldn't work as well..
what do you see as path on the text out of script when run on OSX?
The Usine path module gives the correct output.
Not sure what's going on.
/Applications/Usine Hollyhock MacOSX 3.0.186.app
Gonna test some more.
Not sure what's going on.
/Applications/Usine Hollyhock MacOSX 3.0.186.app
Gonna test some more.
Okay. So it seems that the path module, when saved inside a patch on OSX doesn't update.
Same for the delimiter module.
When saved in OSX it will stay with the application path from OSX (not recalculating) and vice versa.
The same might be true for the path delimiter module. Didn't check that yet though.
(EDIT: Yes indeed. When I add a brand new path delimited in Windows, I get the correct delimitation.
So something is off here. Or the modules aren't built for dynamically calculating these things?)
That also would explain why the script does fail in the other direction. (It worked depending under which OS
the workspace was saved in the first place)
Same for the delimiter module.
When saved in OSX it will stay with the application path from OSX (not recalculating) and vice versa.
The same might be true for the path delimiter module. Didn't check that yet though.
(EDIT: Yes indeed. When I add a brand new path delimited in Windows, I get the correct delimitation.
So something is off here. Or the modules aren't built for dynamically calculating these things?)
That also would explain why the script does fail in the other direction. (It worked depending under which OS
the workspace was saved in the first place)
mm ok yes indeed probably made kinda thing based on the file that stored those metadatas... time for a new suggestion entry for senso^^
I wrote to support to see if this is intended behavior or not.
Let's see what we get.
Let's see what we get.
I think that there is a bug:
the module path is saved with the wkp and the old value reloaded on the new platform.
will be corrected in the v187
the module path is saved with the wkp and the old value reloaded on the new platform.
will be corrected in the v187
Olivier Sens
www.brainmodular.com
www.brainmodular.com
Who is online
Users browsing this forum: No registered users and 13 guests
