
Make Stack Name = New Stack FileName
Forum rules
Be kind.
Be kind.
- richmond62
- Posts: 4831
- Joined: Sun Sep 12, 2021 11:03 am
- Location: Bulgaria
- Contact:
- tperry2x
- Posts: 3209
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: Make Stack Name = New Stack FileName
Okay, glad that's worked out.
If you manually check for updates and re-download last update, it'll be the new version.

If you manually check for updates and re-download last update, it'll be the new version.

-
- Posts: 114
- Joined: Sat Oct 16, 2021 5:05 pm
- Contact:
Re: Make Stack Name = New Stack FileName
After a trial, I don't care for the naming dialog. Count me in the "no" column.
The revIDELibrary method names the file and stack simultaneously ensuring they're the same with a 6-line fix that's fast and effective, eliminating the need for an extra naming dialog. It's what other programs do. Give it a try.
in stack "RevIDELibrary", at about line 7597, in Toolset > Libraries:
The revIDELibrary method names the file and stack simultaneously ensuring they're the same with a 6-line fix that's fast and effective, eliminating the need for an extra naming dialog. It's what other programs do. Give it a try.
in stack "RevIDELibrary", at about line 7597, in Toolset > Libraries:
Code: Select all
# Check if the stack has a filename. IF not, redirect to save as
if the effective filename of stack tStackName is empty then
revIDEActionSaveStackAs the long ID of stack tStackName
--add the following code--------------
set the itemDel to slash
get item -1 of the effective filename of stack tStackName --short name.extention
if it <> empty then --user entered a name
set the itemDel to "."
set the name of stack tStackName to item 1 of it --short name
end if
--end add---------------------
exit revIDESaveStack
end if
- tperry2x
- Posts: 3209
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: Make Stack Name = New Stack FileName
Edit: Got you, and I added a couple of small tweaks (credited you for this though):
Code: Select all
-- terryL's script for renaming the stack on save
put the itemDelimiter into tOldDelim
set the itemDelimiter to slash
get item -1 of the effective filename of stack tStackName --short name.extention
if it <> empty then --user entered a name
set the itemDel to "."
if the title of stack tStackName is "" then set the title of stack tStackName to item 1 of it
set the name of stack tStackName to item 1 of it --short name
end if
set the itemDelimiter to tOldDelim
-- end terryL's script (28-12-24)
It also restores the itemDelimiter to whatever it was before this bit of script runs.
- tperry2x
- Posts: 3209
- Joined: Tue Dec 21, 2021 9:10 pm
- Location: Somewhere in deepest darkest Norfolk, England
- Contact:
Re: Make Stack Name = New Stack FileName
I've also made the rename on new stack a prefs setting. So those who like it can turn it on, those who don't can leave it off. (default is off)

Oh, almost forgot: I also added the check for curl (in case you run the updater on a linux distro without it). Thanks Richmond. (Still can't work out why Xubuntu doesn't include this).
If you manually check for updates and re-download last update, it'll be the new version.
Oh, almost forgot: I also added the check for curl (in case you run the updater on a linux distro without it). Thanks Richmond. (Still can't work out why Xubuntu doesn't include this).
-
- Posts: 114
- Joined: Sat Oct 16, 2021 5:05 pm
- Contact:
Re: Make Stack Name = New Stack FileName
Herding cats would be easier than satisfying opinionated puds like me. I don't know how you do it. Thanks tperry.
Who is online
Users browsing this forum: No registered users and 4 guests