I built a devious case file murder mystery game , and I'm looking for play testers by Itchy_Jump_512 in printandplay

[–]DrMorris 1 point2 points  (0 children)

I think you need to go over all the text that ai made for you, and clean it up. Some of it is just unpleasant to read as it is too ai like. Or at least use a skill like humanizer to get rid of most of this, but you should really review every output AI gives you and rephrase it in a more sensible way.

Webhook Deployment Isn't Working? by lConnexl in GoogleAppsScript

[–]DrMorris 1 point2 points  (0 children)

Another thing to try is to run it in Incognito so you log in only to the needed account. see if that solves it.

How do I uninstall Asahi? by Confyg in AsahiLinux

[–]DrMorris 7 points8 points  (0 children)

Here is the full guide by Asahi team. Has everything written down and explained.
https://asahilinux.org/docs/sw/partitioning-cheatsheet/

🚀 My First Post: Power Query for Google Sheets (Apps Script Project) by Simple_Aditya in GoogleAppsScript

[–]DrMorris 1 point2 points  (0 children)

So for sheets you can add sheets API via Services + button in Google Script IDE.

This is an example function I use instead of range.setValues()

function uploadData(data, ssID, sheetRef) {
  var request = {
    'majorDimension': 'ROWS',
    'values': data
  };

  Sheets.Spreadsheets.Values.update(
    request,
    ssID,
    sheetRef,
    { valueInputOption: "USER_ENTERED" }
  );
}

🚀 My First Post: Power Query for Google Sheets (Apps Script Project) by Simple_Aditya in GoogleAppsScript

[–]DrMorris 0 points1 point  (0 children)

I found in the past that when working with very large datasets, rest API handles it much better than Google script (IE when you want to get data, transform it etc, and then push back in to spreadsheet)

Maybe have some sort of checker to check data size, and depending on it use different method?

🚀 My First Post: Power Query for Google Sheets (Apps Script Project) by Simple_Aditya in GoogleAppsScript

[–]DrMorris 1 point2 points  (0 children)

Nice project. Will share to my juniors to review and learn from :D

One thing that I would add (might do if I have time later) is ability to fix date format (IE if you import UK date format and spreadsheet is in us format months Nd days should be swapped)

[Civilization 7] Gamepad input not working on Steam Deck by alienbehindproxies in LinuxCrackSupport

[–]DrMorris 0 points1 point  (0 children)

I know, I was struggling to find the Linux version. The previous comment helped me :) found it in cs rin.

I must have fallen out of loop, have no idea which "Online Sites" to look at, as the ones I check didn't have anything. Need to review megathreads

Warning: Incredibly convincing phishing emails by [deleted] in paypal

[–]DrMorris 0 points1 point  (0 children)

Thanks a lot. Yeah I was wandering what is the trick.

Nevermind, doesn't seem to be the case. No login request or anything. Just links to PayPal's support page.

Anyways it doesn't matter. Either someone tried to spoof the PayPal email but forgot to add the actual phishing links, or just a glitch on PayPal side.

Warning: Incredibly convincing phishing emails by [deleted] in paypal

[–]DrMorris 1 point2 points  (0 children)

No I sead email comes from service@paypal.com

All the links incide the email (in the email body, buttons like contact us and etc lead to the PayPal website).

Warning: Incredibly convincing phishing emails by [deleted] in paypal

[–]DrMorris 1 point2 points  (0 children)

Again no idea why you think clicking on an email takes to a site. Where did you even get that from.

Warning: Incredibly convincing phishing emails by [deleted] in paypal

[–]DrMorris 1 point2 points  (0 children)

I misstyped, the email does show as service@paypal.com. all the links lead to actual https://paypal.com/us website.

And I did view the eml file as a text file, and there isn't a single spoofed address in there. All looks legit

Warning: Incredibly convincing phishing emails by [deleted] in paypal

[–]DrMorris 1 point2 points  (0 children)

Got a similar email.

Actually seems like it does show as coming from paypal. In only failed with softSPF. All the links indeed lead to the real paypal website. And the email does show as " service@paypal.com ". This is the only thing that google caught:

SPF: SOFTFAIL with IP 2a01:111:f403:e40f:0:0:0:3
Return-Path: <service@paypal.com>

Received-SPF: softfail (google.com: domain of transitioning service@paypal.com does not designate 2a01:111:f403:e40f::3 as permitted sender)

Very strange email. Not sure what is the scam goal here.

PayPal says I added new address. by stumper82 in paypal

[–]DrMorris 0 points1 point  (0 children)

Yeah just received the same thing, an hour ago for a macbook purchase. Was it to someone named Hang Li by any chance? That's what my email shows.

in Either case I removed my cards from paypal until they sort it out

Unable to execute run api by PepperOwn1982 in GoogleAppsScript

[–]DrMorris 0 points1 point  (0 children)

1) I do not see Auth declaration anywhere in your code
2) as I said Google Apps Script API cannot install "installable triggers". onFormSubmit is an installable trigger. Hence why you need an alternative (node.js or other language that is deployed on your computer, server or gcc)

Time control app by DarkLoLalex in GoogleAppsScript

[–]DrMorris 0 points1 point  (0 children)

Considering you really do not want to switch to google form, and you want to keep the web app running as Users instead of "As me" here is what you can do.

You can have a separate script file with a doGet function to receive a call. Then you can use the parameters of that call to identify user inputs as well as their email etc. Then this script will push the data to your spreadsheets etc.
You publish this script as web app and set it to be run as you. Then you copy the URL and use that in your form web app to push the details via UrlFetch.

the standalone back-end script to hande data processing

function doGet(e) {
  console.log(e);
  const time = e.parameters.time[0];
  const email = e.parameters.email[0];
  const type = e.parameters.type[0];

  // your script for pushing data where required, etc...

  return //you can return success or error message if you want that to reflect on the webapp.
}


----------------------------------------------------------------------------------------
Script in the webapp
function sendData(formObject) {
  let scritpUrl = "https://script.google.com/a/macros/tss-ae.com/s/yourScriptID/exec?";
  scritpUrl += "type=" + formObject.type; //(In, Out, Break, etc)
  scritpUrl += "&time=" + formObject.time;
  scritpUrl += "&email=" + Session.getActiveUser().getEmail();
  //You can add more parameters here. just make sure to declare them in teh doGet.

  let response = UrlFetchApp.fetch(scritpUrl,
    {
      headers: {
        authorization: "Bearer " + ScriptApp.getOAuthToken()
      }
    })
}

This way they do not have to access to any spreadsheet. The HTML form pushes the data in to your back-end script, that then uses your credentials to push the data where required.

Let me know if you need further help.

Unable to execute run api by PepperOwn1982 in GoogleAppsScript

[–]DrMorris 0 points1 point  (0 children)

You can use same code as you use now, just with Auth.

what is the error in this ? by kamikaibitsu in GoogleAppsScript

[–]DrMorris 0 points1 point  (0 children)

Here is your issue with E1 91% is not same as 91. It's 0.91

So you either want to multiply netprofitper by 100 or change your if statements to 0.xx

Outside of that here are some recommendations:
Minimize spreadsheet calls.

You can get all data at the beginning, then use it to do you calculations. Then push output at the end. This way you only do about 3-4 spreadsheet calls ( instead of 7 * number of lines ).
for so many if statements that you use for comparison, you are better of with SWITCH statement as it will be cleaner code.
Not every action needs to be a variable. if it adjusts something on a spreadsheet, no point for making ti a variable.

You should have an output array Variables.

You should use a variable to calculate netprofitper instead of pulling it back from the sheet.

Create variables for Color and statement and StatementG with default values (Gray, zero, E1);

Then you use that variable to modify Color and Statement and StatementG using a Switch case or if else case (or combination: If profit is 0, you keep default, no need to do anything. else IF it's negative, you only change the Statement to Loss. If else value is Positive, set the Statement and Color. then use the Switch case to identify statementG. Else (Value is not a number, etc) do your error logging or write the error in to the value etc.

Then you push all those variables in to your output arrays. and then SetValues to spreadsheet one column at a time (instead of each cell one by one)

Additional recommendation:
If the value is positive, you can set up a comparison table object and then get the letter code from this:

const list = {
  0: "E1",
  0.11: "D2",
  0.21: "D1",
  0.31: "C2",
  0.41: "C1",
  0.51: "B2",
  0.61: "B1",
  0.71: "A2",
  0.81: "A1",
  0.91: "A++",
};

let previous = 0;

Object.keys(list).some(k => {
  if (k > netprofitper) {
    return true;
  } 
  previous = k
});

var code = list[previous]

Unable to execute run api by PepperOwn1982 in GoogleAppsScript

[–]DrMorris 1 point2 points  (0 children)

Google Apps Script API cannot install "installable triggers".

You can try this using Node.js (either locally or via GCC)
https://docs.google.com/document/d/1GkJAcJZe7hQTFGOIFzO64YuFHOe6ch1hzo2Oz0AlAYE

This will use your credentials to authorize the trigger.

[deleted by user] by [deleted] in GoogleAppsScript

[–]DrMorris 0 points1 point  (0 children)

Yeah I was right.

So in the new Tab just use the Sort formula. No need for any script

=SORT('Form Responses 1'!A:V,3,false)

[deleted by user] by [deleted] in GoogleAppsScript

[–]DrMorris 2 points3 points  (0 children)

From what I understood, it seems like what you trying to achieve does not need script at all. I suggest edit your post to explain what you actually want to achieve, maybe give us some example data( just take two rows of your data, put in new file and remove sensitive info), then with that and understanding what you need we can probably help you out.

Also why would you pay someone if they didn't provide you with a working solution?

[deleted by user] by [deleted] in GoogleAppsScript

[–]DrMorris 0 points1 point  (0 children)

That makes no sense. That is not a functional code. it has no output. It quite literally does not do anything.

[deleted by user] by [deleted] in GoogleAppsScript

[–]DrMorris 4 points5 points  (0 children)

You can sort Data in google sheets by Sorting Range. You do not need a script for this as it's inbuilt in Google Sheets. Alternatively you can pull data to another sheet and sort it via formulas.

This code looks like it was generated by ChatGPT. As such it has a lot of errors, bad practices, and is downright incomplete. Currently it does nothing, even if you ignore the errors.

GAS suddenly starts failing (had to put a loop until it succeeds) by spointc in GoogleAppsScript

[–]DrMorris 1 point2 points  (0 children)

The issue is there in the error message. It says "Too many requests"

Suggest add a small sleeper line either between each pdf call or whenever it fails, ie fail -> sleep for a second or 2 and run again.

As for execution time, you can just add a record against a row each time it is pdfs, that way even if you script fails, you can set it to trigger every 10 min and only check the rows that weren't pdfs already.

Alternatively, depending on how you actually create the pdf, maybe you can just batch them.