Categories > Coding > C# >
How to make saveable web browser in C#?
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)
I play minecraft and sometimes roblox with cheats
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);
Cancel
Post
Im netral, not evil, not too kind either.
Replied
@OrbitRBX the code still didn't work :/ maybe it's because the settings are not set up properly? https://prnt.sc/26fp9o2
Cancel
Post
I play minecraft and sometimes roblox with cheats
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.
Cancel
Post
Im netral, not evil, not too kind either.
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
Cancel
Post
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
Cancel
Post
I play minecraft and sometimes roblox with cheats
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
Cancel
Post
I play minecraft and sometimes roblox with cheats
Replied
@OwlGuru File.WriteAllText() should get your job done at creating file. so yeah File.Create its unnecessary.
Cancel
Post
Im netral, not evil, not too kind either.
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post