Re: sudo on OSX
Simon, You could try using AppleScript and scripting the SYstem Events application. You can get the current startup items by doing this: tell application System Events get login items end tell I have tried creating a new login item with make, but can't seem to get it to work... perhaps someone else can? Ken Ray Sons of Thunder Software Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ - Original Message - From: Simon Lord [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, October 06, 2002 1:13 AM Subject: sudo on OSX Hi all, I have a minor problem with the StartupItems under OSX. It's owned by root. So the application I'm writing can't set a script there to launch on startup. This is likely a security measure so my option is to send a command to sudo and write/copy the script to the StartupItems directory. Problem is how does one do that? I'll need to ask the user to enter the password (root only, users cannot modify) but then how do I actually run it in a command line *with* the password? IE,. I don't want to run the script and have the Terminal say ok, what's the password, I want to include the password in the command to copy the script to the StartupItems folder. Any ideas? Sincerely, Simon ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: sudo on OSX
Simon Lord a écrit : Hi all, I have a minor problem with the StartupItems under OSX. It's owned by root. So the application I'm writing can't set a script there to launch on startup. This is likely a security measure so my option is to send a command to sudo and write/copy the script to the StartupItems directory. Problem is how does one do that? I'll need to ask the user to enter the password (root only, users cannot modify) but then how do I actually run it in a command line *with* the password? IE,. I don't want to run the script and have the Terminal say ok, what's the password, I want to include the password in the command to copy the script to the StartupItems folder. Any ideas? Sincerely, Simon ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard Hi Simon, The script below is what i use from within metacard to send a sql request (in fact, the test.sql stored procedure) to oracle 9i as the oracle home owner and the scott (user)/ tiger (password). This works with posix shells (linux for me) and is far sure ok under MacOS X 1.5 and above. What you need is to adapt the first part of this shell script example - from within metacard or not - to your own needs (su - user -c...). Don't forget that it's always better to avoid the use of the root user in standards productions contexts, each time it's possible. on mouseup global LepathRacine put select * from docsrefs return / return exit into url (LepathRacine test.sql) ## the sqlplus stored procedure answer line 13 to -1 of shell (su - oracle -c quote sqlplus [EMAIL PROTECTED] @ LepathRacine test quote return oracle) ## the sql request end mouseup -- Best Regards, Pierre Sahores WEB VPN applications databases servers Inspection académique de Seine-Saint-Denis Qualifier produire l'avantage compétitif ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Sound
Title: Sound Could someone help me with sound related properties (MacOS 9.1): I want to record some voice to a file and then play it. This is what I have so far: record sound file x stop recording start player 1 but the playback sounds very funny. I know I may have to set some recording/playback properties but I know nothing about sound in general. Also, can I record to a variable instead of file? I wish the archive had a search engine... Regards, Andu Novac There is an article about this at the sons of thunder website: http://www.sonsothunder.com/index2.htm Which describes almost exactly the sort of problems you are having and a potential solution. This is quoted below: I've wasted a lot of time in the past trying to get QuickTime sound recording working. So before I try again with the latest version of MetaCard, has anyone had any success with it? Seems to work fine here now in 2.4.3. It's a major hack internally, though, because of bugs in QT recording (we have to always record CD quality to a QT movie and then use a conversion function to output the type of file requested). I still get irritating squeeks on my mac and grabled garbage on my windows. Be sure you're recording to a format that play audioClip understands, which mostly rules out all of the compressed formats QT can produce. If you must play those, use play videoClip file instead. That uses QT, which although much slower and more memory intensive can play many more formats than the default play command which uses low-level sound routines in Win32 and MacOS which don't support compression. Posted 9/2/2002 by Scott Raney to the MetaCard List Michael
Need a good open process sample
My original post doesn't seem to have made it to the list. So here it is again. I can never get this command straight. Anyone have a straight forward example of metacard using open process to launch a process via the shell. I'm going nuts running put shell() and having mc wait around until the process is completed. This would help a lot. Thanks. Sincerely, Simon Sincerely, Simon ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Need a good open process sample
I can never get this command straight. Anyone have a straight forward example of metacard using open process to launch a process via the shell. I'm going nuts running put shell() and having mc wait around until the process is completed. This would help a lot. Thanks. Sincerely, Simon ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Sound
--On Monday, October 07, 2002 11:19:27 +1300 Michael Crawford [EMAIL PROTECTED] wrote: There is an article about this at the sons of thunder website: http://www.sonsothunder.com/index2.htm Which describes almost exactly the sort of problems you are having and a potential solution. snip Thanks. Michael Regards, Andu Novac ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Need a good open process sample
--On Sunday, October 06, 2002 03:01:52 -0400 Simon Lord [EMAIL PROTECTED] wrote: I can never get this command straight. Anyone have a straight forward example of metacard using open process to launch a process via the shell. I'm going nuts running put shell() and having mc wait around until the process is completed. This would help a lot. Thanks. On Linux: open process netscape -- pops up the browser. open process netscape http://www.metacard.com; --with url open process netscape -mail -- pops up messenger Regards, Andu Novac ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Need a good open process sample
Hmm, has it always been that easy? I remember having real problems with this a few years ago on the SGI. It was a real pain to get it to do anything. And these samples are much more straightforward than I remember. But, that said. Thanks Andu. On Sunday, October 6, 2002, at 11:40 PM, andu wrote: --On Sunday, October 06, 2002 03:01:52 -0400 Simon Lord [EMAIL PROTECTED] wrote: I can never get this command straight. Anyone have a straight forward example of metacard using open process to launch a process via the shell. I'm going nuts running put shell() and having mc wait around until the process is completed. This would help a lot. Thanks. On Linux: open process netscape -- pops up the browser. open process netscape http://www.metacard.com; --with url open process netscape -mail -- pops up messenger Regards, Andu Novac ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard Sincerely, Simon ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
Re: Sound
Actually, you can go right to the tip at: http://www.sonsothunder.com/devres/metacard/metacard.htm?aud002 Enjoy! Ken Ray Sons of Thunder Software Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ - Original Message - From: Michael Crawford [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, October 06, 2002 5:19 PM Subject: Sound Could someone help me with sound related properties (MacOS 9.1): I want to record some voice to a file and then play it. This is what I have so far: record sound file x stop recording start player 1 but the playback sounds very funny. I know I may have to set some recording/playback properties but I know nothing about sound in general. Also, can I record to a variable instead of file? I wish the archive had a search engine... Regards, Andu Novac There is an article about this at the sons of thunder website: http://www.sonsothunder.com/index2.htm Which describes almost exactly the sort of problems you are having and a potential solution. This is quoted below: I've wasted a lot of time in the past trying to get QuickTime sound recording working. So before I try again with the latest version of MetaCard, has anyone had any success with it? Seems to work fine here now in 2.4.3. It's a major hack internally, though, because of bugs in QT recording (we have to always record CD quality to a QT movie and then use a conversion function to output the type of file requested). I still get irritating squeeks on my mac and grabled garbage on my windows. Be sure you're recording to a format that play audioClip understands, which mostly rules out all of the compressed formats QT can produce. If you must play those, use play videoClip file instead. That uses QT, which although much slower and more memory intensive can play many more formats than the default play command which uses low-level sound routines in Win32 and MacOS which don't support compression. Posted 9/2/2002 by Scott Raney to the MetaCard List Michael ___ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard