Author Topic: [SOLVED] Path for user's desktop on MacOS  (Read 2781 times)

0 Members and 1 Guest are viewing this topic.

Offline dzeek

  • Newbie
  • Posts: 7
    • View Profile
[SOLVED] Path for user's desktop on MacOS
« on: May 13, 2020, 10:27:02 am »
I'm converting a QB64 program I wrote for Windows 10 to MacOS. The Windows version allows the user to drag and drop the path to a user's folder on the program's EXE file. The program then stores files in that folder. Since QB64 for MacOS does not support drag and drop of files or folders I was thinking to use a predefined folder name on the user's desktop. Is there a call I can use to get the path to the user's desktop or a string I can use in an OPEN statement for the path to the user's desktop?
« Last Edit: May 14, 2020, 05:53:16 am by dzeek »

Offline dzeek

  • Newbie
  • Posts: 7
    • View Profile
Re: Path for user's desktop on MacOS
« Reply #1 on: May 13, 2020, 11:46:49 am »
I found a solution. ENVIRON$("HOME") returns a string of the users HOME path. For example "/Users/test". I can then append "/Desktop" to get the path to the users desktop.
« Last Edit: May 14, 2020, 07:19:03 am by dzeek »