Categories > Coding > C# >

How to make saveable web browser in C#?

OwlGuru

Gaming LV

Posts: 25

Threads: 15

Joined: Sep, 2021

Reputation: 0

Posted

Hello, I am making an roblox exploit and I need help with saving the text in webBrowser1. I currently have this code but it doesn't work https://prnt.sc/26foils and heres the other screenshot that loads the text https://prnt.sc/26fojj4 . (This code doesn't seem to load/save the text in the webBrowser)

  • 0

I play minecraft and sometimes roblox with cheats

Posts: 197

Threads: 10

Joined: Feb, 2021

Reputation: 9

Replied

i dont find anything wrong idk prob because im blind. prob check the events if invoked or not.

anyways heres some "simplified" poop code

var text = Executor.Document.InvokeScript("GetText", new string[1]);
Settings.Default.web1 = text.ToString();
Settings.Default.Save();
Environment.Exit(0);

  • 1

Im netral, not evil, not too kind either.

OwlGuru

Gaming LV

Posts: 25

Threads: 15

Joined: Sep, 2021

Reputation: 0

Replied

@OrbitRBX the code still didn't work :/ maybe it's because the settings are not set up properly? https://prnt.sc/26fp9o2

  • 0

I play minecraft and sometimes roblox with cheats

Posts: 197

Threads: 10

Joined: Feb, 2021

Reputation: 9

Replied

@OwlGuru try deleting that value and create new one. or change the scope to another one idk i never used built in settings system before.

  • 0

Im netral, not evil, not too kind either.

z_Kenneth

roachcock#3492

vip

Posts: 154

Threads: 14

Joined: Oct, 2021

Reputation: 5

Replied

basically i would just make a text file, the name  containing the tab name (hopefully u got tabs or otherwise u could just name it smth else) and the text would just be whatever is inside ur webbrowser

 

var d = File.Create(tabPage1.SelectedTab)

d.Close(); (i only do this to yknow not get an exception when writing a file)

 

then File.WriteAllText(tabControl1.SelectedTab, webBrowser1.Document.InvokeScript("GetText", new string[1]).ToString();

 

and then on form1_load just do the set text script on webbrowser, correct me if i'm wrong, i feel like it's easier to do it that way

  • 1

OwlGuru

Gaming LV

Posts: 25

Threads: 15

Joined: Sep, 2021

Reputation: 0

Replied

@z_Kenneth hello, no I do not have tabs because they are messy and I tried them a few times, and I don't like them :[ thanks fo the suggestion tho

  • 0

I play minecraft and sometimes roblox with cheats

z_Kenneth

roachcock#3492

vip

Posts: 154

Threads: 14

Joined: Oct, 2021

Reputation: 5

Replied

@OwlGuru just make the text file name whatever you want then it will work fine 

  • 0

OwlGuru

Gaming LV

Posts: 25

Threads: 15

Joined: Sep, 2021

Reputation: 0

Replied

@z_Kenneth it kinda works, it saves the script but doesn't load upon entering heres the code for the button that closes and saved https://prnt.sc/26ftab0 (tis works), but the loading doesn't work :/ (ignore the settings part its for topmost settings thing) https://prnt.sc/26ftatw

 

EDIT: 

I got it working, thanks to you the save thing helped out but the load thing I coded myself heres what I needed to do lol: https://prnt.sc/26ftlcz

  • 0

I play minecraft and sometimes roblox with cheats

Posts: 197

Threads: 10

Joined: Feb, 2021

Reputation: 9

Replied

@OwlGuru File.WriteAllText() should get your job done at creating file. so yeah File.Create its unnecessary.

  • 0

Im netral, not evil, not too kind either.

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )