How to transfer folder references to standalone ?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
How to transfer folder references to standalone ?
In original (sub) stack user is given an option to parse accumulated cards for occurence of a specified word, create ( and view) a labeled file and place it in a thus updated folder.:
..................
..................
put "Parsed for" && cue && phenodate & ".html" into filename
put the effective filename of this stack into destination
set the itemdelimiter to "/"
delete last item of destination
delete last item of destination
delete last item of destination
open file destination &"/"& parsings &"/"& filename
..................
..................
I omit the further references to the folder.
As I see it I need an entirely new way to handle the relation to this folder
( + another folder + a html-file)
Maybe a combination of externals, folders, start using ?
The solution should be implemented both for testing in the original and be working in the standalone
Hopefully from Kresten
..................
..................
put "Parsed for" && cue && phenodate & ".html" into filename
put the effective filename of this stack into destination
set the itemdelimiter to "/"
delete last item of destination
delete last item of destination
delete last item of destination
open file destination &"/"& parsings &"/"& filename
..................
..................
I omit the further references to the folder.
As I see it I need an entirely new way to handle the relation to this folder
( + another folder + a html-file)
Maybe a combination of externals, folders, start using ?
The solution should be implemented both for testing in the original and be working in the standalone
Hopefully from Kresten
-
- VIP Livecode Opensource Backer
- Posts: 7229
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: How to transfer folder references to standalone ?
Depending on platform, the file paths will be different. Parsing a path from the location of the standalone won't work in most cases (Windows sometimes is an exception; all other platforms will fail.) Instead of parsing the path, use the special folder path "resources" which always points to the same virtual folder as the standalone file:
When you are developing in the IDE, specialFolderPath("resources") is the folder containing your mainstack. In a standalone, it is the equivalent location which varies by platform. LC knows where to find them.
Code: Select all
put specialFolderPath("resources") &"/"& parsings &"/"& filename into tPath
open file tPath
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: How to transfer folder references to standalone ?
Thank you for fast and precise instruction
best regards
kresten
best regards
kresten
Re: How to transfer folder references to standalone ?
Oh that is just awesome Jaque, and solves a problem I had in the IDE post
**Edit - While no less awesome, it apparently wasn't available much before vers. 6.7.x, if your using something earlier other special folder paths exist.
To get directly to the applications folder, this appears to do the job for those using < 6.6.x. (Probably just me )
**Edit - While no less awesome, it apparently wasn't available much before vers. 6.7.x, if your using something earlier other special folder paths exist.
To get directly to the applications folder, this appears to do the job for those using < 6.6.x. (Probably just me )
Re: How to transfer folder references to standalone ?
jackueline s reply was most helpfull. But I need a way from menu items to just open the folders for inspection, without specifying a file.
How can that be scripted ?
How can that be scripted ?
Re: How to transfer folder references to standalone ?
Hi Kresten,
Example:
Best
Klaus
that's pretty easy: launch document (path to folder)kresten wrote:jackueline s reply was most helpfull. But I need a way from menu items to just open the folders for inspection, without specifying a file.
How can that be scripted ?
Example:
Code: Select all
...
put specialfolderpath("desktop") into tFolder
launch document tFolder
...
Klaus
Re: How to transfer folder references to standalone ?
I am experimenting to implement the opening of a folder:
Case "Go to Screenshots"
put specialfolderpath("resources") &"/"& "Screenshots" into tFolder
launch document tFolder
set the iconic of stack "phenomenalog" to true
but evidently the reference to the folder is not accepted by the editor.
How shall it be spelled?
Case "Go to Screenshots"
put specialfolderpath("resources") &"/"& "Screenshots" into tFolder
launch document tFolder
set the iconic of stack "phenomenalog" to true
but evidently the reference to the folder is not accepted by the editor.
How shall it be spelled?
Re: How to transfer folder references to standalone ?
Hi Kresten,
the script looks OK, but on a Mac this -> specialfolderpath("resources") is a folder INSIDE of the
standalone application package and maybe the user is not allowed to view that folder?
Just guessing...
Please check the result and see what it tells you:
Best
Klaus
the script looks OK, but on a Mac this -> specialfolderpath("resources") is a folder INSIDE of the
standalone application package and maybe the user is not allowed to view that folder?
Just guessing...
Please check the result and see what it tells you:
Code: Select all
...
put specialfolderpath("resources") &"/"& "Screenshots" into tFolder
## And maybe:
answer tFolder
## Just to check if the folderpath looks correctly!
launch document tFolder
if the result <> EMPTY then
answer the result
end if
...
Klaus
Re: How to transfer folder references to standalone ?
But the problem seems to lie in the first line, where I get an error message:
"Compilation error: can't create a variable with that name (explicit variable?) near tFolder, char 65"
Are you sure my spelling is correct, parentheses and quotation marks etc ?
"Compilation error: can't create a variable with that name (explicit variable?) near tFolder, char 65"
Are you sure my spelling is correct, parentheses and quotation marks etc ?
Re: How to transfer folder references to standalone ?
AHA!
No spelling etc. is correct, but when in the script editor, uncheck "Script variables" in the "Edit" menu!
Looks like some evil guy checked this just to tease you.
No spelling etc. is correct, but when in the script editor, uncheck "Script variables" in the "Edit" menu!
Looks like some evil guy checked this just to tease you.
Re: How to transfer folder references to standalone ?
Dear Klaus
Thank you so much for your fine help with this. I succeeded in implementing two folder references and reference to a html file, so they work as wished for in the "set the editMenus of this stack to true" situation.
But back in the editMenus to false situation none of the three items are implemented !!!!
I have tried saving, closing and reopening the application but same negative result !
Any advice on this?
Thank you so much for your fine help with this. I succeeded in implementing two folder references and reference to a html file, so they work as wished for in the "set the editMenus of this stack to true" situation.
But back in the editMenus to false situation none of the three items are implemented !!!!
I have tried saving, closing and reopening the application but same negative result !
Any advice on this?
Re: How to transfer folder references to standalone ?
Hi Kresten,
not sure I understand your problem!?
You edited your menu(s) and after "set the editMenus of this stack to false" your changes/edited menus are gone?
Best
Klaus
not sure I understand your problem!?
You edited your menu(s) and after "set the editMenus of this stack to false" your changes/edited menus are gone?
Best
Klaus
Re: How to transfer folder references to standalone ?
The items are still there, but no effect from clicking them
Re: How to transfer folder references to standalone ?
Can or did you debug the "Menupick" handler(s)?
Re: How to transfer folder references to standalone ?
Well, When I click apply I get a "no errors occured "