Jump to content
Ketarin forum

Kerberos

Members
  • Posts

    23
  • Joined

  • Last visited

Contact Methods

  • MSN
    fear.neverending@gmail.com

Profile Information

  • Location
    British Columbia, Canada

Kerberos's Achievements

Newbie

Newbie (1/14)

  1. Well I'm baffled. It's apparently not a focus problem. I checked the active control after running an update and it's still olvJobs. The fact that CTRL+U is an accelerator key for the update button and therefore is controlled by the form internally makes it harder to figure out what exactly is going on. If Flo had written the code that handled CTRL+U himself then it would be much easier to debug. I have a bad feeling that this might end up being some sort of strange Windows bug more than a problem with Ketarin. But that's only because I can't think of any other explanation at the moment. I'll keep poking and see what I can find though. Maybe Flo will know what's causing this...
  2. PersistentForm:SaveDialogSettings() Add this to the Foreach loop: Settings.SetValue(olv, col.Text + ":LastDisplayIndex", col.LastDisplayIndex); Settings.SetValue(olv, col.Text + ":DisplayIndex", col.DisplayIndex); PersistentForm:LoadDialogSettings() Add this to the Foreach loop: col.LastDisplayIndex = (int)Settings.GetValue(olv, col.Text + ":LastDisplayIndex", col.LastDisplayIndex); col.DisplayIndex = (int)Settings.GetValue(olv, col.Text + ":DisplayIndex", col.DisplayIndex); Done. You're the one who told me how to do that It's not a big thing, just handy, that's all.
  3. I'm sad that this simple modification went overlooked. It's really easy to achieve. Would it cause any problems Flo? If not, I'd like to see it in the official build, just for aesthetics purposes. It's already in my personal build. Just add "this.olvJobs.AllowColumnReorder = true;" to MainForm.Designer.cs.
  4. When adding a variable in the EditVariablesDialog window, once you add a variable, it's name immediately appears in the context menu. Attempting to use the variable in it's own definition results in errors. For example, using the variable in it's own URL definition results in an unhandled System.Net.WebException in "UrlVariable:ReplaceInString(string value, bool onlyCached)" because Ketarin attempts an HTTP request for "%Working_Dir%\{varname}", %Working_Dir% being wherever Ketarin is being run from. It wouldn't make sense to use a variable in it's own definition to begin with, so could you maybe exclude the variable being defined from the context menu?
  5. Would coloring the background of the selection solve the line-feed issue? I'm not too sure that it would. It would make it far easier to see which spaces are being included (something I've had a problem or two with before), but I don't know that it would show any line-feeds. I have a feeling that it's going to take something more difficult to solve that problem. I tried modifying the rich text box to add a Pilcrow (ΒΆ) before every line-feed like Microsoft Office can do, but it's tricky getting the regex to ignore them while the rich text box displays them. It's also tricky removing them from the extracted text. It's the only solution I can think of at the moment, and sadly another project has taken some of my interest, resulting in less time to work on Ketarin. I'll continue searching for possible solutions to the invisible line-feed problem and see what I can come up with. In the mean time I agree that coloring the background of the selection would be great. === Edit === Well, as usual I got way ahead of myself again. I was wrong, the background highlighting works perfectly. No need for any fancy Pilcrows or anything like that. Line-feeds show up just like spaces. Great work Flo! Sorry for getting all excited over nothing. Now I need to find some other fun way to modify Ketarin
  6. Softpedia proved to be quite an interesting project for me. I started out thinking that it would be fairly trivial to do with it what Flo did with FileHippo. I made methods similar to the FileHippo ones that did the same thing but with Softpedia. After a few days of debugging and numerous twists that I wasn't expecting it turns out that Softpedia isn't as robust as I thought it was. Some applications' download sections have multiple links to companion pieces of software that are completely separate from the application itself. Others have multiple links for different version (such as versions in different languages), making it difficult to identify which link should be the default (programmatically, of course). Also, the links aren't always in any particular order, which really doesn't help. Then there's External Mirrors versus Softpedia Dedicated Mirrors. Some of the dedicated mirrors simply redirected back to the download page, while some external mirrors take you to the download page on the application's website. I wasn't sure what to do. While I DO have a (mostly) working Softpedia-enabled version of Ketarin sitting around, I don't like the fact that for some applications you'll end up downloading the Russian version or some other program that goes with the application instead. I was hoping to see Softpedia implemented as an automatic feature, like FileHippo, but it's a little unstable for that. At least I think so.
  7. I was adding a few apps that I missed to my list of jobs and I noticed that one of the download sites had the MD5 checksums of the installers on the page. I was thinking 'it's too bad that I can't use that to verify the download...', but then I had an idea. What if I used some commands to verify the downloaded file using the MD5 checksum. The only problem with this is that in the event that the file is corrupt, how can I tell Ketarin to download it again? This gave me an even better idea. Giving Ketarin it's own set of internal commands. These could be placed in the "commands to execute after download" textbox and uniquely distinguished by either appending some sort of prefix such as "Ketarin:" or "K:" or something like that. Ketarin would then enumerate through each command in the textbox and create a queue of actions to be executed in order. Each external command (DOS command, external program execution, etc) would be queued as an external command, and any internal commands would be queued as function calls. It would also be easy then to extend the functionality further down the road by adding more functions/commands. People could even code/write their own commands and store them in a folder in Ketarin's installation directory. Upon startup, a simple scan and import of each command/command set found would allow almost endless possibilities. Pretty much like an add-on/plugin system. Anyways, getting back to the original example. Scraping the MD5 checksum and storing it in {md5}, I would use something like this in the command box: if not Ketarin:verify_md5({file},{md5}) Ketarin:update({appname})& verify_md5() would return a boolean true or false, indicating if the file passed the check. The only problem I see with this example is that if an incorrect md5 checksum is scraped, then it will update continuously. I'm sure there's a way around that though. It's just an idea that popped into my head that I thought might be interesting to put out there. It would probably take a fair amount of work, and at this point sounds like a 'further down the road' sort of feature. It would definitely add a large wow-factor in my opinion though. Extensibility is a very nice thing to see in any application. I might even try to see if I could get pieces of this idea working just to see how hard it would be.
  8. A default download location setting would be nice, but personally I'm ok with using a global variable to handle it. I like the tips idea though. With the list of variables and functions always on the verge of growing further it would be nice to be reminded of the many ways Ketarin can get the job done. The FileHippoID auto-populate, on the other hand, is a bit tricky. In order to fill in the name of the application it would have to grab the web page, meaning a pause (most likely after the FileHippoID textbox loses focus) while the web page is fetched. In the end, I think it would probably come down to waiting the same amount of time it would take you to type the name of the application in manually. I'm not sure it would make much difference. I'll see if it makes things any better, just out of pure curiosity, but I'm not too sure it will. This is, of course, assuming that I'm considering the most efficient way to implement this. Flo could probably think of a better way to do it. As for the FileHippo identifying icon or logo, I'm wondering where it could go. I don't really see anywhere to slip it in. It's an interesting idea, but where to put it?
  9. I don't mind an extra click here or there. I have a few jobs with three user-defined app. variables, then I have my two user-defined global variables, and then there's the system global variables on top of those. It works out to seven or eight variables and it just looks like it's starting to fill up fast. I definitely overestimated the simplicity of the submenus though. I ended up having to add two overloads and track a whole bunch of variables. It looks nice, I'll say that much. But other than that, I don't think it's worth the effort. Oh well, it was after all just an idea.
  10. I've noticed that similar to my desktop context menu, the ApplicationJobDialog form's context menu can get quite large. This is of course due to the variables. The more you have, obviously, the larger it gets. I thought it might be nice to group the variables into sub-item groups, but I can't quite seem to decide on a practical way to split them up. It's easy enough to create the actual context menu groups, but the actual sorting order is bothering me. I was thinking something like "Global" and "User-Defined" at first, but then I realized that there are user-defined global variables (set in the settings window) and there are automatically set, per-application global variables ({category}, {appname}, etc). Then there's {version}, which is either automatically set if you're source is a FileHippoID, or user set if you set it manually. So no matter how you look at it, grouping is tricky. I was wondering what everyone else thinks about this? Any ideas on how to sort the variables? Is this maybe not such a good idea?
  11. Major Geeks was giving me a bit of a hard time, but I wasn't as perceptive as you were. I didn't think to just craft the final download URL from scrapes. I just noticed that it was redirecting to a page with an "HTTP-EQUIV Refresh" element pointing to the file I wanted, something I've seen a lot of download sites do, so I figured I'd give Ketarin the ability to automatically follow the refresh link. It was quite annoying at first, but I finally figured it out. Ketarin's structure can be quite intriguing sometimes. If anyone modifies and compiles their own version I'd be happy to share how I got it to follow the refresh link. It's not as easy as I thought it would be. The recursion almost got to me. Or Flo, if you would like to implement it as a permanent feature at some point, let me know. It's quite stable, no problems yet. I'm going to throw some more sites at it though and see how it does.
  12. Oh, well I feel kind of dumb now. I wish I knew that before. Thanks! =D
  13. Sure do. I'll admit (even though it's fairly obvious) that I don't know how SVN works very well. I thought that if I did an SVN update, it would overwrite any changes that I made. So you're saying that if I use the SVN folder to do my modifications, and then do a checkout, it will merge your changes with mine?
  14. I'm not sure how many people actually compile from source, and of those who do, how many get the source from the SVN, but I thought I'd share how I keep my source up to date. I'm actually quite surprised that it all works correctly. I keep a folder on my desktop that is linked to the SVN and update it periodically to get the latest revision of Ketarin. I also keep a folder that contains the CDBurnerXP source files required by Ketarin, as well as the source files from the Win32 folder. Since I'm constantly working on adding things to Ketarin (just for fun, unless Flo is interested) I need a folder with all of the source files in it that I can do with what I please, and I'd prefer it be separate from the SVN folder. So I keep a third folder that is pretty much a copy of the SVN folder, but also contains any changes I've made. The problem I ran into is that every time I updated the SVN folder, I would have to copy any files I'd worked on from the third folder and delete it, copy the SVN folder to a new third folder, copy all of the missing source files (CDBurnerXP, Win32, etc) in, edit the Ketarin.csproj file to fix the references, and then merge my edited files with the newly updated ones. After doing this manually a few times I decided I needed a faster solution. Also, in the event that Flo likes the sound of any of my additions/modifications, I need a way to precisely determine exactly where each piece of my code is and compile a list of modifications. So I set out to automate this annoyingly repetitive task. This is what I came up with: 1) Update SVN folder 2) Backup modified files 3) Delete old working folder 4) Run Patch.bat @echo off Set /P doit=Patch Ketarin Source?^> if /I not "%doit%"=="Y" GoTo :END Set /P rev=What revision?^> md Ketarin_r%rev% xcopy /E Ketarin Ketarin_r%rev% md Ketarin_r%rev%\CDBurnerXP\ copy Ketarin_base\CDBurnerXP\ControlRedrawLock.cs Ketarin_r%rev%\CDBurnerXP\ControlRedrawLock.cs copy Ketarin_base\CDBurnerXP\FormatFileSize.cs Ketarin_r%rev%\CDBurnerXP\FormatFileSize.cs copy Ketarin_base\CDBurnerXP\GenericEventArgs.cs Ketarin_r%rev%\CDBurnerXP\GenericEventArgs.cs copy Ketarin_base\CDBurnerXP\ListView.cs Ketarin_r%rev%\CDBurnerXP\ListView.cs copy Ketarin_base\CDBurnerXP\ObjectListView.cs Ketarin_r%rev%\CDBurnerXP\ObjectListView.cs copy Ketarin_base\CDBurnerXP\OwnerDrawnMenu.cs Ketarin_r%rev%\CDBurnerXP\OwnerDrawnMenu.cs copy Ketarin_base\CDBurnerXP\PathEx.cs Ketarin_r%rev%\CDBurnerXP\PathEx.cs copy Ketarin_base\CDBurnerXP\PersistentForm.cs Ketarin_r%rev%\CDBurnerXP\PersistentForm.cs copy Ketarin_base\CDBurnerXP\SafeClipboard.cs Ketarin_r%rev%\CDBurnerXP\SafeClipboard.cs copy Ketarin_base\CDBurnerXP\Separator.cs Ketarin_r%rev%\CDBurnerXP\Separator.cs copy Ketarin_base\CDBurnerXP\Settings.cs Ketarin_r%rev%\CDBurnerXP\Settings.cs copy Ketarin_base\CDBurnerXP\VistaMenu.cs Ketarin_r%rev%\CDBurnerXP\VistaMenu.cs copy Ketarin_base\CDBurnerXP\WebLink.cs Ketarin_r%rev%\CDBurnerXP\WebLink.cs md Ketarin_r%rev%\Includes\ copy Ketarin_base\Includes\ Ketarin_r%rev%\Includes\ md Ketarin_r%rev%\Win32\ copy Ketarin_base\Win32\IconReader.cs Ketarin_r%rev%\Win32\IconReader.cs copy Ketarin_base\Win32\Kernel32.cs Ketarin_r%rev%\Win32\Kernel32.cs copy Ketarin_base\Win32\Shell32.cs Ketarin_r%rev%\Win32\Shell32.cs copy Ketarin_base\Win32\User32.cs Ketarin_r%rev%\Win32\User32.cs copy Ketarin_base\Ketarin.csproj Ketarin_r%rev%\Ketarin.csproj rd /S /Q Ketarin_r%rev%\.svn rd /S /Q Ketarin_r%rev%\Forms\.svn rd /S /Q Ketarin_r%rev%\Icon\.svn rd /S /Q Ketarin_r%rev%\Properties\.svn rd /S /Q Ketarin_r%rev%\Resources\.svn rd /S /Q Ketarin_r%rev%\XmlRpc\.svn :END 5) Merge modified files with updated ones I keep a copy of Ketarin.csproj that has all of the fixed references, which I copy into the new folder along with all of the missing source files. I just need to watch for any new source files to be added so I can modify the new Ketarin.csproj and make it the new backup copy. In the event that I need to compile a list of modifications I decided to use 'diff', so I downloaded and installed diffutils. Then I put together this: diff.bat @echo off Set /P changes=Create Changes Diff?^> if /I not "%changes%"=="Y" GoTo :END Set /P rev=What Revision?^> "C:\Program Files\diffutils 2.8.7-1\bin\diff.exe" -r -X ex Ketarin "Ketarin_r%rev%" > changes_diff.txt :END This one is pretty simple. It asks what revision we're at (or it can find the folder) and then runs diff with a list of exclusions (the CDBurnerXP files and other files that are obviously going to be different than the SVN). I can run this before merging my modifications with the SVN files to see exactly which lines of code have been changed since the last revision I updated to, or I can run if after merging in my modifications to create a list of the changes that I've made. I wasn't sure everything was going to work at first, but it works beautifully! Gotta love batch files! =D
  15. The remove variable button in the EditVariablesDialog window needs a check to make sure that a variable is actually selected before attempting to remove it. If there aren't any variables selected, pressing the button results in an unhandled ArgumentNullException.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.