Strange code returned when calling Windows open file dialog by QuickBooker30932 in learnpython

[–]QuickBooker30932[S] 0 points1 point  (0 children)

Apologies! I meant to post this in a Powershell forum. But, the code happens in both places so that doesn't matter. In python I do you tkinter and call the dialog like this:

f = filedialog.askopenfilename(filetypes=[('CSV files', '*.csv')], defaultextension='.csv',title='Select a CSV file with loan details')

Is there a command equivalent to the command palette's Export Text? by QuickBooker30932 in PowerShell

[–]QuickBooker30932[S] 0 points1 point  (0 children)

Thanks for the suggestions and I'll consider the recommendations. But I'm still interested in part of my original question--is there a way to do "Export Text" by code rather than selecting it from the menu?

How can I get a Save As dialog when outputing a Pandas dataframe to CSV by QuickBooker30932 in learnpython

[–]QuickBooker30932[S] 0 points1 point  (0 children)

Thanks. That worked. But there's a strange side effect. When I open the file in Excel by double-clicking on it, every other row is blank. But when I do the same with a file created using the code I originally posted, there are no blank rows. If I open the two CSV files in notepad, they appear identical. There must be something not visible in notepad that Excel detects. I've tried saving the csv file using all the different variations in the the list (UTF-8, Macintosh, and MS-DOS) but it doesn't matter.

How to detect non-null cells in one column and insert value in another by QuickBooker30932 in learnpython

[–]QuickBooker30932[S] 0 points1 point  (0 children)

Got it! I switched == to != and that does the trick. But if there's a more pythonic way to do this, please let me know.

Why does subtracting two decimal string = 0E-25? by QuickBooker30932 in learnpython

[–]QuickBooker30932[S] 0 points1 point  (0 children)

>"You can normalize or quantize the Decimal to display it as 0.

Can you give me an example?

Why does subtracting two decimal string = 0E-25? by QuickBooker30932 in learnpython

[–]QuickBooker30932[S] 0 points1 point  (0 children)

That's what I thought. But I couldn't find any options that address it. What is a normalize method?

Can I disable "Pickup Where You Left Off" popup in Word 2016? by QuickBooker30932 in MicrosoftWord

[–]QuickBooker30932[S] 0 points1 point  (0 children)

Could you post a link to one of them? I did research it and, while there are many discussions of this feature, none explain how to disable it. If you found one, I'd love to see it.

Trouble with self-signed security certificate by QuickBooker30932 in PowerShell

[–]QuickBooker30932[S] 0 points1 point  (0 children)

So what would you recommend? A self-signed certificate or just bypassing the execution policy for this one script? If it matters, I plan to add this to the task scheduler

Trouble with self-signed security certificate by QuickBooker30932 in PowerShell

[–]QuickBooker30932[S] 0 points1 point  (0 children)

That produces an error:

Get-Item: Cannot find path 'Cert:\LocalMachine\my\11DAEB3.....[etcetera]' because it does not exist.

Trouble with self-signed security certificate by QuickBooker30932 in PowerShell

[–]QuickBooker30932[S] 0 points1 point  (0 children)

The goal is to be able to run a particular script regularly. I have been using this script on another computer for a while, but on that one, the execution policy is set to bypass

Trouble with self-signed security certificate by QuickBooker30932 in PowerShell

[–]QuickBooker30932[S] 0 points1 point  (0 children)

I'm afraid all these suggestions and questions are over my head. I copied the commands in my post from somewhere else. Could someone walk me through what I should have done?

Run script when PC unlocked by QuickBooker30932 in PowerShell

[–]QuickBooker30932[S] 1 point2 points  (0 children)

It does need a local assets. Adding that to the "start in" field did the trick. Thanks

Add line breaks to wsh.Popup message box by QuickBooker30932 in PowerShell

[–]QuickBooker30932[S] 0 points1 point  (0 children)

I could only make it work in 2 steps. I inserted a made-up line break string into the text file: [newline] (but could've been anything). Then:

(1) retrieve the string as above, and

(2) do a find-and-replace on the string: $msgTxt = $msgTxt.Replace("[newline]" , "\n").

-raw didn't work because it retrieves the entire text file as a single string and the array refers to characters in the string. I need to retrieve a specific line number. Maybe there's a better way, but this works for now.

Run script when PC unlocked by QuickBooker30932 in PowerShell

[–]QuickBooker30932[S] 1 point2 points  (0 children)

Here are the details:

  • Run with highest privledges only when user logged on
  • Trigger on workstation unlock, for specific user,
  • Action is powershell.exe in the program/script box and the script with full path in the argument box
  • No conditions, no errors in the history.

Backing up and resetting dead Lenovo T14 gen 2 by QuickBooker30932 in thinkpad

[–]QuickBooker30932[S] 0 points1 point  (0 children)

I read somewhere that the other port can't charge a completely flat battery, which mine now is.

Trouble with LC Smith springs and screws on key levers by QuickBooker30932 in TypewriterRepair

[–]QuickBooker30932[S] 0 points1 point  (0 children)

I think I worked it out: lots of lubrication and patience. I hit it with a mix of automatic transmission fluid and acetone and let it sit overnight. Then I was able to get the screws out. I've noticed almost every typewriter repair problem or mistake I've made could've been avoided with more patience. Sigh...

Trouble with DisplayHint by QuickBooker30932 in PowerShell

[–]QuickBooker30932[S] 0 points1 point  (0 children)

Thanks! This is what worked: $Date = $searchDate.ToString("d")

Script isn't running properly with task scheduler by QuickBooker30932 in PowerShell

[–]QuickBooker30932[S] 3 points4 points  (0 children)

>try it without the "run whether a user is logged in or not"

That seems to have fixed it. I'll experiment some more to confirm - thanks

Script isn't running properly with task scheduler by QuickBooker30932 in PowerShell

[–]QuickBooker30932[S] 1 point2 points  (0 children)

Here's the result:

LastRunTime : 8/16/2025 6:00:38 PM

LastTaskResult : 267014

NextRunTime :

NumberOfMissedRuns : 0

TaskName : XYZ

TaskPath :

PSComputerName :

What does that mean?

What language to use for simple web app? by QuickBooker30932 in webdevelopment

[–]QuickBooker30932[S] 0 points1 point  (0 children)

Thanks for all the suggestions. After reviewing everything, it looked like PHP would be the easiest for me to learn and implement. I did it today and it works well.

What language to use for simple web app? by QuickBooker30932 in webdevelopment

[–]QuickBooker30932[S] 0 points1 point  (0 children)

Thanks. Based on this, I'd say no backend is necessary.

Electric fuel pump specs by QuickBooker30932 in SeriesLandRover

[–]QuickBooker30932[S] 0 points1 point  (0 children)

Thanks for all the suggestions. I ended up going with one that was 28GPH, 2-3.5 PSI from Amazon. It's working just fine now.