Skip to content

Change the way an applescript is generated #4

@ninest

Description

@ninest

Currently, an applescript is generated as a string. Nothing too complex to it. The problem is that it's easy to miss out a space here or there

self.applescript = f"display dialog {quotify(text)} "
# Notice the space at the end

It may be better to do something like

self.applescript = ["display dialog", quotify(text)]

...

# Adding title
self.applescript.extend(["with title", quotify(title)])

Then using a loop, create the applescript and appropriately put spaces

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