dimanche 21 février 2016

How to use the standard output by Flash Air?

I want to make a command line tool by Flash Air, but there is not any api of AS3 to output content to standard output.

Then, I try to use ANE to solve my problem(By making a windows ane and use C's printf function to output content), but it doesn't work.

Is there any methods to use the standard output by Flash air, or to make a command line tool by Flash Air?

The code of dll written by c++ is:

FREObject add(FREContext ctx, void* functionData, uint32_t argc, FREObject argv[])
{
    int32_t x,y;
    FREGetObjectAsInt32(argv[0], &x);
    FREGetObjectAsInt32(argv[1], &y);


    int32_t result = x + y;
    FREObject resObj;
    FRENewObjectFromInt32(result, &resObj);

    //I want to use the "printf" to print content to the console
    printf("print by dll: the result is %d\n", result);

    return resObj;
}

Aucun commentaire:

Enregistrer un commentaire