Forum > Complaints >

[PROBLEM] API Not broken, but something is still wrong...

Hectique

Hectique

Posts: 1076

Threads: 155

Joined: Nov, 2019

Reputation: 14

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

  • 0

a former active and known member of the WRD community, but im kinda just a meme now

Posts: 83

Threads: 11

Joined: Nov, 2018

Reputation: 8

Replied

Pretty sure it's FileName instead of "Filename", maybe that's the problem?

  • 0

GitHub: https://github.com/sound-infinity

Discord: SoundInfinity#2135

Hectique

Hectique

Posts: 1076

Threads: 155

Joined: Nov, 2019

Reputation: 14

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

  • 0

a former active and known member of the WRD community, but im kinda just a meme now

Posts: 83

Threads: 11

Joined: Nov, 2018

Reputation: 8

Replied

@Hectique

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]

  • 0

GitHub: https://github.com/sound-infinity

Discord: SoundInfinity#2135

Hectique

Hectique

Posts: 1076

Threads: 155

Joined: Nov, 2019

Reputation: 14

Replied

@25074 This helped. Thanks!

  • 0

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 )