Generate AHKv2 Code with ChatGPT (app)

Post your working scripts, libraries and tools.
sashaatx
Posts: 342
Joined: 27 May 2021, 08:27
Contact:

Generate AHKv2 Code with ChatGPT (app)

Post by sashaatx » 06 May 2023, 10:43

edit: working commandline app https://github.com/samfisherirl/AutoHot-GPT/releases/tag/v0.1

Happy Saturday,

https://github.com/samfisherirl/AutoHot-GPT

I've been reading on the Forum and tracking various posts about ChatGPT and it's accuracy with autohotkey. I understand that there are many challenges in the synthesis of code but nonetheless I've been knocking around in my head the different ways one could go about solving for this. Lately I've been working with the ahk V2 script converter, and it's extremely well made. We also have this universe of over a decade if not two of autohotkey scripts and forum post that ChatGPT definitely has absorbed, but it just doesn't come out well. So this is what I came up with. I'll be adding credits to the converter creators, a better read me, etc.

Asking for Autohotkey functions and Scripts, running that data through the autohotkey converter, and returning clean, unerred v2 code.

Like any good developer, instead of testing it robustly I just Dove right in. I've got a working model to work relatively stably just for testing.


How this works
I have for my convenience used python as the ChatGPT bot communicator. I know there are a few AHK gpt bots on github, but for the first run through I chose python.

Once the python script grabs data from ChatGPT, ahk is listening and ready to convert in real time to ahkv2.
that code gets displayed in the console, it gets sent to your clipboard to copy or paste, and it gets written to a file right next to the app.

That's all I have for now, I just wanted to get this post out to see if it's worth trudging forward with this app or if my idea is really dumb. I appreciate anyone who took the time to read this Thank you.

Below are some examples.

Building out the github, attached is the zip with the python exe and the raw ahk.


Code: Select all

#Requires Autohotkey v2.0
#SingleInstance Force
#Include chatgpt_ahk_generator\convert\ConvertFuncs.ahk
#Include chatgpt_ahk_generator\convert\_menu_handler_mod.ahk
 exe := "`"" A_ScriptDir "\chatgpt_ahk_generator\AutoHotKey Exe\AutoHotkeyV1.exe`" " 
exe2 := "`"" A_ScriptDir "\chatgpt_ahk_generator\AutoHotKey Exe\AutoHotkeyV2.exe`" "     
autogui := "`"" A_ScriptDir "\chatgpt_ahk_generator\AutoGUI.ahk`""    
logs := A_ScriptDir "\chatgpt_ahk_generator\log.txt"     
app := A_ScriptDir "\chatgpt_ahk_generator\AutoHot-ChatGPT.exe"     

empty := A_ScriptDir "\chatgpt_ahk_generator\empty.txt"    
temps := A_ScriptDir "\chatgpt_ahk_generator\temp.txt"    
ret := A_ScriptDir "\chatgpt_ahk_generator\return.txt"     
sets := A_ScriptDir "\chatgpt_ahk_generator\AutoGUI.ini"
runscript := A_ScriptDir "\chatgpt_ahk_generator\runscript.ahk"

if FileExist(logs) {
    FileDelete(logs)
}
if FileExist(temps) {
    FileDelete(temps)
}
if FileExist(ret) {
    FileDelete(ret)
}

Run(app, A_ScriptDir "\chatgpt_ahk_generator", , &PID)     ; run the concatenated command, which launches AutoGUI
Sleep(1000)    ; wait for 1 second
findProcess(PID)

While ProcessExist(PID)    ; while the AutoGUI process exists
    ; wait for %logs% to exist, that means AutoGui is trying to generate code.
    ; this loop will convert to v2 and notify AutoGUI via %retstat%
    ; wait for %logs% to exist, that means AutoGui is trying to generate code.
    ; this loop will convert to v2 and notify AutoGUI via %retstat%
{
    if FileExist(logs)    ; check if the log file exists
    {
        inscript := tryRead(logs)    ; read the contents of the log file into a variable
        if (inscript != "")    ; if the variable is not empty       
            {
                FileMove(logs, "temps.txt", 1)    ; move the log file to the temporary file
                    Converter(inscript)
                    sleep(10)
                } }
    else {
        Sleep(10)
        continue
    }
}
ExitApp


Converter(inscript) {
    global ret
    script := Convert(inscript)    ; convert the script from AHK v1 to AHK v2
    ; final_code := add_menuhandler(script)    ; add menu handlers to the script
    outfile := FileOpen(temps, "w", "utf-8")    ; open the file for writing
    outfile.Write(script)    ; write the final code to the file
    outfile.Close()    ; close the file
    FileCopy(temps, ret, 1)    ; append the return status to the return status file
    FileCopy(temps, A_ScriptDir "\code.ahk", 1)    ; append the return status to the return status file
    A_Clipboard := ""
    A_Clipboard := script
}

setDesignMode(ini) {
    replaceSettings := ""
    x := 0
    Loop Parse, ini, "`n", "`r" {
        if (x == 0) && InStr(A_LoopField, "DesignMode") {
            replaceSettings .= "DesignMode=1`n"
        }
        else {
            replaceSettings .= A_LoopField "`n"
        }
    }
    f := FileOpen(sets, "w", "utf-8")
    f.Write(replaceSettings)
    f.Close()
}

findProcess(PID) {
    Loop 10 {     ; loop up to 10 times
        if ProcessExist(PID) {     ; check if the AutoGUI process exists
            break     ; if it does, break out of the loop
        }
        else {
            Sleep(10)     ; if it doesn't, wait for 1 second and check again
        }
    }
}
;try {out := FileRead(path)}
tryRead(path) {
    try {
        out := FileRead(path)
        return out
    }
    catch {
        Sleep(10)
        return ""
    }
}

python

Code: Select all

from revChatGPT.V3 import Chatbot
from pathlib import Path
cwd = Path(__file__).parent
from shutil import copy, move
from time import sleep

class Chat:
    def __init__(self):
        self.key = self.keyGet()
        self.input = ""
        self.output = ""
        self.code = ""
        self.ahk_mod = "Develope an autohotkey script. "
        self.kill_loop = False
        self.temp = cwd / "ahk.txt"
        self.v1 = cwd / "v1.ahk"
        self.v2 = cwd / "v2.ahk"
        self.myscript = cwd / "MyScriptv2.ahk"

    def keyGet(self):
        try:
            with open(cwd / "key.txt", "r") as f:
                key = str(f.read())
                return str(key.split("=")[1].strip())
        except Exception as e:
            print("\n\nNo key found. Make sure there's a text file named key.txt\napi_key=xxxxxxxxxx\n\n" + str(e))
            return False

    def ask_user(self):
        if self.key:
            self.input = input("\nType exit to quit. Tell me about your AHKv2 script need: ")
            self.input = self.input.lower().strip()
            if self.input == "exit" or self.input == "quit":
                self.kill_loop = True
            else:
                self.input = self.ahk_mod + self.input

    def process_chat(self):
        how_much_code = self.output.count("```")
        
        if how_much_code == 0:
            print(self.output)
        elif how_much_code > 0:
            x = how_much_code / 2
            print(self.output)
            ar = self.output.split("```")
            for i in range(1, len(ar)-1, 2):
                self.code = self.code + ar[i]
            with open(self.temp, 'w') as f:
                f.write(self.code)
            copy(self.temp, self.v1)
            while True:
                if self.v2.is_file():
                    copy(self.v2, self.temp)
                    with open(self.temp, "r") as f:
                        self.code = f.read()
                    self.code = "\n\nHere is your AHKv2 code. This is also locate in your clipboard and next to this app:\n\n" + self.code.strip() + "\n"
                    print(self.code)
                    move(self.v2, self.myscript)
                    break
                else:
                    sleep(0.1)


def loop_ask():
    chat = Chat()
    key = chat.key
    chatbot = Chatbot(api_key=key, engine="gpt-3.5-turbo")
    while True:
        chat.ask_user()
        if chat.kill_loop:
            break
        if chat.input:
            chat.output = chatbot.ask(chat.input)
        chat.process_chat()
        

if __name__ == "__main__":
    loop_ask()


Last edited by sashaatx on 09 May 2023, 23:15, edited 3 times in total.
https://github.com/samfisherirl
? /Easy-Auto-GUI-for-AHK-v2 ? /Useful-AHK-v2-Libraries-and-Classes : /Pulovers-Macro-Creator-for-AHKv2 :
sashaatx
Posts: 342
Joined: 27 May 2021, 08:27
Contact:

Re: Generate AHKv2 Code with ChatGPT (app)

Post by sashaatx » 09 May 2023, 23:00

https://github.com/samfisherirl
? /Easy-Auto-GUI-for-AHK-v2 ? /Useful-AHK-v2-Libraries-and-Classes : /Pulovers-Macro-Creator-for-AHKv2 :
User avatar
boiler
Posts: 17215
Joined: 21 Dec 2014, 02:44

Re: Generate AHKv2 Code with ChatGPT (app)

Post by boiler » 10 May 2023, 06:37

Is the premise that even though ChatGPT typically produces poor AHK v1 code, often with bad logic and invented syntax, that somehow running that through a v2 converter will produce working v2 code that meets the user’s intent? I guess I’m missing the big leap. No matter how good the v2 converters are, I am sure they expect that their input is working v1 code.
sashaatx
Posts: 342
Joined: 27 May 2021, 08:27
Contact:

Re: Generate AHKv2 Code with ChatGPT (app)

Post by sashaatx » 10 May 2023, 09:50

boiler wrote:
10 May 2023, 06:37
Is the premise that even though ChatGPT typically produces poor AHK v1 code, often with bad logic and invented syntax, that somehow running that through a v2 converter will produce working v2 code that meets the user’s intent? I guess I’m missing the big leap. No matter how good the v2 converters are, I am sure they expect that their input is working v1 code.
the converter uses regex to identify keywords and removes most excess.

the converter goes as far as to restructure and almost act as a debugger, believe it or not. I can enter bad v1 and get good v2. is it perfect, no. is it better than standard gpt output, yes.
https://github.com/samfisherirl
? /Easy-Auto-GUI-for-AHK-v2 ? /Useful-AHK-v2-Libraries-and-Classes : /Pulovers-Macro-Creator-for-AHKv2 :
sashaatx
Posts: 342
Joined: 27 May 2021, 08:27
Contact:

Re: Generate AHKv2 Code with ChatGPT (app)

Post by sashaatx » 10 May 2023, 11:30

boiler wrote:
10 May 2023, 06:37
Is the premise that even though ChatGPT typically produces poor AHK v1 code, often with bad logic and invented syntax, that somehow running that through a v2 converter will produce working v2 code that meets the user’s intent? I guess I’m missing the big leap. No matter how good the v2 converters are, I am sure they expect that their input is working v1 code.
sample input sample output. I want to account for some of the errors within the converter as I have with AutoGUI, it took some time but was fairly predictable.

this one needs GUI names

Code: Select all

Type exit to quit. Tell me about your AHKv2 script need:  I need a gui with a __New class instantiation. in this gui, it itemizes in a listview all files in a directory. it provides an input field to search for a file name, the user presses the search button and receives a list of matching files

In this script, the `MyGui` class is used to create the GUI and handle the search functionality. The `__New` constructor method creates the GUI with a list view, an input field, and a search button. The `PopulateListView` method populates the list view with files in a directory. The `SearchButton` method is called when the user clicks the search button and filters the list view to show only matching files.

To use this script, save it as a .ahk file and run it using AutoHotkey. The script will create a GUI that displays all the files in the current directory. To search for a specific file, type the file name into the input field and click the search button. The list view will be filtered to show only matching files. If the search field is empty, the list view will show all files.


Here is your AHKv2 code. This is also locate in your clipboard and next to this app:


Class MyGui
{
    ; Constructor method
    __New()
    {
        ; Create the GUI
         := Gui()
        .= GuiCreate("+Resize", "File Search")()
        Gui.Add("ListView", "w600 h400", "File Name|Size|Modified Date")
        Gui.Add("Edit", "w300 vSearch", "")
        Gui.Add("Button", "w100 gSearchButton", "Search")
        Gui.Show()

        ; Populate the list view with files in the current directory
        this.PopulateListView(A_WorkingDir)
    }

    ; Method to populate the list view with files
    PopulateListView(DirPath)
    {
        LV := Gui.ListView
        LV.Delete()

        Loop Files, DirPath "\*"
        {
            FileGetTime(ModifiedDate, %A_LoopFilePath%)
            FileGetSize(Size, %A_LoopFilePath%)
            FileName := FileGetName(A_LoopFilePath)
            LV.Add(FileName, Size, ModifiedDate)
        }
    }

    ; Method to handle the search button click
    SearchButton()
    {
        LV := Gui.ListView
        Search := Gui.Search.Value

        if (Search = "")
        {
            ; If the search field is empty, show all files
            this.PopulateListView(A_WorkingDir)
        }
        else
        {
            ; Otherwise, filter the list view to show only matching files
            LV.Delete()

            Loop Files, A_WorkingDir "\*"
            {
                FileGetTime(ModifiedDate, %A_LoopFilePath%)
                FileGetSize(Size, %A_LoopFilePath%)
                FileName := FileGetName(A_LoopFilePath)

                ; Check if the file name contains the search term
                if (InStr(FileName, Search))
                {
                    LV.Add(FileName, Size, ModifiedDate)
                }
            }
        }
    }
}

; Create an instance of the MyGui class
MyGui := new MyGui()

; Register the search button callback
Gui.SearchButton:
MyGui.SearchButton()
return
I dont remember if strreplace works for an entire file like this, I always append to a string the file, this appears to find the value in csv, then strreplace the entire csv ?

Code: Select all

Type exit to quit. Tell me about your AHKv2 script need: I need a script that reads a csv file, identifies the cell wher
e a search term is found, and updates the value in that cell
Certainly, here's an AutoHotkey script that reads a CSV file, searches for a specific value, and updates the value in that cell:
 
In this script, you'll need to set the path to your CSV file, the search term, and the new value that you want to replace the search term with. The script reads the CSV file using the `FileRead` command and loops through each row and column to search for the search term. Once the search term is found, the script replaces it with the new value using the `StringReplace` command and writes the updated CSV data back to the file using the `FileAppend` command.

Note that this script assumes that the CSV file has a header row with column names. If your CSV file doesn't have a header row, you'll need to modify the script to handle that. Let me know if you have any questions or need further assistance.


Here is your AHKv2 code. This is also locate in your clipboard and next to this app:


; Set the path to the CSV file
csv_file := "C:\path\to\your\file.csv"

; Set the search term and new value
search_term := "search_value"
new_value := "new_value"

; Read the CSV file and search for the search term
csv_data := Fileread(csv_file)
Loop Parse, csv_data, "`n", "`r"
{
    Loop Parse, A_LoopField, ","
    {
        ; Check if the current field matches the search term
        if (A_LoopField = search_term)
        {
            ; Get the row and column of the cell
            row := A_Index
            col := A_LoopFieldIndex

            ; Replace the value in the cell with the new value
            ; StrReplace() is not case sensitive
            ; check for StringCaseSense in v1 source script
            ; and change the CaseSense param in StrReplace() if necessary
            csv_data := StrReplace(csv_data, search_term, new_value)

            ; Write the updated CSV data back to the file
            FileDelete(csv_file)
            FileAppend(csv_data, csv_file)

            ; Exit the loops since the search term was found
            break 2
        }
    }
}


7zip utility to extract (can confirm the command line commands are accurate at least)

Code: Select all

Type exit to quit. Tell me about your AHKv2 script need: I need to build an installer. taking a 7zip file, using the 7za
.exe file I want to build a command line run to extract the 7zip file to a specific folder, then look through the folder
 for an "exe", when thats found, run the exe
Sure, here's an AutoHotkey script that extracts a 7zip file to a specific folder and runs an executable file if it exists in that folder:


; Set the path to the 7zip file and the extraction folder
zip_file := "C:\path\to\your\file.7z"
extract_folder := "C:\path\to\your\folder"

; Set the path to the 7za.exe file
zip_exe := "C:\path\to\7za.exe"

; Extract the 7zip file to the extraction folder
RunWait(zip_exe " x `"" zip_file "`" -o`"" extract_folder "`"")

; Look for an executable file in the extraction folder
exe_file := ""
Loop Files, extract_folder "\*"
{
    if (FileExist(A_LoopFilePath) && FileGetExtension(A_LoopFilePath) = "exe")
    {
        exe_file := A_LoopFilePath
        break
    }
}

; Run the executable file if it exists
if (exe_file != "")
{
    Run(exe_file)
}
https://github.com/samfisherirl
? /Easy-Auto-GUI-for-AHK-v2 ? /Useful-AHK-v2-Libraries-and-Classes : /Pulovers-Macro-Creator-for-AHKv2 :
User avatar
boiler
Posts: 17215
Joined: 21 Dec 2014, 02:44

Re: Generate AHKv2 Code with ChatGPT (app)

Post by boiler » 10 May 2023, 12:59

I wasn't looking to help troubleshoot it. I was just giving feedback on this:
sashaatx wrote: I just wanted to get this post out to see if it's worth trudging forward with this app or if my idea is really dumb.
I don't see how it can be successful, but it's up to you whether you want to continue with it, of course.
sashaatx
Posts: 342
Joined: 27 May 2021, 08:27
Contact:

Re: Generate AHKv2 Code with ChatGPT (app)

Post by sashaatx » 10 May 2023, 13:14

boiler wrote:
10 May 2023, 12:59
I wasn't looking to help troubleshoot it. I was just giving feedback on this:
sashaatx wrote: I just wanted to get this post out to see if it's worth trudging forward with this app or if my idea is really dumb.
I don't see how it can be successful, but it's up to you whether you want to continue with it, of course.
Sorry I mistook your reply for interest.
https://github.com/samfisherirl
? /Easy-Auto-GUI-for-AHK-v2 ? /Useful-AHK-v2-Libraries-and-Classes : /Pulovers-Macro-Creator-for-AHKv2 :
OmTatSat
Posts: 7
Joined: 19 Aug 2021, 11:24

Re: Generate AHKv2 Code with ChatGPT (app)

Post by OmTatSat » 16 Jul 2023, 02:53

Cool idea, thanks for sharing!
Is it possible to make AHKv2 not installed but located in the program folder?
User avatar
boiler
Posts: 17215
Joined: 21 Dec 2014, 02:44

Re: Generate AHKv2 Code with ChatGPT (app)

Post by boiler » 16 Jul 2023, 04:47

OmTatSat wrote: Is it possible to make AHKv2 not installed but located in the program folder?
This is not the right place to ask this question. Create a new topic in Ask for Help (v2).
User avatar
sumon
Posts: 38
Joined: 01 Oct 2013, 14:05
Location: Stockholm, Sweden

Re: Generate AHKv2 Code with ChatGPT (app)

Post by sumon » 07 Sep 2023, 13:16

sashaatx wrote:
06 May 2023, 10:43
That's all I have for now, I just wanted to get this post out to see if it's worth trudging forward with this app or if my idea is really dumb. I appreciate anyone who took the time to read this Thank you.
Haven't tested it out, so can't comment on the functionality.

But considering that generative AI use cases are quickly becoming more and more powerful, and will likely be more and more integrated into people's workflows (including software developers), I'd bet that the idea is the opposite of really dumb.

Then the question is how well one can make it work. But that's another question :)
sashaatx
Posts: 342
Joined: 27 May 2021, 08:27
Contact:

Re: Generate AHKv2 Code with ChatGPT (app)

Post by sashaatx » 09 Sep 2023, 11:30

sumon wrote:
07 Sep 2023, 13:16
sashaatx wrote:
06 May 2023, 10:43
That's all I have for now, I just wanted to get this post out to see if it's worth trudging forward with this app or if my idea is really dumb. I appreciate anyone who took the time to read this Thank you.
Haven't tested it out, so can't comment on the functionality.

But considering that generative AI use cases are quickly becoming more and more powerful, and will likely be more and more integrated into people's workflows (including software developers), I'd bet that the idea is the opposite of really dumb.

Then the question is how well one can make it work. But that's another question :)
using https://github.com/imartinez/privateGPT
I was able to train and ask questions to a LLM based on the documentation and a few forum posts with questions and script functions.

I got busy and never wrapped back around to finish.
https://github.com/samfisherirl
? /Easy-Auto-GUI-for-AHK-v2 ? /Useful-AHK-v2-Libraries-and-Classes : /Pulovers-Macro-Creator-for-AHKv2 :
User avatar
andymbody
Posts: 942
Joined: 02 Jul 2017, 23:47

Re: Generate AHKv2 Code with ChatGPT (app)

Post by andymbody » 09 Sep 2023, 14:03

I'm not sure I understand the advantage of keeping ChatGPT in the conversion loop. My understanding is that AI is designed to "fabricate" output based on tons of data that it has been exposed to. The key word here is "fabricate". This output that is "fabricated" is not necessarily accurate/correct because it is more of a "guess" based on data. Fact checking may not (is usually not) part of the equation prior to AI spitting out an answer. But AI outputs this information with "confidence" as "fact", and we fall for it. I believe the term for this is called "hallucination"?

This is why pictures that AI fabricates, appear "close" to real-world objects/scenes much of the time, but many of the details are simply a "guess", rather than 100% accurate. And this type of tool is great in some creative circumstances. But computer code (like math) needs to be much more accurate to be worth anything at all. Otherwise a knowledgeable human must get involved to correct the mess that AI created.

There may come a time when AI will be directed/required to "fact-check" or test it's "assumptions" against solid/real-world data as a final step. But for now AI simply eats tons of data, then on demand, "vomits it's meal" in a regurgitated state, places it on a fancy plate, and rings the dinner bell for the rest of us to consume. And the ironic part is, AI's creator is happy to inhale (and even become reliant on) without knowing what we are eating. Would you wait in a long line at a restaurant for this type of meal? Many are doing that very thing with chatGPT. Very dangerous, for all of us.

With all this in mind, I say leave AI out of the equation.

Andy
sashaatx
Posts: 342
Joined: 27 May 2021, 08:27
Contact:

Re: Generate AHKv2 Code with ChatGPT (app)

Post by sashaatx » 09 Sep 2023, 15:44

@andymbody

That's a fair perspective but you're saying keep innovation out of the conversation loop.

You can do that, its valid, but throwing water on innovation is a bit silly, all due respect.

Moreover, your analogies don't map on. If I wanted to explain the way AI as a broad idea works, using words like "fabricate" to map onto all AI, and then translating that to "hallucinate" isn't terrible.

When giving an argument in a discussion for or against something, we shouldn't be using analogies.

EG.
But for now AI simply eats tons of data, then on demand, "vomits it's meal" in a regurgitated state, places it on a fancy plate, and rings the dinner bell for the rest of us to consume.
Guess what else does that?

Streaming video, healthcare information data, television, phone calls. These are broad platitudes that are interesting but don't provide concrete critiques.
https://github.com/samfisherirl
? /Easy-Auto-GUI-for-AHK-v2 ? /Useful-AHK-v2-Libraries-and-Classes : /Pulovers-Macro-Creator-for-AHKv2 :
User avatar
andymbody
Posts: 942
Joined: 02 Jul 2017, 23:47

Re: Generate AHKv2 Code with ChatGPT (app)

Post by andymbody » 09 Sep 2023, 16:23

sashaatx wrote:
09 Sep 2023, 15:44
@andymbody

That's a fair perspective but you're saying keep innovation out of the conversation loop.

You can do that, its valid, but throwing water on innovation is a bit silly, all due respect.

Moreover, your analogies don't map on. If I wanted to explain the way AI as a broad idea works, using words like "fabricate" to map onto all AI, and then translating that to "hallucinate" isn't terrible.

When giving an argument in a discussion for or against something, we shouldn't be using analogies.

EG.
But for now AI simply eats tons of data, then on demand, "vomits it's meal" in a regurgitated state, places it on a fancy plate, and rings the dinner bell for the rest of us to consume.
Guess what else does that?

Streaming video, healthcare information data, television, phone calls. These are broad platitudes that are interesting but don't provide concrete critiques.
Hallucination regarding AI is not something I made up. It's a real and documented side effect that was not intended. I feel the analogy is valid, and also feel that the potential dangers and negative impact to society is understated at this time. Yes, there are benefits, but just like any tool, it should be restricted to the arena that it can benefit, rather than those that it can corrupt. I feel that code writing is one of those fields that can be corrupted by AI (at least currently) and the two should not be married right now. Advances in the future may (probably will) change that of course. And to get there we must navigate through the current obstacles, I agree. And Yes, we do rely on other systems, people and data that we cannot see or interact with first hand, and your point is taken. But I also feel that relying on AI (instead of human intelligence - which it may come to one day) will give us a false sense of security that will end badly in the long run, unless it is addressed soon. At the moment, chatGPT is a novelty toy. But it has already become an "authority" and source of "truth" in the minds of many who are embracing it blindly. I feel this trend will grow and become the norm in a very short time. This technology (AI, not necessarily chatGPT specifically) may one day (soon) be regarded as the main source for truth, yet this truth is plagued with falsehoods that many users are unable to detect (or unwilling to). Once these falsehoods become our main source of truth, then we are in big trouble. The falsehoods will then grow exponentially, with possibly no way to recover.
I just wanted to get this post out to see if it's worth trudging forward with this app or if my idea is...
As far as I can tell, one of the reasons for this thread was to solicit opinions about the validity of your project. I apologize if my opinion of AI offends you, but soliciting opinions in an open forum may (will) result in some points of view being different from your own. It comes with the territory i suppose.

With all that said, I do wish you the best with the progress of your project tho! :thumbup:

Andy
Last edited by andymbody on 09 Sep 2023, 16:43, edited 1 time in total.
sashaatx
Posts: 342
Joined: 27 May 2021, 08:27
Contact:

Re: Generate AHKv2 Code with ChatGPT (app)

Post by sashaatx » 09 Sep 2023, 16:37

andymbody wrote:
09 Sep 2023, 16:23
sashaatx wrote:
09 Sep 2023, 15:44
@andymbody

That's a fair perspective but you're saying keep innovation out of the conversation loop.

You can do that, its valid, but throwing water on innovation is a bit silly, all due respect.

Moreover, your analogies don't map on. If I wanted to explain the way AI as a broad idea works, using words like "fabricate" to map onto all AI, and then translating that to "hallucinate" isn't terrible.

When giving an argument in a discussion for or against something, we shouldn't be using analogies.

EG.
But for now AI simply eats tons of data, then on demand, "vomits it's meal" in a regurgitated state, places it on a fancy plate, and rings the dinner bell for the rest of us to consume.
Guess what else does that?

Streaming video, healthcare information data, television, phone calls. These are broad platitudes that are interesting but don't provide concrete critiques.
Hallucination regarding AI is not something I made up. It's a real and documented side effect that was not intended. I feel the analogy is valid, and also feel that the potential dangers and negative impact to society is understated at this time. Yes, there are benefits, but just like any tool, it should be restricted to the arena that it can benefit, rather than those that it can corrupt. And Yes, we do rely on other systems and people and data that we cannot see first hand, and your point is taken. But I feel that relying on AI (instead of human intelligence - which it may come to one day) will give us a false sense of security that will end badly in the long run, unless it is addressed soon. At the moment, chatGPT is a novelty toy. But it has already become an "authority" and source of "truth" in the minds of many who are embracing it blindly. I feel this trend will grow and become the norm in a very short time. This technology (AI, not necessarily chatGPT specifically) may one day (soon) be regarded as the main source for truth, yet this truth is plagued with falsehoods that many users are unable to detect (or unwilling to). Once these falsehoods become our main source of truth, then we are in big trouble. The falsehoods will then grow exponentially, with possibly no way to recover.

As far as I can tell, this thread was created to solicit opinions about the validity of your project. I apologize if my opinion of AI offends you, but soliciting opinions in an open forum may (will) result in some points of view being different from to your own. It comes with the territory i suppose.

With all that said, I do wish you the best with the progress of you project tho! :thumbup:

Andy
@andymbody

The challenge is, I don't think you believe that.
it should be restricted to the arena that it can benefit, rather than those that it can corrupt
The digital phone disrupted circuit board operators, the car disrupted horse drawn carriage creators,

the computer and internet was seen as taking away jobs from everyone. As you type here, was the computer bad?

But see, you can't imagine the good of AI. Because it literally doesn't exist yet.
But you can imagine the bad, because you can roughly estimate things that can be disrupted.
chatGPT is a novelty toy
I say this with respect and love. this is just factually inaccurate.

1. I work in marketing, I have a close colleague I helped develop a model to A/B test email marketing strategies based on outcomes and strategies. He had increased revenue by 10x and is blasting off into the stratosphere.

2. Insurance companies all use ML models for projecting outcomes to reduce cost now

its in everything everywhere, you just don't see it.
source of "truth" in the minds of many who are embracing it blindly
Except, you have a fear of AI. But you haven't once mentioned:

LLMs, Models, sources, this is what I mean by we are past the point of analogies. I saw terminator. I don't disagree there are apt analogies you provided that map on to AI.

If you speak to someone developing AI using analogies, you aren't mapping onto the real. You are literally talking about the nebulous.

AI is scary because we can think of the problems, but you would never imagine the computer turned into Phones in our Pockets with entire computers. But before that, you could think of all the jobs that a person pocket computer would take away.

AI is not a problem and I understand the public is largely afraid.
https://github.com/samfisherirl
? /Easy-Auto-GUI-for-AHK-v2 ? /Useful-AHK-v2-Libraries-and-Classes : /Pulovers-Macro-Creator-for-AHKv2 :
User avatar
andymbody
Posts: 942
Joined: 02 Jul 2017, 23:47

Re: Generate AHKv2 Code with ChatGPT (app)

Post by andymbody » 09 Sep 2023, 17:31

sashaatx wrote:
09 Sep 2023, 16:37
My fears don't stem from the affect of AI on the job market, not al all. Technology/innovation has always affected professions. And I don't fear a terminator scenario, or that AI will become hostile and "kill us all". And I don't even fear a mad man using AI to take over the world.

My concern is something much more subtle, and nearly undetectable, until it's too late. That is... that human intelligence will slowly but surely be replaced by a tool that may not always be there in the future. And that we will become so reliant on the tool that we will be unable to think for ourselves. It's already happening more and more with each new generation. Education is being replaced by a device we hold in our hand. And if that device spits out falsehoods, then those falsehoods literally become reality as we know it. We only know what we are exposed to. And if we can't look further than arms length, how do we build the skills to survive when that tool is no longer available. I won't get into the details of this scenario, but it's a very real possibility that the tool that we will come to rely on for our daily survival needs may one day turn it's back on these insignificant humans that hold no value, and then simply ignore their needs. Does this seem far-fetched? I predict that it will become a reality sooner than we think. Those who are unable (or unwilling) to think for themselves are at the mercy of those who can. AI is doing much of the thinking these days, and we are submitting to it's dominance more and more with each passing year. The dominoes are already falling...

I'm going to sign off of this thread now, because it has gone off topic, and should be refocused on your project instead.

Good luck, with respect!
Andy
gregster
Posts: 9087
Joined: 30 Sep 2013, 06:48

Re: Generate AHKv2 Code with ChatGPT (app)

Post by gregster » 09 Sep 2023, 17:37

The problem is that AI is not good in all things. I researched academically in this area already 25 years ago - back then you already had a lot of business applications (especially neural networks and so-called expert systems) - quality was varying a lot. Still, in some areas you had good results. It's still the same today but the areas of application are much larger.
AI's v2 skills are still awful, although PowerShell results, for example, might be good. What I have seen for AHK v1 was still mediocre - at best. At the current state, we have decided to not allow help requests about AI-generated code, although you can have good results sometimes. We are aware that this might change in the future. But afaics, we are still not there yet - especially if people don't even care to look one second into the docs after they got nonsense code. If people are not able (or willing) to judge the quality of AI results, they should'nt use it.
sashaatx
Posts: 342
Joined: 27 May 2021, 08:27
Contact:

Re: Generate AHKv2 Code with ChatGPT (app)

Post by sashaatx » 09 Sep 2023, 17:44

gregster wrote:
09 Sep 2023, 17:37
The problem is that AI is not good in all things.
we could say the same thing for computers, or anything else. It is not the contention that there are no bad things, or even that the good doesnt outweigh the bad. It's the societal destruction that some people approach it with which is really silly. Those people rarely have ever used those system, interacted, and couldnt tell the difference between LLM and neural networks.

If someone wants to say there are potential bads, totally. I agree. But many critiques from people who haven't used any of it except a chatgpt prompt feels doomer and really isnt constructive in my opinion but I could be totally wrong.
https://github.com/samfisherirl
? /Easy-Auto-GUI-for-AHK-v2 ? /Useful-AHK-v2-Libraries-and-Classes : /Pulovers-Macro-Creator-for-AHKv2 :
gregster
Posts: 9087
Joined: 30 Sep 2013, 06:48

Re: Generate AHKv2 Code with ChatGPT (app)

Post by gregster » 09 Sep 2023, 17:48

In this forum, we focus on AI's AHK skills and the consequences . Everything else belongs in the off topic area, or somewhere else.
sashaatx
Posts: 342
Joined: 27 May 2021, 08:27
Contact:

Re: Generate AHKv2 Code with ChatGPT (app)

Post by sashaatx » 09 Sep 2023, 17:53

andymbody wrote:
09 Sep 2023, 17:31
sashaatx wrote:
09 Sep 2023, 16:37
edit: i just saw mods notes, dont know how to delete.
https://github.com/samfisherirl
? /Easy-Auto-GUI-for-AHK-v2 ? /Useful-AHK-v2-Libraries-and-Classes : /Pulovers-Macro-Creator-for-AHKv2 :
Post Reply

Return to “Scripts and Functions (v2)”