Hi

finally BBEdit is 64 bit application I was able to test scripting with java 
script

and I found few problems

the most important problem that I can’t get value of any of BBEdit environment 
variable:


ObjC.import('stdlib')
ObjC.import('Foundation')

function run(argv) {
         var app = Application.currentApplication()
         app.includeStandardAdditions = true
         
         
         var docPath = ObjC.unwrap(
              
$.NSProcessInfo.processInfo.environment.objectForKey('BB_DOC_PATH')
         )
         var dialogText = "BB_DOC_PATH " + (docPath)
         app.displayDialog(dialogText)


        try {
           var str = $.getenv('BB_DOC_NAME');
        } catch (err) {
         var dialogText = "BB_DOC_NAME  Exception " + (err.message)
         app.displayDialog(dialogText)
        }

}


first return undefined object
second throw exception:

        "BB_DOC_NAME  Exception exception raised by object: *** +[NSString 
stringWithUTF8String:]: NULL cString")


        var sa = app.systemAttribute();
returns only following values

 
TMPDIR,__CF_USER_TEXT_ENCODING,HOME,SHELL,Apple_PubSub_Socket_Render,SSH_AUTH_SOCK,PATH,LOGNAME,DISPLAY,XPC_SERVICE_NAME,USER,XPC_FLAGS


for every value from the list both methods return meaningful values, that mean 
all bbedit’s variables aren’t exposed


also output of console.log: console.log(‘hello’) is nowhere to be seen

also I can’t find any traces of output of


ObjC.import('stdio')
$.printf('%s %s %s', 'JavaScript', 'for', 'Automation’)

thanks in advance


dm








-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to