Challenge for a Rev/Unix Mac expert
rgould8 at aol.com
rgould8 at aol.com
Tue Jan 20 23:58:19 EST 2004
I mailed a posting a few days ago about a problem I was having with Revolution when launching a unix command-line application with the shell() command. The problem I'm having is that the first time this particular unix call is invoked, it requires the Mac OS X authentification popup to display, which causes Revolution to hang for some reason.
I've come to realize that really the only way to get help with this is to show you want I'm talking about, and that's going to involve me creating a little web-page with the download of the source code and the unix call.
http://librarytools.com/helpneeded.htm
The .rev app is only 5 lines of code, and 1 button. Very simple - - - and very simple to reproduce the problem.
The unix command is called "PPPSetup". It basically dials the Mac modem and logs in to the dialup server using whatever phone # and username and password is provided. If you run this from the terminal, it runs perfectly every time. If you run the rev app, it will hang itself the first time you authenticate. Then, hit FORCE-QUIT, then run it again, and it will be fine from then on out.
The only solutions I can possibly think of are:
1) Have someone write a Carbon app on the Mac which just does the PPPSetup call with the parameters I've supplied, which then authenticates with the popup, and then sublaunches my main Rev app. If someone knows how to do this, or is willing to try this as an experiment, please let me know.
2) Perhaps there's a way to write a standalone Applescript application that will do a shell to this PPPSetup command, and then sublaunch my main REV application. However, I suspect that Applescript may have the same hanging problem.
3) Perhaps I could give someone the source-code to the PPPSetup unix call and see if there's some way to make it recover from the authentification popup. I don't know C, so I can't troubleshoot this myself.
4) If someone can find a working Applescript that will dial a modem with a username/password to a specific telephone #, that would be a great solution. However, I have yet to see such a working script. (lots of examples of just dialing, but no examples of dialing with username/password - - - you have to have applescript create a configuration first, and the folks on the AS listserve I'm on don't seem to think it's possible. It is in the Applescript dictionary for Internet connect, but I haven't found a technique or script that actually works)
I already tried the SUDO command on this PPPSetup app, but since it's really an app and not just a command-line call, SUDO doesn't seem to like that approach.
Any solutions to this problem are GREATLY appreciated. My present solution is to have Mindvision Installer VISE run PPPSetup and then sublaunch my REV app. This works, but it's sloppy. I'd like to do it all in Rev if at all possible.
- Rob
More information about the use-livecode
mailing list