Fun C# hehe

luke127

The Ghost
Messages
868
Location
Australia
Hey guys, having a problem with C# lel.

Basically my objective is to create a "bot" that automates clientside tasks for the FTB Gamepedia Wiki. So far I've been successful in writing specific commands that execute specific functions, but I have a more grand vision in mind that doesn't just open a hardcoded page or link.

Put simply, I'd like specific keywords to trigger code that adds specific elements to the URL specific to that keyword. For example, if I wanted to open a page, it would simply be the main wiki URL, and then /[pagename].

Editing a page would add this to it: /index.php?title=[PageName or sublinks to pages]&action=edit

The code I've written right now as I stated above takes a more hard coded approach, and only opens direct links instead of using keywords that assign specific things to the URL. Does anyone have any advice on how I could go about this efficiently?

Cheers,
Luke

PS: List of keywords and main URL:

Main URL: Official Feed The Beast Wiki

Keywords:
1. Open: MainURL + [PageName (Taken from UserInput)]
2. Edit: MainURL + /index.php?title=[PageName or sublinks to pages]&action=edit
3. Purge: MainURL+ [PageName]?action=purge

Also important to note, ALL of these keywords would be entered as one command, so there needs to be code to split each word in the user input into a separate string that can be then referenced and used to produce the result. The annoying part here, is that all parts are needed, nothing is never used.
 
Last edited:
I believe in C# you're able to 'target' windows, controls within web pages, and such, so I'd start there.

Though it does have issues with Chrome (and possibly FF?) due to the way it sandboxes windows.
 
I run Chrome as my main OS, and as such if it won't work with chrome, then that's definitely a non-option, and secondly Carnage, you're missing what I'm trying to do. This bot essentially is an intelligent one that takes a base url for the wiki, uses key words such as edit, and then understands what parts of the URL it needs to add in order to produce the desired result. It has nothing to do with actually editing the website itself, it is all purely about OPENING pages, but with logic that removes the problem of having to hard code every single link, since all links in the wiki follow the same formatting.
 
Last edited:
Totally gonna reboot this thread and say that I did end up completing this (mostly). There were only a few specialised pages on the wiki that didn't follow a standard format, and I wasn't going to code an entire new section of logic just for one flippin page lol. It was a console application, but apparently some guy in Egypt ended up using it because it helped him with his Wiki browsing due to his net being uber slow, meaning that instead of going from page to page, he simply just tells the program where he wants to go, and it takes him there.
 
Back
Top Bottom