- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am looking to access an external python file that is located in the documents folder for windows.
The file that I wanna access "C:\Users\USERNAME\Documents\MaxScripts\mainUi\launch.py"
I don't want to hardcode the Username so instead, I found this "sysInfo.username" that spits out the user name for the login.
So to add that in the string I can do something like this in Python:
"C:\Users\{}\Documents\MaxScripts\mainUi\launch.py".format(sysInfo.username)
What would be the equivalent to this in Maxscript? Or is there a better alternative to what I am trying to achieve?
Actual code that I wanna run:
python.ExecuteFile @"C:\Users\USERNAME\Documents\MaxScripts\mainUi\launch.py"
P.S. I will be linking this "python.Execute" to a button.
Solved! Go to Solution.