1
General Discussion / Re: Sending Hal's response to python script?
« on: November 06, 2024, 03:10:40 pm »
Thanks cyberjedi, i'll play around with that and see what happens.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
vb
Copy code
' VB6 Code to send a message to Python by writing to a file
Private Sub btnSend_Click()
Dim message As String
Dim filePath As String
' Get the message from the text box
message = txtMessage.Text
' Define the file path where the message will be saved
filePath = "C:\Temp\message.txt"
' Open the file for output and write the message
Open filePath For Output As #1
Print #1, message
Close #1
MsgBox "Message sent to Python!", vbInformation
End Sub
This VB6 code writes the content of txtMessage to C:\Temp\message.txt. Ensure the C:\Temp directory exists on your computer.