RE: Mail Merge Google Sheet - Default subject line & Time trigger - google-sheets

Thanks in advance for your assistance here. I really appreciate it!!
I have built a script using the template here: https://developers.google.com/workspace/solutions/mail-merge
...And it's awesome. Working perfectly and solving a big problem for me!!
I have 2 problems I need to fix, and I need your help, please!!
Problem 1: Can I use a column (or cell reference) as a default "subjectLine" rather than it be user input each time the script is run?
Problem 2: Once Problem 1 (above) is solved, I'd like to trigger the script to automatically run every 15 minutes, continuously.
Any tips/scripts/pointers would be awesome. I am quite new to coding so have tried to dig up how to replace the user input piece of code with a default value for the subject line, but I can't figure it out. And only once this is done, can I then start to try and get code working for the second problem - so I'm stuck on both counts.
Thanks again!! Kind regards, Tom

Related

Playwright: how to wait until there is no animation on the page?

I'm trying to figure out how to check whether the page has fully loaded in Playwright. await page.waitForLoadState('networkidle'); doesn't always work for me on Javascript-heavy sites. I've resorted to taking a screenshot base64, waiting 100 ms, taking a new screenshot, and comparing whether those are the same. However this doesn't seem ideal, is there any way to ask Playwright when the last animation frame was redrawn?
There are several options that may help you.
1. Solution 1:
First, you can maybe determine which element is loading last, and then go with
page.waitForSelector('yourselector')
or even wait for multiple selectors to appear
page.waitForSelector('yourselector1','yourselector2')
2. Solution 2
page.waitForLoadState('domcontentloaded')
Because
page.waitForLoadState('networkidle')
by default will wait for network event and if 0.5 seconds nothing is network trafficking it will say, I am no longer need to wait. And that is why you maybe have stohastic beh.
If the given solution doesn't work for you, you can try with locator.
page.locator(selector[, options])
It has multiple api like locator.isDisabled or locator.waitFor([options]) or locator.isVisible([options]) or locator.frameLocator(selector) ....... a lot more.
see the below link here:
https://playwright.dev/docs/api/class-locator

Remove first part of a string that haven't fixed length

I ran into some problems with my code and I don't know how to fix it. So my problem:
On a View of my application, there is a filepath displayed like this:
/resume/attachment/12/yaml_error_complete.yml
But I only want the filename as Output, means:
yaml_error_complete.yml
How can i achieve this? I tried with several options like string.slice! etc, but it doesn't work, since the number after "attachment" is increased by 1 for every single upload. At beginning I thought about to simply remove 2 chars, don't matter what they are. But then i ran into another problem that happens when the 100 file is uploaded. In this case i would have to remove 3 chars instead of 2, and i'm again at the beginning of my problem.
May someone of you can help me?
Thanks a lot!
I assume that you need to retrieve the file of a path.
for ex if your file name is "/resume/attachment/12/yaml_error_complete.yml"
Then try this one
"/resume/attachment/12/yaml_error_complete.yml".split('/').last
If I understand your question right, then, maybe it should help you:
a = "/resume/attachment/12/yaml_error_complete.yml"
a.split('/').last
#=> "yaml_error_complete.yml"
In addition to the sulution with split('/') you could do the following
File.basename("/resume/attachment/12/yaml_error_complete.yml")

Trying to fix an auto farming script for a mobile game

I found a 5 month old lua script to automatically farm currency and items in a mobile game called Soda Dungeon, the script was finicky when I found it and wouldn't work properly so I'm trying to fix it with very little lua experience.
Here is the code Ive edited: http://pastebin.com/U9Ymej0z
it runs fine until it tries to start the dungeon and I get this error:
Runtime error: com.appautomatic.ankulua.f:
Can't find dungeon_level_up.png
stack traceback:
[C]: in function 'continueClick'
?: in function <?:291>
(tail call):?
/storage/extSdCard/soda_dungeon/main.lua:
217: in function 'main'
/storage/extSdCard/soda_dungeon/main.lua:
239: in main chunk
Any help is greatly appreciated.
I don't know anything about Ankulua but a quick session with our best buddy google gave me this:
http://ankulua.boards.net/thread/13/advanced-methods
http://ankulua.boards.net/thread/6/objects-methods-introduction-sikuli-compatible
They give those functions:
continueClick(x, y, xRandom, yRandom, times)
continueClick(PSMRL, times [,timeout])
They say continueClick will click on a position given by x,y or PSMRL, which will resolve in a postion as well.
You enter a string that contains an image name.
I assume the message
Can't find dungeon_level_up.png
Is rather an exception text of some find(PS) function inside Ankulua than a problem with finding an image file. Replace that image name with some coordinates and check what is happening.
I would not trust that function call in your script as the author of that script added a comment that he does not know what continueClick returns. So maybe he did not know how to use it as well.
The documentation says:
There is no return value.
Btw, the author of Ankulua offered support via mail. So why don't you ask him? I'm sure he'll be of better help than anyone here.
let me offer you another alternative method, just a few simple click you and drag
It doesn't require root,
background service Installation can be found at the following
hXXp://123autoit.blogspot.tw/2016/08/123autoit-non-root-daemon-service.html
currently only works on ARM
for Android 5.0+
hXXp://play.google.com/store/apps/details?id=com.autoit.nonroot&hl=en
for Android 4.2~4.4
hXXps://play.google.com/store/apps/details?id=com.autoit.nonroot.legacy&hl=en
feel free to send me message to ask for question
here is what it can do
check out the blog, it contains tutorials, and video demo
http://123autoit.blogspot.tw/
Hope everything works out for you,
cheers

Esper Compare With Previous event

I am new with Esper so i am unable to solve a simple problem. All i have to do is to get the difference of current close of bar with the previous close of bar. Whats the smartest way to approach this problem in esper?
Result= CurrentBar.Close - PreviousBar.Close.
EDIT:
I am using following piece of code will this work?
select
prev(0,close) - prev(1,close) as return,
security
from
Bar.win:length(2);
The "prev()" special function.

How do I link to a LABEL in org-mode?

In org-mode, I have defined a figure+caption like this:
#+CAPTION: My great figure
#+LABEL: fig:myfigure
[[myfigure.png]]
How do I write "See figure [myfigure]"? I've found the following syntax:
See figure \ref{fig:myfigure}
but this looks ugly in the source file. In particular, you cannot use it for actually jumping to the figure.
You actually don't need '#+NAME', it works fine if you use '#+LABEL', which won't break your short-caption for list of figures.
Orgmode does now offer a 'jumpable', enumerated or link with name of your choice in the exported (latex, html) text if you link with:
see figure [[fig:myfigure]].
or
see figure [[fig:myfigure][figurenameintext]].
I would have added this as a comment, but I don't have the reputation yet.
--
In response to your comment (still can't comment): you do need the '#+NAME' for it to jump within the .org source file; as mentioned in the manual, and i also just confirmed that works. Not sure about the short-captions in the latest version.
With a very recent org-mode, you can use #+name:, see:
http://thread.gmane.org/gmane.emacs.orgmode/62644/focus=62646
#+CAPTION: My great figure
#+LABEL: fig:myfigure
#+name: fig:myfigure
[[test.png]]
See figure [[fig:myfigure][test]].
This works for me to jump from the link , but has no effect when exporting, I'm afraid...

Resources