Page 1 of 1
How can I escape a bang ('!') in a path for my menu script?
Posted: Wed 21 Sep, 2022 21:45
by chrisloughnane
I am trying to add a script that will open folder A on LHS and folder B on RHS.
To access it I hit
F2 and select my script which works.
Example
lua: if PPanel.Left then Keys("Tab") end
lua: Panel.SetPath(0, [[\\192.168.253.211\media\A]])
lua: Panel.SetPath(1, [[\\192.168.253.211\media\B]])
but if my path has
! at the start of a folder name it fails.
Example
lua: if PPanel.Left then Keys("Tab") end
lua: Panel.SetPath(0, [[\\192.168.253.211\media\A\!Read]])
lua: Panel.SetPath(1, [[\\192.168.253.211\media\B\!To Read]])
How can I delimit the
! in lua for my real path?
How can I delimit ! in a path for my menu script?
Posted: Wed 21 Sep, 2022 22:00
by HaRT
chrisloughnane wrote: ↑Wed 21 Sep, 2022 21:45
How can I delimit the ! in lua for my real path?
I assume you mean “escape” rather than “delimit”. It's not Lua that makes the difference, it's the User Menu,
!
is a special character there. I encourage you to read the built-in Help on this (press
F1
while the menu is open and then activate the (very first)
Special symbols
hypertext link by hitting
Enter
).
How can I delimit ! in a path for my menu script?
Posted: Wed 21 Sep, 2022 23:41
by chrisloughnane
HaRT wrote: ↑Wed 21 Sep, 2022 22:00
I assume you mean “escape” rather than “delimit”
I did mean
escape but couldn't find the edit option.
Perfect. Thank you very much HaRT. I found my answer, I was unaware of the built-in help with
F1 and everything is working now!
