April 24, 2019 at 4:31 pm
#20038
we use this in Omnis Studio v6.0. “homedirectorypath” is a character variable.
For Mac,
; user home path
Do $runapplescript(‘path to home folder from user domain as string’,homedirectorypath) Returns errcode`
Calculate homedirectorypath as replaceall(homedirectorypath,kDq,”)
For Windows:
If isunicode()
Register DLL (“shfolder”,”SHGetFolderPathW”,”CJJJJCN”) Returns lnError
Call DLL (“shfolder”,”SHGetFolderPathW”,0,pnFolderType,0,0,lcString,lnError) Returns lcPath
Else
Register DLL (“shfolder”,”SHGetFolderPathA”,”CJJJJCN”) Returns lnError
Call DLL (“shfolder”,”SHGetFolderPathA”,0,pnFolderType,0,0,lcString,lnError) Returns lcPath
End If
Calculate homedirectorypath as lcPath
-
This reply was modified 1 year, 12 months ago by
Mark Phillips.