Skip to content

AutoJs6 后台运行时无法获取脚本真实目录 #545

@VLYOOO

Description

@VLYOOO

·Autols6 最新版
• Android 16
·Rhino 模式

AutoJs6 在“打开方式运行”或后台运行时:

engines.myEngine().source

返回的是:

/data/user/0/org.autojs.autojs6/cache/tmp-scripts/

而不是真实脚本路径。

导致:

  • 无法获取脚本所在目录
  • 相对路径失效
  • 同目录读写文件失败
  • 很多脚本后台无法正常运行

希望官方:

  • 后台运行时保留真实脚本路径
  • 或提供获取原始路径的 API

例如:

engines.myEngine().realPath

目前只有 AutoJs6 内部运行才能正确获取路径,“打开方式运行”会变成临时缓存脚本。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions