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
Factory Factory
Mar 19, 2010

This is what
Arcane Velocity was like.
It is the opposite of tiny, but iTunes does that kind of stuff with its Genius feature.

Adbot
ADBOT LOVES YOU

apati
Nov 25, 2004
I wish I was an anal probe

mobby_6kl posted:

Sorry this took so long, but try this. You'll need to keep the dll in the same directory as the exe file for it to work. Let me know if it does/doesn't do what you want, though you can also change the included sources yourself (see, no keylogging!).

YES. thank you!
This is it.
but is it possible to get a space after the dot/period ?

pzy
Feb 20, 2004

Da Boom!
My request might be a little involved, but here's what I want to do:

We have a security camera pointed at the front door, and a voip intercom outside connected to our TrixBox/Asterisk server. When someone presses the call button it rings all the lines in the building and you press a button to open the door.

I'd like an app that is integrated with Growl to detect the intercom button press, take a screenshot of the security camera (it's web-accessible), and generate a Growl pop-up that when clicked sends a form action to the intercom (is this even possible via Growl's networked alert relay?)


The security camera's mjpeg feed is accessible via http://camera.ip/img/video.mjpeg and requires a login/pass.

The intercom's relay is activated via this form action, which also requires a login/password:

code:
<form action="http://intercom.ip/cgi-bin/deviceconfig.cgi" method="post" enctype="multipart/form-data">
<input type="submit" value="Open Door" name="test_relay" class="button"/>
Any help is appreciated, and if it's doable, I'd be willing to paypal some cash for a finished product :)

Gromit
Aug 15, 2000

I am an oppressed White Male, Asian women wont serve me! Save me Campbell Newman!!!!!!!
My Vista HTPC sometimes forgets the resolution and refresh rate and I have to go through a bunch of menus to switch it back so the picture on my HDTV looks good. I'd love to have a button either on the desktop or the toolbar that just resets it all to 1920x1080@60Hz.
I also have an ATI video overscan setting, but I can live without that being automated as it very rarely gets confused and would be harder to code (presumably.)

Does this sound straight-forward? I imagine I could set what res and refresh rate I wanted in an ini or something, but hard-coded is fine.

mobby_6kl
Aug 9, 2009

by Fluffdaddy

Gromit posted:

My Vista HTPC sometimes forgets the resolution and refresh rate and I have to go through a bunch of menus to switch it back so the picture on my HDTV looks good. I'd love to have a button either on the desktop or the toolbar that just resets it all to 1920x1080@60Hz.
I also have an ATI video overscan setting, but I can live without that being automated as it very rarely gets confused and would be harder to code (presumably.)

Does this sound straight-forward? I imagine I could set what res and refresh rate I wanted in an ini or something, but hard-coded is fine.

Reset Resolution (I really suck at coming up with names).

Just run the exe to (try to) set the resolution to 1920x1080@60Hz, or give it command line arguments like so: 1920 1080 60 (you can do it with a shortcut).

Update: Thanks to nielsm and Gerblyn of CoC, this should be fixed now. Just download the file again if you already got it before this update.

I'm afraid I'll have to ask you to do some testing, as I'm having some bizarre issues with it. It will set my U2311H to any supported resolution except 1920x1080, even though it's the native resolution and is listed as supported. If the resolution is anything below 1920x1080, it will just throw an error, but if it's already 1920x1080, it will go ahead and change it to the same drat resolution. Does the same happen for you?

apati posted:

YES. thank you!
This is it.
but is it possible to get a space after the dot/period ?

Of course it's possible... it should be possible, but somehow adding just one space throws the whole thing in an endless loop. Watch this space for an update!
I updated this one as well, just get the new version from the same link.

mobby_6kl fucked around with this message at 17:22 on Apr 2, 2011

Gromit
Aug 15, 2000

I am an oppressed White Male, Asian women wont serve me! Save me Campbell Newman!!!!!!!

mobby_6kl posted:

Reset Resolution (I really suck at coming up with names).

Just run the exe to (try to) set the resolution to 1920x1080@60Hz, or give it command line arguments like so: 1920 1080 60 (you can do it with a shortcut).

Awesome, thanks. I'll test it later today and see how it goes.
Man, 11 hours from request to solution - I can't complain about that!

Corla Plankun
May 8, 2007

improve the lives of everyone
Is there a way to tell the difference between an animated GIF and a regular one in software? I have a big pile of GIFs I got from a website and I want to sort them into two folders (animated, not animated). I feel like a simple script could do this if there is a key difference in file headers or something like that.

mobby_6kl
Aug 9, 2009

by Fluffdaddy

Corla Plankun posted:

Is there a way to tell the difference between an animated GIF and a regular one in software? I have a big pile of GIFs I got from a website and I want to sort them into two folders (animated, not animated). I feel like a simple script could do this if there is a key difference in file headers or something like that.

Don't want to come off like I'm hoarding all the requests here, but I actually already have a script I wrote a while ago almost exactly for this purpose. You'll need Perl and ImageMagick:

code:
use Image::Magick;
my $image = Image::Magick->new();
my ($static, $animated) = @ARGV;

while ($image->Read(glob "*.gif")) {
	rename $filename, ($image->Get('%n') == 1 ? $static : $animated) . "/" . $filename;
	@$image = ();
}
Launch it with the subfolder names where you want the static and animated gifs to go, no spaces (or use quotes around the name) and make sure they exist first. If you don't have Perl and IM and don't want to install them, it should also be possible to just check for the Netscape extension block in the file's header, as you suggest.

Edit: Here's a C version since :spergin: kept bothering me yesterday http://mobby6kl.nfshost.com/files/software/gif.rar. Usage is the same as the Perl version, but it shouldn't require any dependencies.

mobby_6kl fucked around with this message at 23:49 on Apr 4, 2011

Mad Brahmin
Dec 29, 2004

Corla Plankun posted:

Is there a way to tell the difference between an animated GIF and a regular one in software? I have a big pile of GIFs I got from a website and I want to sort them into two folders (animated, not animated). I feel like a simple script could do this if there is a key difference in file headers or something like that.

This is pretty easy to do in c# since the Image type from System.Drawing contains a method to get the number of frames in an image. This should move all animated gifs in the same directory as sortgifs.exe or a specified path into ./animated and all static images into ./static.

https://sites.google.com/site/madbrahmin/SortGifs.zip

edit: beaten

GosuProbe
Apr 14, 2008

Factory Factory posted:

It is the opposite of tiny, but iTunes does that kind of stuff with its Genius feature.

Yes, that is the kind of thing I'm looking for. I've used Genius for a while but it's kind of a hassle. Is there a way to get it to give me a list of everything it suggests rather than having to click on different songs/artists/albums and writing it down somewhere?

Corla Plankun
May 8, 2007

improve the lives of everyone

Mad Brahmin posted:

This is pretty easy to do in c# since the Image type from System.Drawing contains a method to get the number of frames in an image. This should move all animated gifs in the same directory as sortgifs.exe or a specified path into ./animated and all static images into ./static.

https://sites.google.com/site/madbrahmin/SortGifs.zip

edit: beaten

WOW that worked like a dream! Thank you! Also thank you mobby but I didn't have the requisite equipment for yours.

apati
Nov 25, 2004
I wish I was an anal probe

mobby_6kl posted:

Of course it's possible... it should be possible, but somehow adding just one space throws the whole thing in an endless loop. Watch this space for an update!
I updated this one as well, just get the new version from the same link.

Awesome. Thank you. :)

complex
Sep 16, 2003

The platform is Windows. Is there a way to follow (tail) a log file, and then convert that stream into syslog-compatible messages? Assume that the entries in the log file are small enough to fix in syslog's 1024 byte maximum size. If this could be done with Windows built-ins that would be awesome, with free software still mostly awesome, with pay software, pretty crappy.

If this works well it could potentially make it into a presentation at a large conference. Thanks.

ToxicFrog
Apr 26, 2008


I don't know if there's a way with windows builtins, but if you're comfortable with tail and awk (or sed), there's windows versions of them which can handle this task easily.

Something like this quick and dirty script (needs uname, awk, and tail, all of which are in the above package):

code:
# syslog.awk
BEGIN {
    "uname -n" | getline hostname;  # determine system hostname
    progname = "unknown";
}
{ printf("%s %s %s: %s\n", strftime("%b %d %H:%M:%S"), hostname, progname, $0); }

# use with this command
tail -f foo.log | awk -f syslog.awk progname=foo
Output looks something like this:

pre:
$ awk -f syslog.awk progname=syslogtest /etc/passwd
Apr 05 14:14:51 leela syslogtest: root:x:0:0:root:/root:/bin/bash
Apr 05 14:14:51 leela syslogtest: daemon:x:1:1:daemon:/usr/sbin:/bin/sh

simcole
Sep 13, 2003
PATHETIC STALKER
I see the tinyapps website is down so I'm not sure if following the OP is still the way to go.

Request: I want a script / app / something that could take my irc log and upload it every few minutes to my webserver so I can view what's happened while I'm traveling (I'm a pilot) by just viewing the web page.

edit: preferably windows environment. Bonus if it's an mirc addon.

simcole fucked around with this message at 14:58 on Apr 8, 2011

Hoborg
Oct 19, 2006

by T. Mascis

simcole posted:

I see the tinyapps website is down so I'm not sure if following the OP is still the way to go.

Request: I want a script / app / something that could take my irc log and upload it every few minutes to my webserver so I can view what's happened while I'm traveling (I'm a pilot) by just viewing the web page.

edit: preferably windows environment. Bonus if it's an mirc addon.

You could use Windows Scheduled Tasks to run a batch file every x minutes or so. The batch itself is quite simple:

code:
cd "<path to your logs directory>"
ftp <yourFtpServer>
user <ftpUsername>
<ftpPassword>
cd <remoteServerPath>
bin
send <filename>
bye

simcole
Sep 13, 2003
PATHETIC STALKER

Hoborg posted:

You could use Windows Scheduled Tasks to run a batch file every x minutes or so. The batch itself is quite simple:

code:
cd "<path to your logs directory>"
ftp <yourFtpServer>
user <ftpUsername>
<ftpPassword>
cd <remoteServerPath>
bin
send <filename>
bye

that's awesome.. now if I just could do log to html first so it's semi-readable.

Ceros_X
Aug 6, 2006

U.S. Marine

simcole posted:

that's awesome.. now if I just could do log to html first so it's semi-readable.

Have you thought about saving your logs to your dropbox folder? I know some people do this so they always have chat history no matter what PC they're on.

dpkg chopra
Jun 9, 2007

Fast Food Fight

Grimey Drawer
I'm not sure if this is even doable due to the limitations of PDFs, but I might as well ask.

I need an app that will take a PDF (which contains scanned images and documents) and automatically resizes each page (while maintaining the aspect ratio) so that it ensures that there's an 8cm left-hand margin (both on the front and in the back.

Is something like this possible?

Dicky B
Mar 23, 2004

Does this do what you want? http://createpdf.neevia.com/pdfresize/

Stonefish
Nov 1, 2004

Chillin' like a villain
This seems like a common enough request, but my google skill is failing.
I need something for WinXP that records audio from the microphone and dumps it into an mp3 file. At the top of each hour (or after one hour), it should move on to a new file with a suitable name.

"Recordpad" does exactly what I need (and plenty I don't), but it's only got a 14 day trial.
Anyone familiar with an alternative? I'm not sure if this qualifies as a "tiny" app or not.

ephphatha
Dec 18, 2009




Stonefish posted:

This seems like a common enough request, but my google skill is failing.
I need something for WinXP that records audio from the microphone and dumps it into an mp3 file. At the top of each hour (or after one hour), it should move on to a new file with a suitable name.

"Recordpad" does exactly what I need (and plenty I don't), but it's only got a 14 day trial.
Anyone familiar with an alternative? I'm not sure if this qualifies as a "tiny" app or not.

Seems appropriately tiny enough, I'll give it a shot.

sofokles
Feb 7, 2004

Fuck this
this might exist for all i know.

I'm running a series of experiments where wax deposits on a cold-finger. Images are taken every minute by a web cam hooked up to one computer and controlled through lab-view, and cold-finger temperature is controlled and logged by another one. Problem is that the computers can't communicate and the temperature isn't recorded on the images.

Each run creates about 700 images.

I need some way of
for all images in folder :
1 . compare the time stamp of .jpg image with time-entries in the temperature log and find the best match.
2 . Pick corresponding temperature in temperature log and insert it in the lower left corner of of the image

The temperature log file is comma-separated, first column is time , third column is temperature

Doable ?

EDIT I would off-course transfer the temperature log over to the image-containing computer first.

Stonefish
Nov 1, 2004

Chillin' like a villain

Ephphatha posted:

Seems appropriately tiny enough, I'll give it a shot.

This is a better response than I expected. Thanks.

ephphatha
Dec 18, 2009




Stonefish posted:

This is a better response than I expected. Thanks.

You might change your tune, as this is basic as all hell.

Version 2, I hosed up the first time. http://ifile.it/ekjz034/Eavesdropper.7z

Run it, and at approximately every hour it will dump what's it's recorded to a file with the name being the time it started recording [that stream]. It captures raw data from the default input device and dumps it as a wav file with a filesize of about 1MB a minute. To stop recording close the graphical window or hit escape with the graphical window active.

You'll need the VS2010 re-distributable installed, get it here: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84

Edit: Oh, it's almost completely untested. I spent far too long building and linking SFML to be arsed running it for an hour. I wasn't able to get it to write to any other file format easily so wav it is. MP3 is propriety to write to anyway as far as I know.

ephphatha fucked around with this message at 18:28 on Apr 16, 2011

mobby_6kl
Aug 9, 2009

by Fluffdaddy
^^^
I might give that one a try as well, but keep in mind that I currently have no idea what I'm doing so this might not turn out well (or at all).

sofokles posted:

this might exist for all i know.

I'm running a series of experiments where wax deposits on a cold-finger. Images are taken every minute by a web cam hooked up to one computer and controlled through lab-view, and cold-finger temperature is controlled and logged by another one. Problem is that the computers can't communicate and the temperature isn't recorded on the images.

Each run creates about 700 images.

I need some way of
for all images in folder :
1 . compare the time stamp of .jpg image with time-entries in the temperature log and find the best match.
2 . Pick corresponding temperature in temperature log and insert it in the lower left corner of of the image

The temperature log file is comma-separated, first column is time , third column is temperature

Doable ?

EDIT I would off-course transfer the temperature log over to the image-containing computer first.

Certainly. What format is the time in, just HH:MM:SS, and 12/24 hours? Our could you just post an example line from the file?

sofokles
Feb 7, 2004

Fuck this

mobby_6kl posted:

^^^
I might give that one a try as well, but keep in mind that I currently have no idea what I'm doing so this might not turn out well (or at all).


Certainly. What format is the time in, just HH:MM:SS, and 12/24 hours? Our could you just post an example line from the file?

Hey, thanks for showing interest.

HH:MM:SS 24 hours

I don't have the file here now, I'm actually rummaging through my drawers to find a non-corrupt floppy disk to copy the log file onto.


From memory there are no headers and the lines run like

HHMMSS XX.XX YY.YY ZZ.ZZ AA.AA

where the entries are

Time targettemp realtemp powerleveltemp powerlevelpump


But I need to doublecheck


I'll have it tomorrow if you can wait ?

If you can't I could of course just copy the log into a spreadsheat and delete all superfluous columns and say the the csv-file will consist of entries in the format :

HH:MM:SS YY.YY


Thanks again

Stonefish
Nov 1, 2004

Chillin' like a villain

Ephphatha posted:

You might change your tune, as this is basic as all hell.

Version 2, I hosed up the first time. http://ifile.it/ekjz034/Eavesdropper.7z

Run it, and at approximately every hour it will dump what's it's recorded to a file with the name being the time it started recording [that stream]. It captures raw data from the default input device and dumps it as a wav file with a filesize of about 1MB a minute. To stop recording close the graphical window or hit escape with the graphical window active.

You'll need the VS2010 re-distributable installed, get it here: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84

Edit: Oh, it's almost completely untested. I spent far too long building and linking SFML to be arsed running it for an hour. I wasn't able to get it to write to any other file format easily so wav it is. MP3 is propriety to write to anyway as far as I know.

There's nothing wrong with basic. Basic is what I want.
Found a bit of a bug though. Other than completely pinning one core of a Core2Duo.
It stores the audio in RAM, which is fine I guess. After 59 minutes, RAM usage is about 318MB. Then it writes the file to disk, and usage moves up to about 937MB. I imagine that'll go up again next time too.

If you're interested in tracking that bug down, please drop the recording length to 15 minutes from 60 while you're at it. The machine I want to run it on is an old Celery-M with 512MB.
I'll go see about digging up a command line based windows mp3 encoder that I can script to run every 15 minutes on *.wav

Factory Factory
Mar 19, 2010

This is what
Arcane Velocity was like.
LAME - http://lame.sourceforge.net/

Stonefish
Nov 1, 2004

Chillin' like a villain
Yeah, but I don't "do" compiling :v:
Found a precompiled version though.
In bash, I'd want a "for x in *.wav" to grab the filenames of suitable files and pass them to lame. Can someone remind me what that might look like in .bat?

Stonefish fucked around with this message at 04:23 on Apr 17, 2011

ephphatha
Dec 18, 2009




Stonefish posted:

There's nothing wrong with basic. Basic is what I want.
Found a bit of a bug though. Other than completely pinning one core of a Core2Duo.
It stores the audio in RAM, which is fine I guess. After 59 minutes, RAM usage is about 318MB. Then it writes the file to disk, and usage moves up to about 937MB. I imagine that'll go up again next time too.

If you're interested in tracking that bug down, please drop the recording length to 15 minutes from 60 while you're at it. The machine I want to run it on is an old Celery-M with 512MB.
I'll go see about digging up a command line based windows mp3 encoder that I can script to run every 15 minutes on *.wav

The way I'm recording is by storing data in two buffers (so that it can continually record while writing to disk). The buffers are only cleared when you restart recording, so ram usage should stabilise after two cycles. But that's not going to help at all on a box with only 512mb, so I'll rewrite it to write data directly to disk :).

It's probably pinning your CPU as I'd guess the active sound recording thread is entering a busy wait, not sure if I can stop that one.

Edit: I've manned up and am encoding directly to mp3. Not sure what the cause of that crash is, I'll see if I can reproduce it. Did it lock up immediately after it started writing to disk?

ephphatha fucked around with this message at 05:49 on Apr 17, 2011

Stonefish
Nov 1, 2004

Chillin' like a villain
Found another slight problem.

About 90 or 92 minutes into execution, I guess.

Stonefish
Nov 1, 2004

Chillin' like a villain
Pinning the CPU is fine as long as it's not "really" using that much (ie, it'll work on something slower than this core2)
Writing directly to disk is going to make it a tiny bit harder to pass off to Lame. You're the expert, but maybe write to wav.temp and then rename to %date%%time%.wav when it's completed?

Stonefish fucked around with this message at 04:30 on Apr 17, 2011

Stonefish
Nov 1, 2004

Chillin' like a villain

Ephphatha posted:

Edit: I've manned up and am encoding directly to mp3. Not sure what the cause of that crash is, I'll see if I can reproduce it. Did it lock up immediately after it started writing to disk?

No. Like I said, it was about 90 minutes in. Couldn't be any further away from a write cycle if it tried :)
(If you don't want to make a UI/conf file for it, 64kbit CBR mono should be about appropriate.)

ephphatha
Dec 18, 2009




Version 3: http://ifile.it/eukzly2/Eavesdropper.7z

I'm a lazy fucker :P. 64Kbit/s, CBR, Mono. I'll leave it running for a bit to make sure it doesn't crash unexpectedly. With any luck we've dodged the bullet anyway.

The source is included if you want to play around, you'll need SFML, Boost, and LAME. Anyone else is free to modify it if they want to add a GUI or make it read from a config file.

Stonefish
Nov 1, 2004

Chillin' like a villain
Preliminary reports suggest awesome.

Stonefish
Nov 1, 2004

Chillin' like a villain
28,125KB per hour. I just had it running for the last 6.5 hours, and it didn't crash even once :v:
I'll see about deploying this properly in the next few days and let you know how it is.
Now someone else break up this monologue.

Daynab
Aug 5, 2008

I know I've seen something like this somewhere, but I can't remember where - I would love an app that is just install-and-forget and lets me resize windows by scrolling with the mouse on their titlebar.
If anyone knows where that is, or has time to make one.. I'd love you forever! Thanks in advance!

Gromit
Aug 15, 2000

I am an oppressed White Male, Asian women wont serve me! Save me Campbell Newman!!!!!!!

mobby_6kl posted:

Reset Resolution (I really suck at coming up with names).
An update on this:

I've had to use it frequently just lately and it works a treat. However, my desktop image stays at the wrong size, and so appears as a smaller image centred on my screen when it switches to 1920x1080. If I right-click and hit "personalize" and then the background changer, it jumps to the correct resolution without me clicking on anything further. Quit that and it sticks.

So, not a big deal, but if your tool could update the background settings that would be extra awesome. If that's too tricky then don't worry - I'm more than happy with it right now.

Adbot
ADBOT LOVES YOU

ephphatha
Dec 18, 2009




Daynab posted:

I know I've seen something like this somewhere, but I can't remember where - I would love an app that is just install-and-forget and lets me resize windows by scrolling with the mouse on their titlebar.
If anyone knows where that is, or has time to make one.. I'd love you forever! Thanks in advance!

This looks really interesting to do but really depends on the target platform.

The Win32 API has something which should work for this, you'll basically need to write a program that registers a MouseProc and watches until it receives a WM_NCHITTEST message indicating the mouse is over a titlebar (i.e. wHitTestCode == HTCAPTION). You'd also need a LowLevelMouseProc listening for WM_MOUSEWHEEL messages. When the mouse is over a titlebar and you've got a mousewheel message, then call something like WindowFromPoint() with the current mouse position and BeginDeferWindowPos(), DeferWindowPos(), EndDeferWindowPos() (or just a simple SetWindowPos()).

I may give this a go, but I haven't done any low level Win32 poo poo for a few years.

ephphatha fucked around with this message at 07:15 on Apr 18, 2011

  • Locked thread