Page 1 of 1
Posted: 11 Feb 2019, 00:50
by lytz1
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.
Posted: 11 Feb 2019, 02:22
by 23fx23
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;
Posted: 11 Feb 2019, 13:58
by lytz1
Awesome. Yes, this works great. Thanks a lot, man!
Posted: 11 Feb 2019, 15:45
by nay-seven
Well done 23FX !
Posted: 11 Feb 2019, 16:09
by senso
great script!
but easier with the file-path-delimiter module
if the output is '/' its OSX if the out is '' it's WIN
senso+++
Posted: 11 Feb 2019, 19:01
by lytz1
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.
Posted: 13 Feb 2019, 16:48
by lytz1
@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.
Posted: 13 Feb 2019, 17:03
by lytz1
but easier with the file-path-delimiter module
if the output is '/' its OSX if the out is '' it's WIN
senso+++
No, that doesn't work here.
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?

Posted: 13 Feb 2019, 17:21
by 23fx23
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?
Posted: 13 Feb 2019, 17:46
by lytz1
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.
Posted: 13 Feb 2019, 18:36
by lytz1
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)
Posted: 13 Feb 2019, 20:11
by 23fx23
mm ok yes indeed probably made kinda thing based on the file that stored those metadatas... time for a new suggestion entry for senso^^
Posted: 13 Feb 2019, 20:48
by lytz1
I wrote to support to see if this is intended behavior or not.
Let's see what we get.
Posted: 13 Feb 2019, 21:05
by senso
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