Forum > Complaints >
[PROBLEM] API Not broken, but something is still wrong...
Posted
I know the API is not broken, with some testing I finally figured out what was causing my problem.
What was causing it??? It was the Open File that had some sort of effect on my editor, (rich text box and fastcoloredtextbox), in which it was affecting my scripts from being executed.
Well, is it fixed? No. It can only be fixed if I remove the open file, and I don't want to do that. Winforms is being a little weird.
I use the classic open file method, whic is this,
[/code]
openFileDialog1.ShowDialog();
string filename = openFileDialog1.Filename;
string readfile = File.ReadAllText(filename);
fastcoloredTextBox1.Text = readfile;
[/code]
I tested this on another exploit, and this somehow affected the execute. Can someone provide me code of the way they use Open File for their Exploits? Mine is stupid
a former active and known member of the WRD community, but im kinda just a meme now
Replied
Pretty sure it's FileName instead of "Filename", maybe that's the problem?
Cancel
Post
GitHub: https://github.com/sound-infinity
Discord: SoundInfinity#2135
Replied
@SoundInfinity I know, you get the idea. I din't Copy/Paste anything from my code, there isn't an auto correct code thing on the forums like there is in Visual Studio smarty
Cancel
Post
a former active and known member of the WRD community, but im kinda just a meme now
Replied
So, I made my own c# program and this worked for me, although it doesn't have filtering or anything like that:
[spoiler]
using System;
using System.Windows.Forms;
using System.IO;
namespace Test2
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
}
void OpenFileClick(object sender, EventArgs e)
{
// This is what you're interested on:
using(FileDialog fileDialog = new OpenFileDialog())
{
fileDialog.ShowDialog();
string Contents = File.ReadAllText(fileDialog.FileName);
}
}
}
}
[/spoiler]
Cancel
Post
GitHub: https://github.com/sound-infinity
Discord: SoundInfinity#2135
Replied
@25074 This helped. Thanks!
Cancel
Post
a former active and known member of the WRD community, but im kinda just a meme now
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post