Golbez Posted August 17, 2022 Share Posted August 17, 2022 Hi im trying to set an ini directory from within an ini. Basically i have made a queing system for users to use my program and i need a way for all users to read the same ini from the same file. QueFileLocation="@ScriptDir & '\Que.ini'" this is what i have in my settings ini file for my program to read for the queing ini, but the code puls it at @scriptdir and not as a command. was wondering if there is a way to make this work or if i have to hardcode the location. (C:\Users\rds\Desktop\csi) Link to comment Share on other sites More sharing options...
Solution Shark007 Posted August 17, 2022 Solution Share Posted August 17, 2022 (edited) EDITTED response . . . you need to use @ScriptDir from within your script placing @ScriptDir in the ini file becomes simple text and no longer a directive From within your script, $QueFileLocation = @ScriptDir & "\Que.ini" IniWrite('Que.ini', 'IniSection', 'QueFileLocation', $QueFileLocation) Edited August 17, 2022 by Shark007 Link to comment Share on other sites More sharing options...
Golbez Posted August 17, 2022 Author Share Posted August 17, 2022 (edited) 48 minutes ago, Shark007 said: EDITTED response . . . you need to use @ScriptDir from within your script placing @ScriptDir in the ini file becomes simple text and no longer a directive From within your script, $QueFileLocation = @ScriptDir & "\Que.ini" IniWrite('Que.ini', 'IniSection', 'QueFileLocation', $QueFileLocation) I'm trying to find a way to use the command from the ini. I'm pretty sure I can't but I wanted to ask if there was a way I didn't know about. Nvm I seemy mistake you. Ty for fix Lol I always overlook the small things. Edited August 17, 2022 by Golbez Link to comment Share on other sites More sharing options...
Subz Posted August 17, 2022 Share Posted August 17, 2022 If you use ExpandVarStrings options you can use variables within a string, even read them from an ini, for example Opt("ExpandVarStrings", 1) Local $sProfileDir = @UserProfileDir ConsoleWrite("ScriptDir: @ScriptDir@@CRLF@ProfileDir: $sProfileDir$@CRLF@") Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now