# Website script - stupid but important question how to easily run script without manually selecting and GO in Scriptor window

**URL:** https://discourse.notenik.app/t/website-script-stupid-but-important-question-how-to-easily-run-script-without-manually-selecting-and-go-in-scriptor-window/250
**Category:** Uncategorized
**Tags:** closed
**Created:** [July 18, 2023, 8:32am UTC](https://discourse.notenik.app/t/website-script-stupid-but-important-question-how-to-easily-run-script-without-manually-selecting-and-go-in-scriptor-window/250 "2023-07-18T08:32:46Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![michalrada](https://discourse.notenik.app/letter_avatar_proxy/v4/letter/m/7c8e57/32.png) [@michalrada](https://discourse.notenik.app/u/michalrada)
#### Post date: [July 18, 2023, 8:32am UTC](https://discourse.notenik.app/t/website-script-stupid-but-important-question-how-to-easily-run-script-without-manually-selecting-and-go-in-scriptor-window/250/1 "2023-07-18T08:32:46Z")

</div>

Title is self-explained, but…

My actual process is, if I am in website collection and want to regenerate site, I must select Play script in Transfer menu, then manually selecting script file (little bug, this dialog don’t remember last directory, its annoying) and select file and then click Go button on scripture dialog.

Hope it can be done easiest way, because these steps I must do several times on day and its little frustrating. Some ideas to one-step do this?

---

<div class="post-metadata">

### Author: ![ThePrinter](https://discourse.notenik.app/user_avatar/discourse.notenik.app/theprinter/32/579_2.png) [@ThePrinter](https://discourse.notenik.app/u/ThePrinter)
#### Post date: [July 18, 2023, 3:31pm UTC](https://discourse.notenik.app/t/website-script-stupid-but-important-question-how-to-easily-run-script-without-manually-selecting-and-go-in-scriptor-window/250/2 "2023-07-18T15:31:09Z")

</div>

I think a useful tactic to save time when running a script may be to check out the [Mirror Your Notes](https://notenik.app/knowledge-base/EPUB/html/mirror-your-notes.html) section in the Knowledge Base.

It looks like if you make the subdirectories `./mirror`, `./mirror/templates` and `./mirror/scripts` in your Collection directory, you can generate your web pages by selecting `Transform -> Mirror All Notes` from the menu.

The only cost may be that you would likely have to rearrange the directory that you’re working with in order to properly mirror the collection and adjust the templates and scripts that you’ve already written to reflect these changes.

I hope that this is helpful.

---

<div class="post-metadata">

### Author: ![hbowie](https://discourse.notenik.app/user_avatar/discourse.notenik.app/hbowie/32/6_2.png) [@hbowie](https://discourse.notenik.app/u/hbowie)
#### Post date: [July 18, 2023, 9:40pm UTC](https://discourse.notenik.app/t/website-script-stupid-but-important-question-how-to-easily-run-script-without-manually-selecting-and-go-in-scriptor-window/250/3 "2023-07-18T21:40:40Z")

</div>

Thanks for your feedback, Michal!

The next release should fix the problem with remembering the last directory from which a script was run.

That being said, I almost always start work on a project by opening its enclosing folder as a Parent Realm. I then get a list of Collection(s) and scripts within that folder.

I can then simply double-click on a script file name in order to open it within the Scripter window.

I then click on Go in order to run the script.

Once I have the parent realm window open, I just leave it open, so that I can just double-click again on the script file name to rerun the script.

Also, if you leave the Scripter window open, then you can generally rerun a script just by hitting the Go button again.

Also, my Essential Collection is a Project Launcher collection in which each Note points to an enclosing folder for a project, so that I can just double-click on a project to open it as a Parent Realm.

Hope this helps!

---

<div class="post-metadata">

### Author: ![michalrada](https://discourse.notenik.app/letter_avatar_proxy/v4/letter/m/7c8e57/32.png) [@michalrada](https://discourse.notenik.app/u/michalrada)
#### Post date: [July 19, 2023, 7:50am UTC](https://discourse.notenik.app/t/website-script-stupid-but-important-question-how-to-easily-run-script-without-manually-selecting-and-go-in-scriptor-window/250/4 "2023-07-19T07:50:17Z")

</div>

Hi, many thanks, but, sadly, not.

Scripting for mirroring does not same work as scripting generaly. For example, Site index, site tags-cloud etc, does not work with mirroring, so its need to run classic script made to generate website. I am using script in website template, no edits in script bud many changes in templates.

Thanks

---

<div class="post-metadata">

### Author: ![michalrada](https://discourse.notenik.app/letter_avatar_proxy/v4/letter/m/7c8e57/32.png) [@michalrada](https://discourse.notenik.app/u/michalrada)
#### Post date: [July 19, 2023, 7:52am UTC](https://discourse.notenik.app/t/website-script-stupid-but-important-question-how-to-easily-run-script-without-manually-selecting-and-go-in-scriptor-window/250/5 "2023-07-19T07:52:04Z")

</div>

Okay, i know these tricks, but… hmmm… Is it possible to add Play last script to menu Transfer as quick and easy solution? May be helpfull for others who are running their scripts often too.

---

<div class="post-metadata">

### Author: ![ThePrinter](https://discourse.notenik.app/user_avatar/discourse.notenik.app/theprinter/32/579_2.png) [@ThePrinter](https://discourse.notenik.app/u/ThePrinter)
#### Post date: [July 19, 2023, 5:16pm UTC](https://discourse.notenik.app/t/website-script-stupid-but-important-question-how-to-easily-run-script-without-manually-selecting-and-go-in-scriptor-window/250/6 "2023-07-19T17:16:02Z")

</div>

> [@michalrada](#):
>
> Scripting for mirroring does not same work as scripting generaly. For example, Site index, site tags-cloud etc, does not work with mirroring, so its need to run classic script made to generate website.

Try changing the modifier that declares the type of data source that you’re using in your script.

For example if you have a line like

`input	open	notenik-defined /Users/michalrada/Documents/mynotenikcollection`

Try changing it to

`input	open	notenik-general /Users/michalrada/Documents/mynotenikcollection`

And see if that works.

[Input Module Parameters](https://notenik.app/knowledge-base/EPUB/html/input-module-parameters.html)

ps.

I understand that it’s possible that you’re using a screen reader to browse the web. If the preformatted text in my posts are an inconvenience to you please let me know.

---

<div class="post-metadata">

### Author: ![michalrada](https://discourse.notenik.app/letter_avatar_proxy/v4/letter/m/7c8e57/32.png) [@michalrada](https://discourse.notenik.app/u/michalrada)
#### Post date: [July 20, 2023, 7:43pm UTC](https://discourse.notenik.app/t/website-script-stupid-but-important-question-how-to-easily-run-script-without-manually-selecting-and-go-in-scriptor-window/250/7 "2023-07-20T19:43:30Z")

</div>

I am not using any script for mirroring, I am using only defined template.

In website generated by script it works great, but not in mirroring.

---

<div class="post-metadata">

### Author: ![hbowie](https://discourse.notenik.app/user_avatar/discourse.notenik.app/hbowie/32/6_2.png) [@hbowie](https://discourse.notenik.app/u/hbowie)
#### Post date: [July 20, 2023, 8:25pm UTC](https://discourse.notenik.app/t/website-script-stupid-but-important-question-how-to-easily-run-script-without-manually-selecting-and-go-in-scriptor-window/250/8 "2023-07-20T20:25:43Z")

</div>

Yes, I think this is probably a good idea. Thanks for the suggestion! See the [12.4.7 beta](https://discourse.notenik.app/t/beta-version-12-4-7-available-for-testing-on-july-20th-2023/257) to try out the proposed implementation and let me know how it works for you.

I assumed that you wanted something that would rerun the last script immediately, without waiting for you to click any further buttons. I used the term “rerun” rather than “play” to reduce expectations that the command would wait for further authorization before proceeding.

---

<div class="post-metadata">

### Author: ![michalrada](https://discourse.notenik.app/letter_avatar_proxy/v4/letter/m/7c8e57/32.png) [@michalrada](https://discourse.notenik.app/u/michalrada)
#### Post date: [July 21, 2023, 8:07am UTC](https://discourse.notenik.app/t/website-script-stupid-but-important-question-how-to-easily-run-script-without-manually-selecting-and-go-in-scriptor-window/250/9 "2023-07-21T08:07:17Z")

</div>

Thanks, it works fine, but script not remembered between sessions. Why not to store last script pat in collection configuration info file? It may retain it to next run. Small idea.

---

<div class="post-metadata">

### Author: ![hbowie](https://discourse.notenik.app/user_avatar/discourse.notenik.app/hbowie/32/6_2.png) [@hbowie](https://discourse.notenik.app/u/hbowie)
#### Post date: [July 21, 2023, 2:31pm UTC](https://discourse.notenik.app/t/website-script-stupid-but-important-question-how-to-easily-run-script-without-manually-selecting-and-go-in-scriptor-window/250/10 "2023-07-21T14:31:54Z")

</div>

Well, it was sort of a trade-off.

I get that, when you’re working on a site, you often want to rerun a script to see the results of your efforts, and so I wanted to minimize the friction in making that happen: so no additional prompts or buttons, just run the thing.

But then, if you’re just launching Notenik, will you really remember accurately what the last script was that you had run – maybe the day before? If you’re only working on one site, and only have one script, then probably not an issue. But I also had to consider the use case of having multiple sites and/or scripts. And in that case, I thought it might be kind of dangerous to give the user a way to run the last script played, without having them verify that the one about to run is actually the one they intend to run.

Hope this makes sense, and is not too annoying!
