Mike C Posted March 14, 2014 Share Posted March 14, 2014 I'm using OpenURL to open template files from a custom dialog box. After opening the template, I want to set the view depending on the user, and also write some database values into the file regarding date created, etc. In older versions, this worked. The script seemed to execute the OpenURL command before proceding to the next commands. But not any more. Any commands after the OpenURL seem to execute first, and therefore are executed on the currently open file rather than the new file. Now, the only way I can find to "pause" execution while the file opens is to use an AlrtDialog. Everything else (Wait(), Counter loops, etc.) also hangs the OpenURL from executing. Any other suggestions? Quote Link to comment
JBenghiat Posted March 31, 2014 Share Posted March 31, 2014 Mike, Vectorscript is really designed to work within a file as opposed to an application level. Your old script function was probably a happy accident. Your easiest solution might be to attach scripts to saved views, so that your scripts are divided into two parts -- opening the template and selecting a view corresponding to the user. You might want to wait to put too much troubleshooting effort into the script until you can upgrade to 2014. Using the Python scripting engine, you can access OS and System, and file commands, which may prove more reliable than OpenURL, which is a bit of a kludge. HTH, Josh Quote Link to comment
Mike C Posted April 2, 2014 Author Share Posted April 2, 2014 Thanks, Josh. My original script was divided into two parts, and even that doesn't work. Thanks for the tip regarding Python. Hopefully my company upgrades soon. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.