-
11 votes
-
In the AI era, is translation already dead?
18 votes -
Please proofread this AI-generated AutoHotkey script
For my job I need to copy a person's name out of a field and split it into first and last names. I have a AHK script that can do this but my version only works with simple, one-word,...
For my job I need to copy a person's name out of a field and split it into first and last names. I have a AHK script that can do this but my version only works with simple, one-word, non-hyphenated names. I tried prompting Gemini as below.
There is a line of text consisting of one or more words, a comma, then one or more words. write an autohotkey 1.1 script to select everything before the comma, store it to a variable called firstname, then select everything after the comma and store it to a variable called lastname. thanks
(the firstname and lastname variables should be swapped as the last name would come before the comma, that was my error)
Here's the AutoHotkey 1.1 script to achieve what you described:
; This script splits a text line into first and last name based on a comma #NoEnv ; Recommended for performance and compatibility. SendMode Input ; Simulates keystrokes for reliable input. ; Function to split the text Func SplitText(_text, firstName, lastName) { StringSplit, parts, _text, `,` if (parts[1]) { firstName := parts[1] ; Assign first name lastName := SubStr(_text, 1 + StrLen(parts[1])+1) ; Extract last name after comma (including space) } else { firstName := _text ; Handle cases without a comma lastName := "" } } ; Hotkey to trigger the script (replace F2 with your desired key) F2:: Send, ^c ; Copy the selected text to clipboard clipText := ClipboardAll ; Read the clipboard content SplitText(clipText, firstName, lastName) ; Call the function to split the text MsgBox, First Name: %firstName%`nLast Name: %lastName% ; Optional: Clear clipboard to avoid unintended pasting (comment out if not desired) ; Clipboard := Return
Explanation:
#NoEnv and SendMode Input: These lines are included for performance and reliable input simulation.
Func SplitText(_text, firstName, lastName): This function takes the text (_text) as input and assigns the split parts to variables firstName and lastName.
StringSplit, parts, _text, ,:** Splits the text based on the comma (,`) delimiter.
if (parts[1]):** Checks if there's a second part (i.e., text after the comma).
If true, the first part is assigned to firstName and the text after the comma (including the space) is extracted using SubStr and assigned to lastName.
else:** If there's no comma, the entire text is assigned to firstName and lastName is set to an empty string.
F2::: This line defines a hotkey. When F2 is pressed, the following actions occur:
Send, ^c:** Copies the selected text to the clipboard.
clipText := ClipboardAll:** Reads the copied text from the clipboard and stores it in the variable clipText.
SplitText(clipText, firstName, lastName):** Calls the function to split the copied text into first and last names.
MsgBox:** Displays a message box showing the extracted first name and last name.
Optional: Clear Clipboard: The commented line Clipboard := clears the clipboard content after processing. Uncomment this line if you want to avoid accidentally pasting the copied text elsewhere.Edit: To answer questions, and provide info I probably should have from the beginning: I'm a medical transcriptionist using AHK with my job's software (Emdat Inscribe) and a word expander (Instant Text). Inscribe seems to be browser-based but functions as a standalone app. I already have dozens of AHK 1.1 macros; my .ahk file has over 2000 lines, although I'm sure it's terribly written code. This is also why I'm disinclined to switch to AHK 2.0 since I have no desire to rewrite everything unless absolutely necessary. The first part of this macro is a bunch of keypresses to jump to the relevant patient info field, then this part would be used to store the names appropriately. I already have hotkeys to use the variables as needed and most macros are limited with #ifwinactive to Inscribe.
6 votes -
How to start Google
27 votes -
Cracking down on Big Tech works. Brave, Firefox, Vivaldi surge on iOS.
25 votes -
How sixteen companies are dominating the world’s Google search results (2024 Edition)
24 votes -
The FBI’s new tactic: Catching American suspects with push alerts
32 votes -
Google announces major update to combat AI-generated spam in search results
21 votes -
Chile puts brakes on Google data center over water use, environmental concerns
17 votes -
I got paid $0.33 for confirming with Google that I got a haircut where I did and paid with a card
Who got the better end of that deal? It was in Google rewards. They were already involved in that transaction. How much is me matching their phone records really worth?
27 votes -
Google cut a deal with Reddit for AI training data
23 votes -
How Google is killing independent sites like ours
59 votes -
Google’s retiring of Internet archiving tool draws ire of China researchers
18 votes -
Google Bard is now Gemini; Gemini Advanced launched
24 votes -
Google's Gemini 1.5 Pro is a new, more efficient AI model
10 votes -
How bad are search results? Let's compare Google, Bing, Marginalia, Kagi, Mwmbl, and ChatGPT.
47 votes -
Google Pixel phones unusable after January 2024 system update
29 votes -
I got a spam call and the automated voice that requests their reasoning for calling was my voice AI generated
13 votes -
Big Tech won’t let you leave. Here’s a way out.
28 votes -
Google formally endorses right to repair, will lobby to pass repair laws
25 votes -
Google's Say What You See - Come up with a prompt to match an already generated image
12 votes -
The perfect webpage: How the internet reshaped itself around Google’s search algorithms
15 votes -
Custom phone OS - long term opinions?
I am and have been on a bit of a quest to make my computing devices suck less. Over the last few years I have migrated all of my laptops and desktops over to various Linux flavors. My experience...
I am and have been on a bit of a quest to make my computing devices suck less.
Over the last few years I have migrated all of my laptops and desktops over to various Linux flavors. My experience with this process is that each flavor has their own quirks that need to be ironed out, but after getting things running there is little in the way of maintenance. Things kind of just work nowadays.
I have been looking into getting something like (but not necessarily) LineageOS on my phone. As I am looking into this and reading forums on the subject, it seems like a perpetual arms race between application developers and application users. One puts in a way to check for root, then there are root hiders, then there are root hider checkers, then there are root hiders that you build with custom names, etc.
I want my device to not suck.
I don’t want to be going in and fighting with my banking applications every time there is an update. I am totally willing to fight a painful setup once.
Is a custom phone OS something that is essentially only viable to use if you are driven by spite? Am I reading too much into the struggles that are posted in various forums? I am looking for any input for anyone that has used a custom OS short or long term.
26 votes -
Google's VideoPoet: A large language model for zero-shot video generation
16 votes -
Scientists explain why ‘doing your own research’ leads to believing conspiracies
42 votes -
Largest dataset powering AI images removed after discovery of Child Sexual Abuse Materials
27 votes -
Fighting with Fitbit's tech support
I doubt I'll find any new ideas, but maybe someone here has one. I'm running out of places to turn, with no solution. I have been in a fight with Fitbit support for a few weeks now over their push...
I doubt I'll find any new ideas, but maybe someone here has one. I'm running out of places to turn, with no solution.
I have been in a fight with Fitbit support for a few weeks now over their push to migrate everyone to a Google-linked Fitbit account. I'm pretty sure what I've found is a rare edge case of a bug, or rather, an unaccounted for set of conditions when trying to migrate.
A long time ago, 2017 I think, I created a Google-linked Fitbit Account (via oauth, "Login with Google"). I used it briefly and then stopped, and completely forgot about its existence.
In 2022, I got a Pixel Watch and created a new/second Fitbit Account with a different email address, as I did not remember I had a Fitbit account already and I wanted to use a masked email address through my personal domain.
With the push to migrate all Fitbit accounts to Google accounts, I decided to try to do so last month. When I attempted to migrate my second account to a Google account, I got an error that I already had an account registered under my Google account. So I logged in to that old 2017 Google account and initiated its deletion. It told it me would take 30 days to delete it, so I waited 31 days.
31 days later, I tried to migrate my second account to a Google account. When I try to do so, I get an error:
Can't use Fitbit with this Google Account This could be because you're using a Google Workspace account, or because your account is supervised.
My account is neither a child account, nor a Workspace account, it's a standard (adult) account I've had for something like 16 years.
So I tried to see if my old Google account was perhaps not deleted after all. I tried to log in to my old account via oauth (Sign In > Continue with Google), and I get a different error:
Sign in again to continue Since you deleted Fitbit from your Google Account, you’ll need to sign in again as a new user.
I suspect that what happens when I deleted my old/original Google account is that it wasn't actually deleted, but made inactive with some "deleted" flag, but the account hasn't been purged. As a result, I'm unable to migrate my new account to the same email address I used for my old Google account.
Reaching out to Fitbit, they continually put the blame on Google for reporting my account as a workspace/supervised account, and the only solution they'll offer me is "You should create a new Google account". Google has also been unable to help, but that doesn't surprise me, as I don't think it's an issue on their end. Requests to Fitbit to escalate my case to a higher tier of support and/or someone from some type of database team have been stonewalled, and I think that Fitbit support has now just stopped responding to me entirely.
Does anyone have any idea where I could turn?
14 votes -
Google promises unlimited cloud storage; then cancels plan; then tells journalist his life’s work will be deleted without enough time to transfer the data
90 votes -
Pixel 6 owners who use multiple profiles run into problems with Android 14
13 votes -
Google Groups to drop most Usenet support on Feb. 22, keeping only a read-only archive of pre-2/22/2024 posts
17 votes -
YouTube likely lowering resolution of videos if it detects you using Firefox on Asahi Linux
39 votes -
US Federal jury decides Google’s Android app store benefits from anticompetitive barriers
62 votes -
Today's Google doodle is pretty entertaining
Google's Most Searched Playground: find on a huge map the most searched things of the year
11 votes -
Google announces Gemini model, claims it outperforms GPT-4
43 votes -
US senator warns governments are spying on Apple and Google users via push notifications
38 votes -
Smartglasses use ChatGPT to help the blind and visually impaired | 5G Playbook
7 votes -
I edited the Netflix Castlevania show's first two seasons into a single, slight-over-two-hours movie
51 votes -
New Google geothermal electricity project could be a milestone for clean energy
18 votes -
Vampire Survivors Likes: The ultimate bullet heaven wave survival rogue-lite comparison scale!
19 votes -
Apple announces that RCS support is coming to iPhone next year
66 votes -
Google witness accidentally blurts out that Apple gets 36% cut of Safari deal
58 votes -
Australian academics apologise for false AI-generated allegations against big four consultancy firms
10 votes -
In Canada’s battle with Big Tech, smaller publishers and independent outlets struggle to survive
15 votes -
YouTube’s anti-adblock and uBlock Origin
96 votes -
The people who ruined the internet
73 votes -
Google decides to pull up the ladder on the open internet, pushes for unconstitutional regulatory proposals
66 votes -
Trial testimony - Google considered and rejected creating a form of search that doesn't track users history from website to website
14 votes -
Google testimony confirms paying billions to lock in default search engine status
33 votes -
‘Reddit can survive without search’: company reportedly threatens to block Google
71 votes -
YouTube anti-adblock detection is illegal in the EU
77 votes