Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
JediGandalf
Sep 3, 2004

I have just the top prospect YOU are looking for. Whaddya say, boss? What will it take for ME to get YOU to give up your outfielders?

Yossarko posted:

From the last thread, for my stats-output-to-text custom app:


Thanks man !

Seems really cool, I can't get it to output the text file though...in APP > Preferences it asks me to OPEN a file, so I tried creating a blank info.txt file and opening it but that didn't work, wouldn't let me click OK. So where does the txt get outputted to ?

I minimized it and after a while I think it quit itself ? I'll leave it open again to see if it does it again.

Thanks a lot anyway man, it's otherwise exactly what I wanted.
Ok I think I fixed everything. Most of the issues were "Hurrr. Why'd I do that?" The default file is stats.txt in your my documents if you don't set a file preference. Lemme know of any more issues.

Program & Source.

Adbot
ADBOT LOVES YOU

JediGandalf
Sep 3, 2004

I have just the top prospect YOU are looking for. Whaddya say, boss? What will it take for ME to get YOU to give up your outfielders?

wrok posted:

Not to derail, but that's a pretty decent program. :glomp: I scrapped my attempt after I saw yours. ...though mine did use less memory :colbert:
Haha thanks. :)

I like the Wiki idea. I've been going through the old thread finding my applications and making pages.

JediGandalf
Sep 3, 2004

I have just the top prospect YOU are looking for. Whaddya say, boss? What will it take for ME to get YOU to give up your outfielders?

Yossarko posted:

Much stuffs
Odd, never did encounter that. I threw in more InvalidOperationException catches. Right now, I'm going to say it's in the GetDiskSpace() method. That has to use WMI to get the disk space and I don't know when WMI was introduced for XP. But I'm going to run it overnight tonight and see if an error like that appears.

Per the other stuff: U/D might be harder. I could probably get you % of network utilized. Lemme research that.

JediGandalf
Sep 3, 2004

I have just the top prospect YOU are looking for. Whaddya say, boss? What will it take for ME to get YOU to give up your outfielders?

Yossarko posted:

Do you have the latest version (with the InvalidOperationException catches) so I can try it out on the server ?

Thanks
Yes I do. Sorry I'm lagging a bit. When I get back home, I will upload them. Look for this post to be edited with a link.

Edit: Uploaded. I compiled it into debugging mode so it should trap any. I also changed the time to every 20 mins. If/when any errors show up, paste screencaps. Program will also write to the text file should it occur then.

JediGandalf fucked around with this message at 02:16 on Apr 11, 2007

JediGandalf
Sep 3, 2004

I have just the top prospect YOU are looking for. Whaddya say, boss? What will it take for ME to get YOU to give up your outfielders?

Yossarko posted:

http://yossarko.com/atom/img/error.png

An error still pops up. It must be because this is running on a lovely PII, 400mhz Zenith Powermate and probably lacks some processor function .NET needs. Don't worry too much about it, I don't want you spending too much time on it, it's already great that you made me this.

:)
Grrr .NET :argh:

I'll still try to hack away at it. I'm currently unemployed :smith: so I have a lot of free time. Unfortunately, I don't know what is causing the exception to be thrown. I did include the source so anyone else is free to take a crack at it.

JediGandalf
Sep 3, 2004

I have just the top prospect YOU are looking for. Whaddya say, boss? What will it take for ME to get YOU to give up your outfielders?

DLCinferno posted:

If I were you I'd at least put in some try catch blocks around everything in MainForm_Load and updateTimer_Tick and pop up a message box with the exception message and the source so you can see where the app is throwing them. I often have a minimal logging class that dumps that info (and anything else relevant) into a text file that people can send me.

Just a suggestion, it seems to run properly for me, although I would use WriteLine for the stats.txt and the OK button on the Preferences form needs to have the DialogResult set to OK, because it's not doing anything right now.
Oooh. Good idea. I did implement the DialogResult notion (I thought I did that though :confused:) and threw try/catch (InvalidOperationException) almost everywhere.

Updated

JediGandalf
Sep 3, 2004

I have just the top prospect YOU are looking for. Whaddya say, boss? What will it take for ME to get YOU to give up your outfielders?

crumpuppet posted:

Awesome! Thanks a lot!

It's beer drinking time :cheers:
Ah I got beaten.

However, I did create my version of the application because I was all ready working on it but I got side tracked with various stuffs.

Hundred Shots Wiki page It has screens and link to program.

JediGandalf
Sep 3, 2004

I have just the top prospect YOU are looking for. Whaddya say, boss? What will it take for ME to get YOU to give up your outfielders?
Wow. I really need to play with image manipulation in .NET. I didn't realize that it can be that easy.

And I don't see one comment in your code there Neurosys! :colbert:

JediGandalf
Sep 3, 2004

I have just the top prospect YOU are looking for. Whaddya say, boss? What will it take for ME to get YOU to give up your outfielders?

dax965 posted:

I've always wanted a program that when you press CTRL+PRT SCRN, it screenshots your screen, then automatically uploads the screenshot to image shack. Also if you press CTRL+ALT+PRT SCRN, it'd take a screenshot of the window you have active and upload it. I'm not sure how hard this would be, but if it would be easy, I'd be greatful. :)
http://tinyappz.com/wiki/Request:1177215243
If this is STRICTLY for ImageShack, they have their own tool which does the very thing you ask. However, if you want it for more like Photobucket or Waffleimages, I'm piecemealing something right now.

Edit: Oh yeah, I forgot about the renaming of image shack. The program I'm talking about is listed under its tools.

JediGandalf
Sep 3, 2004

I have just the top prospect YOU are looking for. Whaddya say, boss? What will it take for ME to get YOU to give up your outfielders?

dax965 posted:

Oh, wow, I can't believe I never noticed that. The imageshack one works perfect, but if you already made one, I wouldn't mind using it. Thanks!
I'm making a "global one" so far. Once I figure out capturing system-wide key presses, I should be good to go. Also figuring out how image shack's upload mechanism works.

JediGandalf
Sep 3, 2004

I have just the top prospect YOU are looking for. Whaddya say, boss? What will it take for ME to get YOU to give up your outfielders?

DLCinferno posted:

This should help you with capturing system-wide key presses:

http://www.anappaday.com/downloads/2006/09/day-8-jedi-console.html

Download the source - there's a very clear example and you can easily modify the code.
Oooh! Would it be all right if I used your KeyHookManager class in my app?

Edit: Nevermind, I'm constructing my own class for the needs of the app. But I learned a lot from your example :)

JediGandalf fucked around with this message at 18:20 on Apr 23, 2007

JediGandalf
Sep 3, 2004

I have just the top prospect YOU are looking for. Whaddya say, boss? What will it take for ME to get YOU to give up your outfielders?

DLCinferno posted:

Glad it's useful, but I can't take credit for the app - I just ran across it and bookmarked it since I knew it would be useful in the future.
Ahh.

Perhaps you might know about this function but it is constantly returning 0/NULL and I don't know why. I tried to import GetLastError() but that is also returning 0.
code:
KeyboardHook = new HookProc(this.KeyboardProc);
hKbHook = SetWindowsHookEx(WH_KEYBOARD_LL, KeyboardHook,
     Marshal.GetHINSTANCE(Assembly.GetExecutingAssembly().GetModules()[0]), 0);
Any ideas?

JediGandalf
Sep 3, 2004

I have just the top prospect YOU are looking for. Whaddya say, boss? What will it take for ME to get YOU to give up your outfielders?

Zeenoside posted:

I want an application that runs on the console and on a keystroke, it returns what button was pressed.

For example you press F5 and it says F5.
http://www.tinyappz.com/wiki/WhichKey

And there you go!

JediGandalf
Sep 3, 2004

I have just the top prospect YOU are looking for. Whaddya say, boss? What will it take for ME to get YOU to give up your outfielders?

Neurozys posted:

Just looking for some input for the site - 2 things I've been playing with are a form to add an application, rather than forcing users to play with wikicode, and a rating system for applications and requests. Any opinions on whether I should finish these, or any other ideas on how to make the site more useable?
A quick-and-dirty form would be excellent. Most of us (assuming) don't know wiki formatting. Not to mention it would shorten the time to formulate a request. I'm indifferent about a rating system.

JediGandalf
Sep 3, 2004

I have just the top prospect YOU are looking for. Whaddya say, boss? What will it take for ME to get YOU to give up your outfielders?

Inquisitus posted:

Is it just me, or are none of the requests on tinyappz actually tiny? Most of them seem like quite a bit of work from a C# programmer's point of view :confused:
I dunno. The most amount of "time" spent on one app would probably be my SystemStats app. That was mostly looking up how to do things though.

However, I'm kind of working on something that was tied to a request (printscreen auto upload). That's turning out to be a not-so-quick or tiny app.

JediGandalf
Sep 3, 2004

I have just the top prospect YOU are looking for. Whaddya say, boss? What will it take for ME to get YOU to give up your outfielders?

Those drat Apes posted:

It would be awesome if you could write an app that would allow me to schedule a time to control my Olevia 232V from my pc w/ a serial cable. The documentation for it is below.

http://www.olevia.com/jsp/rs232/files/ATI_240_RS232_27_&_32_Inch.pdf
Oooh. I'm all over this. My last job/project was controlling devices over RS-232 and TCP/IP. I can probably scrap some code from it too.

But for now, the driving range beckons.

JediGandalf
Sep 3, 2004

I have just the top prospect YOU are looking for. Whaddya say, boss? What will it take for ME to get YOU to give up your outfielders?

Sharkface posted:

the win32 part makes this tough. the only way to do this is through WMI and typically, the folks who write drivers dont' include disable/enable commands in their drivers. would a .net app work?
I would imagine they have to otherwise the OS can't disable the device when I tell it to in the device manager. Unless device disabling is done some other method.

Anything in Win32 API can be imported from the dll file like user32.dll or kernel.dll into .NET. I had to use stuff from user32.dll to get low-level keyboard hooks like the following.
code:
//DLL Imports
[DllImport("user32.dll",SetLastError=true)]
private static extern IntPtr SetWindowsHookEx(int hook, LowLevelKeyboardProc callback,
   IntPtr hMod, uint dwThreadId);

[DllImport("user32.dll", SetLastError = true)]
private static extern bool UnhookWindowsHookEx(IntPtr hhk);

[DllImport("user32.dll")]
private static extern int CallNextHookEx(IntPtr hhk, int nCode, IntPtr wParam, IntPtr lParam);

[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern IntPtr GetModuleHandle(string lpModuleName);        
//Variables
private static IntPtr m_pHookID;
LowLevelKeyboardProc KeyboardProc;
So I guess in theory, you can find the Win32 API that actually disables devices and import that as a .NET DLL inport. If that doesn't work, then WMI would be the next method to try.

Adbot
ADBOT LOVES YOU

JediGandalf
Sep 3, 2004

I have just the top prospect YOU are looking for. Whaddya say, boss? What will it take for ME to get YOU to give up your outfielders?

Mad Brahmin posted:

I don't think I've seen any device management functions in the Windows API. You could probably grab the source to devcon included in the Windows Driver Development Kit and hack it into a nice interface. Devcon is similar to the Windows device manager, but in console form.

http://www.microsoft.com/whdc/devtools/ddk/default.mspx
Well I found lots of stuff about manipulating devices. But I'm still striking out on finding out how to disable a device :smith:

Edit: It's probably easier just to do what you suggested and hack up devcon.

JediGandalf fucked around with this message at 18:16 on May 12, 2007

  • Locked thread