Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, exile, Ayumi), 836 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Print Thread
Rate Thread
using %appdata% in 3DGS? #442427
06/21/14 13:49
06/21/14 13:49
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline OP
Expert
Kartoffel  Offline OP
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Hey there,

I've created this little application which displays 3D-tiles and executes applications when I click on them (mainly because I don't want to have a lot of shortcuts on my desktop):


When opening this application it fades in and uses the desktop wallpaper as background.

My problem is that I can't make it user-independent because I can't use %appdata% in 3DGS.
(The current background is always stored as "%APPDATA%\Microsoft\Windows\Themes\TranscodedWallpaper.jpg")

Does anybody know how I can access this path with 3DGS?

regards, Kartoffel


POTATO-MAN saves the day! - Random
Re: using %appdata% in 3DGS? [Re: Kartoffel] #442428
06/21/14 13:54
06/21/14 13:54
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
How about this???
Quote:

#define PRAGMA_PATH "path";
A7.10 Looks for include and other files in the given path when they are not found in the current folder. This is similar to the PATH statement in a project file, with the exception that paths given by PRAGMA_PATH are also used for include files. Example:
#define PRAGMA_PATH "%EXE_DIR%\Map-Editor\Scripts";


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: using %appdata% in 3DGS? [Re: DLively] #442429
06/21/14 13:57
06/21/14 13:57
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline OP
Expert
Kartoffel  Offline OP
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Thanks, but the problem is that Acknex doesn't recognize %appdata% as a path.


POTATO-MAN saves the day! - Random
Re: using %appdata% in 3DGS? [Re: Kartoffel] #442430
06/21/14 14:03
06/21/14 14:03
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
Ahh, I see.
What exactly does it recognize it as, if not a path tongue Very Strange problem indeed.


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: using %appdata% in 3DGS? [Re: DLively] #442431
06/21/14 14:09
06/21/14 14:09
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline OP
Expert
Kartoffel  Offline OP
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
it doesn't recognize it at all ;P
so it continues as if it were a path and tries to open the file -> file not found


POTATO-MAN saves the day! - Random
Re: using %appdata% in 3DGS? [Re: Kartoffel] #442432
06/21/14 14:20
06/21/14 14:20
Joined: Jul 2007
Posts: 619
Turkey, Izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 619
Turkey, Izmir
Code:
HRESULT WINAPI SHGetFolderPath(HWND hwndOwner, int nFolder,HANDLE hToken,DWORD dwFlags,char* pszPath);
#define PRAGMA_API SHGetFolderPath;Shell32.dll!SHGetFolderPathA
char temp_getfolder[260];
STRING* appdata_str="";

const int APPDATA = 0x001A;
const int DESKTOP = 0x0000;
const int PROGRAMFILES = 0x0026;

void get_folder()
{
	SHGetFolderPath(NULL,APPDATA,0,NULL,temp_getfolder);
	str_cpy(appdata_str,temp_getfolder);
	add_folder(_chr(appdata_str));
}



edit: need windows.h of course tongue

edit2: this may help also;

Code:
CSIDL_DESKTOP                   0x0000	// <desktop>
CSIDL_INTERNET                  0x0001	// Internet Explorer (icon on desktop)
CSIDL_PROGRAMS                  0x0002	// Start Menu\Programs
CSIDL_CONTROLS                  0x0003	// My Computer\Control Panel
CSIDL_PRINTERS                  0x0004	// My Computer\Printers
CSIDL_PERSONAL                  0x0005	// My Documents
CSIDL_FAVORITES                 0x0006	// <user name>\Favorites
CSIDL_STARTUP                   0x0007	// Start Menu\Programs\Startup
CSIDL_RECENT                    0x0008	// <user name>\Recent
CSIDL_SENDTO                    0x0009	// <user name>\SendTo
CSIDL_BITBUCKET                 0x000a	// <desktop>\Recycle Bin
CSIDL_STARTMENU                 0x000b	// <user name>\Start Menu
CSIDL_MYDOCUMENTS               0x000c	// logical "My Documents" desktop icon
CSIDL_MYMUSIC                   0x000d	// "My Music" folder
CSIDL_MYVIDEO                   0x000e	// "My Videos" folder
CSIDL_DESKTOPDIRECTORY          0x0010	// <user name>\Desktop
CSIDL_DRIVES                    0x0011	// My Computer
CSIDL_NETWORK                   0x0012	// Network Neighborhood (My Network Places)
CSIDL_NETHOOD                   0x0013	// <user name>\nethood
CSIDL_FONTS                     0x0014	// windows\fonts
CSIDL_TEMPLATES                 0x0015
CSIDL_COMMON_STARTMENU          0x0016	// All Users\Start Menu
CSIDL_COMMON_PROGRAMS           0x0017	// All Users\Start Menu\Programs
CSIDL_COMMON_STARTUP            0x0018	// All Users\Startup
CSIDL_COMMON_DESKTOPDIRECTORY   0x0019	// All Users\Desktop
CSIDL_APPDATA                   0x001a	// <user name>\Application Data
CSIDL_PRINTHOOD                 0x001b	// <user name>\PrintHood
CSIDL_LOCAL_APPDATA             0x001c	// <user name>\Local Settings\Applicaiton Data (non roaming)
CSIDL_ALTSTARTUP                0x001d	// non localized startup
CSIDL_COMMON_ALTSTARTUP         0x001e	// non localized common startup
CSIDL_COMMON_FAVORITES          0x001f
CSIDL_INTERNET_CACHE            0x0020
CSIDL_COOKIES                   0x0021
CSIDL_HISTORY                   0x0022
CSIDL_COMMON_APPDATA            0x0023	// All Users\Application Data
CSIDL_WINDOWS                   0x0024	// GetWindowsDirectory()
CSIDL_SYSTEM                    0x0025	// GetSystemDirectory()
CSIDL_PROGRAM_FILES             0x0026	// C:\Program Files
CSIDL_MYPICTURES                0x0027	// C:\Program Files\My Pictures
CSIDL_PROFILE                   0x0028	// USERPROFILE
CSIDL_SYSTEMX86                 0x0029	// x86 system directory on RISC
CSIDL_PROGRAM_FILESX86          0x002a	// x86 C:\Program Files on RISC
CSIDL_PROGRAM_FILES_COMMON      0x002b	// C:\Program Files\Common
CSIDL_PROGRAM_FILES_COMMONX86   0x002c	// x86 Program Files\Common on RISC
CSIDL_COMMON_TEMPLATES          0x002d	// All Users\Templates
CSIDL_COMMON_DOCUMENTS          0x002e	// All Users\Documents
CSIDL_COMMON_ADMINTOOLS         0x002f	// All Users\Start Menu\Programs\Administrative Tools
CSIDL_ADMINTOOLS                0x0030	// <user name>\Start Menu\Programs\Administrative Tools
CSIDL_CONNECTIONS               0x0031	// Network and Dial-up Connections
CSIDL_COMMON_MUSIC              0x0035	// All Users\My Music
CSIDL_COMMON_PICTURES           0x0036	// All Users\My Pictures
CSIDL_COMMON_VIDEO              0x0037	// All Users\My Video
CSIDL_RESOURCES                 0x0038	// %windir%\Resources\, For theme and other windows resources.
CSIDL_RESOURCES_LOCALIZED       0x0039	// %windir%\Resources\<LangID>, for theme and other windows specific resources.
CSIDL_COMMON_OEM_LINKS          0x003a	// Links to All Users OEM specific apps
CSIDL_CDBURN_AREA               0x003b	// USERPROFILE\Local Settings\Application Data\Microsoft\CD Burning
CSIDL_COMPUTERSNEARME           0x003d	// Computers Near Me (computered from Workgroup membership)



and you are welcome. wink

Last edited by Emre; 06/21/14 14:37.
Re: using %appdata% in 3DGS? [Re: Emre] #442433
06/21/14 14:32
06/21/14 14:32
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline OP
Expert
Kartoffel  Offline OP
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
works perfectly, thanks a lot :3


POTATO-MAN saves the day! - Random
Re: using %appdata% in 3DGS? [Re: Kartoffel] #442451
06/23/14 08:06
06/23/14 08:06
Joined: Jul 2013
Posts: 158
F
Feindbild Offline
Member
Feindbild  Offline
Member
F

Joined: Jul 2013
Posts: 158
On a side note, how do you get the desktop wallpaper? :3

Re: using %appdata% in 3DGS? [Re: Feindbild] #442456
06/23/14 08:24
06/23/14 08:24
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline OP
Expert
Kartoffel  Offline OP
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
It's my modification of a wallpaper of a game grin

I'll upload it if you want to wink

Edit#2: waaaiiit, do you mean how I access it, or do you want to have my wallpaper?

Last edited by Kartoffel; 06/23/14 08:38.

POTATO-MAN saves the day! - Random

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1