File Name in Field?
Just a quickie (I searched and cannot find): On opening a text file with the dialog, and displaying the contents in a field: is there a way to retrieve just the filename? (so I can put it in it's own field) tia :) Cheers, Heather ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: File Name in Field?
Hi Heather, After using the answer file or ask file command, you have the required information in the it variable. Do with it whatever you like. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering http://economy-x-talk.com http://www.salery.biz Benefit from our inexpensive hosting services. See http://economy-x-talk.com/server.html for more info. On 6 aug 2008, at 12:15, H Baric wrote: Just a quickie (I searched and cannot find): On opening a text file with the dialog, and displaying the contents in a field: is there a way to retrieve just the filename? (so I can put it in it's own field) tia :) Cheers, Heather ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: File Name in Field?
Heather, Le 6 août 08 à 12:15, H Baric a écrit : On opening a text file with the dialog, and displaying the contents in a field: is there a way to retrieve just the filename? (so I can put it in it's own field) local tFilePath, tFileName answer file Choose a file: if it empty then put it into tFilePath put FilePathToShortFileName(tFilePath) into tFileName etc. function FilePathToShortFileName pPath set the itemDelimiter to slash return item -1 of pPath end FilePathToShortFileName Best regards from Paris, Eric Chatonet. Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/ Email: [EMAIL PROTECTED]/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: File Name in Field?
Aha! Okay, so I was kind of on the right track, in my straightforward non-functiony beginners script - that didn't work :( I tried to return item 2, 3... (oops) of all kinds of things, including it and it in variable, without realising you have to set the delimiter thing first. And -1 of course! Duh. Okay, great got it. Thanks once again Eric. Just send me a bill for your wonderful services :D Cheers, Heather - Original Message - From: Eric Chatonet [EMAIL PROTECTED] To: How to use Revolution use-revolution@lists.runrev.com Sent: Wednesday, August 06, 2008 8:39 PM Subject: Re: File Name in Field? Heather, Le 6 août 08 à 12:15, H Baric a écrit : On opening a text file with the dialog, and displaying the contents in a field: is there a way to retrieve just the filename? (so I can put it in it's own field) local tFilePath, tFileName answer file Choose a file: if it empty then put it into tFilePath put FilePathToShortFileName(tFilePath) into tFileName etc. function FilePathToShortFileName pPath set the itemDelimiter to slash return item -1 of pPath end FilePathToShortFileName Best regards from Paris, Eric Chatonet. Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/ Email: [EMAIL PROTECTED]/ ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution