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
Volguus
Mar 3, 2009

Sir_Substance posted:

That's a classic data quality problem you have there. Talk to the people who make electronic health records about trying to get consistent data out of hand written notes from mds, they know about this stuff!

If you don't feel like doing a PhD on data sanitization while you make this, you're going to have to force consistency before you start trying to process it.I would look at replacing that excel sheet with something more rigid, or at least making it a template with drop downs, and then insist that people fill it out correctly. If you don't, you'll always have to double check the results of any conversion for accuracy, in which case you've done nothing but save some wrist strain.

To expand on this, ideally you would have some application (web/desktop/whatever) that presents them with a UI where they can enter the data and where data can be validated. That would be the easiest option. From that app, then one could easily build "Export to Excel" functionality to give them their useless sheets if they really want them.

Otherwise will always be a cat and mouse game, and no matter how idiot-proof your script may be, the universe will always make "better" idiots.

Adbot
ADBOT LOVES YOU

sleepy gary
Jan 11, 2006

I have a request I am not sure is technically possible. I would like a utility that would toggle the availability of certain drive letters for newly inserted drives/devices in Windows 7 (and 8/8.1 if possible).

It would be ok if a drive that was previously assigned to a letter was plugged in and re-assigned a forbidden letter (but if that behavior can also be prohibited, that would be good too).

Scuzzywuffit
Feb 5, 2012

Spekkio posted:

Don't know how 'tiny' of an app this would be, but maybe someone has a suggestion.

I need to take part of an excel spreadsheet that looks like this:



and turn it into this:



The green represents accommodation, the red represents vacancy.
There is usually an identifier at the start of the block that reads 'IN' or 'OUT' or a variation on that.

In the past I've written an VBA macro to read each cell left to right and build an array of dates and the in/out positions. But it was time consuming and isn't easily adopted to spreadsheets in another format.

Any ideas?

What version of Excel are you using? I've put data directly into Excel spreadsheets using the Excel Interop assemblies for Excel 2010, and I'm assuming reading background colors shouldn't be too difficult to do programmatically.

Flipperwaldt
Nov 11, 2011

Won't somebody think of the starving hamsters in China?



DNova posted:

I have a request I am not sure is technically possible. I would like a utility that would toggle the availability of certain drive letters for newly inserted drives/devices in Windows 7 (and 8/8.1 if possible).

It would be ok if a drive that was previously assigned to a letter was plugged in and re-assigned a forbidden letter (but if that behavior can also be prohibited, that would be good too).
I haven't bothered with this since XP, but if it works in a modern Windows, this might be what you're looking for. Requires some hardcore configuration though.

sleepy gary
Jan 11, 2006

Flipperwaldt posted:

I haven't bothered with this since XP, but if it works in a modern Windows, this might be what you're looking for. Requires some hardcore configuration though.

Thanks! This looks like it will do what I want. The configuration is pretty straightforward actually. At least, it is for what I need it to do.

Spekkio
Sep 23, 2005

Really satisfying music!

Scuzzywuffit posted:

What version of Excel are you using? I've put data directly into Excel spreadsheets using the Excel Interop assemblies for Excel 2010, and I'm assuming reading background colors shouldn't be too difficult to do programmatically.

We're running 2010.

rhag posted:

To expand on this, ideally you would have some application (web/desktop/whatever) that presents them with a UI where they can enter the data and where data can be validated. That would be the easiest option. From that app, then one could easily build "Export to Excel" functionality to give them their useless sheets if they really want them.

Otherwise will always be a cat and mouse game, and no matter how idiot-proof your script may be, the universe will always make "better" idiots.

That's the thing, we sell the software that allows them to enter data, validate, export. But we also sell services to convert their existing data.
So I think we're stuck doing it manually.

Sir_Substance
Dec 13, 2013

Spekkio posted:

That's the thing, we sell the software that allows them to enter data, validate, export. But we also sell services to convert their existing data.
So I think we're stuck doing it manually.

You are, I'm afraid.

The best you can do is try to make a script that copies the correctly formatted data and highlights the buggered up data for checking.

Scuzzywuffit
Feb 5, 2012

Spekkio posted:

We're running 2010.


That's the thing, we sell the software that allows them to enter data, validate, export. But we also sell services to convert their existing data.
So I think we're stuck doing it manually.

Actually, I think this should be pretty doable if you provide some input parameters. If you tell the program which columns have resident data, it can just copy all of those columns, regardless of what they hold. Similarly, if you specify how many columns of dates you have, it can just skip over any column that isn't red or green.

Since colors are essentially stored as RGBTRIPLEs, we can determine whether a cell is red or green based on whether the red or green value is highest. As long as you stick to red and green, that should be fine even if people use different shades.

If all of the formatting variations are accounted for by those parameters (basically specifying ranges for resident data and dates), I should be able to whip something up for you.

peak debt
Mar 11, 2001
b& :(
Nap Ghost

Spekkio posted:

Any ideas?

Get a 2x4, write "COLOR ISN'T PARSABLE" on it and beat some sense into your data entry people.

If they'd used like an x for occupied and an o for empty this poo poo would be easy.

Sir_Substance
Dec 13, 2013
If you're dealing with super-incompetent people, you could try for "literally anything you like when you were in, cell blank when you weren't".

Spekkio
Sep 23, 2005

Really satisfying music!

peak debt posted:

Get a 2x4, write "COLOR ISN'T PARSABLE" on it and beat some sense into your data entry people.

If they'd used like an x for occupied and an o for empty this poo poo would be easy.

They sometimes do this; an 'x', an 'O' or a '1'. But each department is different.

It then gets trickier where if the beginning of an occupancy starts with a "TA" it means they fly in where "DI" means they drive in. And we need to pick that up as well.
I might post some real-world examples when I'm back in the office to give you guys an idea.

Just don't think there's enough consistency to the data to write an app. It would need to be super configurable.

peak debt
Mar 11, 2001
b& :(
Nap Ghost

Spekkio posted:

They sometimes do this; an 'x', an 'O' or a '1'. But each department is different.

It then gets trickier where if the beginning of an occupancy starts with a "TA" it means they fly in where "DI" means they drive in. And we need to pick that up as well.
I might post some real-world examples when I'm back in the office to give you guys an idea.

Just don't think there's enough consistency to the data to write an app. It would need to be super configurable.

I hacked something up to show how you can use the offset and index functions in Excel to search for data:
https://docs.google.com/spreadsheets/d/1N2X5ZkeRXqYIY6SHSLbZ2aJVITS8bh3cbYX-SopSOrc/edit?usp=sharing

Chunjee
Oct 27, 2004

peak debt posted:

Get a 2x4, write "COLOR ISN'T PARSABLE" on it and beat some sense into your data entry people.

If they'd used like an x for occupied and an o for empty this poo poo would be easy.

Actually the color is readable. Interior.Color Property :smug:


Spekkio posted:

In the past I've written an VBA macro to read each cell left to right and build an array of dates and the in/out positions. But it was time consuming and isn't easily adopted to spreadsheets in another format.

This is probably how I would do it so I'm not 100% sure what is being requested.

Scuzzywuffit
Feb 5, 2012

Chunjee posted:

Actually the color is readable. Interior.Color Property :smug:


This is probably how I would do it so I'm not 100% sure what is being requested.

Yeah, like I was saying, parsing any color might be difficult, but parsing red and green in particular should be pretty easy because of the way those values are stored. As long as you were able to specify which columns had data about the individual people and which columns had dates, I don't see any reason why you wouldn't be able to parse a spreadsheet with that basic structure.

Spekkio
Sep 23, 2005

Really satisfying music!

Chunjee posted:

Actually the color is readable. Interior.Color Property :smug:


This is probably how I would do it so I'm not 100% sure what is being requested.

I was hoping for something more packaged and re-usable. Looking at the spreadsheets again today I'm realising they're just too inconsistent between each department. For example:

Sheet 1:


Sheet 2:


Thanks for the help though.

Sir_Substance
Dec 13, 2013
Jesus christ, those look like they were made with crayons.

Peanut and the Gang
Aug 24, 2009

by exmarx

Sir_Substance posted:

Jesus christ, those look like they were made with crayons.

Whoever they are, they're really good at coloring inside the lines.

GreatGreen
Jul 3, 2007
That's not what gaslighting means you hyperbolic dipshit.
I'm using Windows 7 and have pinned a bunch of apps to the taskbar. I would love an app that always keeps the open apps grouped to the left and the unopened apps grouped to the right. Opening or closing apps would send them back to the respective "open" or "closed" group and here's the kicker, they would retain their original order.

for example, if my taskbar with everything closed looks like this:

[ start ] [ firefox ] [ calc] [ notepad ] [ cmd.exe ]

when I open the calculator and cmd.exe, I'd like the taskbar to now look like this (bold means open):

[start] [ calc ] [ cmd.exe ] [ firefox ] [ notepad ]

then if I closed the calculator, it would change to look like this:

[start] [ cmd.exe ] [ firefox ] [ calc] [ notepad ]

ElPipiripau
Nov 20, 2005
STOP SIGNING YOUR POSTS WITH THAT GODDAMN EMOTICON
Hi! I'm a Premiere Pro user. As you may know, sometimes you have to render what you have already edited in your timeline. This can take a few minutes and, here's the request, I would like a tiny app to watch CPU usage when it is more than, say, 80% [user specified] and if it is this way for more than %seconds%, chime a %sound% when CPU goes back down to < 10% of usage (so i can know when rendering is finished).

This could be wonderful if I can define what aplication (like Premiere or AfterEffects) are running when this app play the sound.

Thanks in advance!

Flipperwaldt
Nov 11, 2011

Won't somebody think of the starving hamsters in China?



ElPipiripau posted:

Hi! I'm a Premiere Pro user. As you may know, sometimes you have to render what you have already edited in your timeline. This can take a few minutes and, here's the request, I would like a tiny app to watch CPU usage when it is more than, say, 80% [user specified] and if it is this way for more than %seconds%, chime a %sound% when CPU goes back down to < 10% of usage (so i can know when rendering is finished).

This could be wonderful if I can define what aplication (like Premiere or AfterEffects) are running when this app play the sound.

Thanks in advance!
You'll get most of the way with Shutter.

Jo
Jan 24, 2005

:allears:
Soiled Meat

ElPipiripau posted:

Hi! I'm a Premiere Pro user. As you may know, sometimes you have to render what you have already edited in your timeline. This can take a few minutes and, here's the request, I would like a tiny app to watch CPU usage when it is more than, say, 80% [user specified] and if it is this way for more than %seconds%, chime a %sound% when CPU goes back down to < 10% of usage (so i can know when rendering is finished).

This could be wonderful if I can define what aplication (like Premiere or AfterEffects) are running when this app play the sound.

Thanks in advance!

Are you a Windows user? What version? Do you have Java or Python installed, or do you want a native app? Can it run from the console or do you want something with a GUI?

ElPipiripau
Nov 20, 2005
STOP SIGNING YOUR POSTS WITH THAT GODDAMN EMOTICON

Jo posted:

Are you a Windows user? What version? Do you have Java or Python installed, or do you want a native app? Can it run from the console or do you want something with a GUI?

Sorry, yes, i'm a Windows 7 user. I have Java installed but a native app would be better. A simple GUI would be great and able to reside on traybar (where Windows clock is located). Thanks.

ElPipiripau
Nov 20, 2005
STOP SIGNING YOUR POSTS WITH THAT GODDAMN EMOTICON

Flipperwaldt posted:

You'll get most of the way with Shutter.

Thanks for your suggestion, Flippewaldt, that app would be perfect but it does not work the way i need. You see, you can specify CPU usage (above or below a percentage) and the time and you will hear a sound. But i need the event FIRST to wait until CPU usage is, for example, above 85% for more than "x" seconds and THEN monitor it until it goes back below 10%. Then BEEP.

Shutter's great, but it only monitor if CPU goes above or below a % for %seconds and then beeps. It is missing a step required in my proccess, described above.

Great app, tho. Thanks.

Flipperwaldt
Nov 11, 2011

Won't somebody think of the starving hamsters in China?



ElPipiripau posted:

Thanks for your suggestion, Flippewaldt, that app would be perfect but it does not work the way i need. You see, you can specify CPU usage (above or below a percentage) and the time and you will hear a sound. But i need the event FIRST to wait until CPU usage is, for example, above 85% for more than "x" seconds and THEN monitor it until it goes back below 10%. Then BEEP.

Shutter's great, but it only monitor if CPU goes above or below a % for %seconds and then beeps. It is missing a step required in my proccess, described above.

Great app, tho. Thanks.
You can make presets. These presets can be triggered from the command line.

You make one preset that waits for the cpu usage to go above x1% for t1 seconds. Have it trigger another instance of Shutter running the other preset and have it wait for its execution to end. Then let it trigger your alarm. Then make it restart events (if that's what you want).

The other preset waits for the cpu usage to go below x2% for t2 seconds and then closes its own window.

This seems to work, though you'll have to click through the popup confirmation that you know it's for non-commercial use and blah blah the first run for each concurrent window. After that, it just does what it's supposed to, apparently, and hopefully without ever bothering you again with that.

You can possibly do the same thing more reliably if the rendering process has its own progress window and you can monitor for the window title to exist/stop existing, by the way.

Jo
Jan 24, 2005

:allears:
Soiled Meat

ElPipiripau posted:

Sorry, yes, i'm a Windows 7 user. I have Java installed but a native app would be better. A simple GUI would be great and able to reside on traybar (where Windows clock is located). Thanks.

I haven't had the time to take a pass at this yet, but I still would like to. (Not sure if I'll get to it tonight.) If the Shutter setup doesn't work for you and you still want a half-assed solution, PM me.

Chunjee
Oct 27, 2004

ElPipiripau posted:

Hi! I'm a Premiere Pro user. As you may know, sometimes you have to render what you have already edited in your timeline. This can take a few minutes and, here's the request, I would like a tiny app to watch CPU usage when it is more than, say, 80% [user specified] and if it is this way for more than %seconds%, chime a %sound% when CPU goes back down to < 10% of usage (so i can know when rendering is finished).

This could be wonderful if I can define what aplication (like Premiere or AfterEffects) are running when this app play the sound.

Thanks in advance!

Kinda took a shortcut and did average CPU instead of (Above [X] for [Y] seconds). But it only took me 45 mins or so. Could use archives or a title if you are so inclined.
Not much testing as I don't have anything to push my CPU here. I had to set the high to 6% and the low to 4% :sweatdrop:

CPU Idle Monitor
- Settings are in config.ini
- Will play .wav or .mp3 (mp3 requires codecs?)
- Right click task tray icon and choose "Quit" to exit
- 32 bit
- Can also play a sound when CPU goes above the set value. set to blank if not needed
- Source code is included in the .zip


Heres the core idea:
code:
	If (Toggle_Active = True)
	{
	CPU_Percent := CPULoad()
	Fn_InsertAverage(CPUAverage_Array, Options_TriggerHighUseSeconds, CPU_Percent)
	
	The_Average := Fn_GetAverage(CPUAverage_Array)
	
		If(The_Average >= Options_HighCPU && Trigger_HighCPU = False)
		{
		Trigger_HighCPU := True
		SoundPlay, %Options_HighCPUSound%, wait
		}
		
		If(The_Average <= Options_LowCPU && Trigger_HighCPU = True)
		{
		Trigger_HighCPU := False
		SoundPlay, %A_ScriptDir%\%Options_LowCPUSound%, wait
		}
	}

ElPipiripau
Nov 20, 2005
STOP SIGNING YOUR POSTS WITH THAT GODDAMN EMOTICON

Chunjee posted:

Kinda took a shortcut and did average CPU instead of (Above [X] for [Y] seconds). But it only took me 45 mins or so. Could use archives or a title if you are so inclined.
Not much testing as I don't have anything to push my CPU here. I had to set the high to 6% and the low to 4% :sweatdrop:

CPU Idle Monitor
- Settings are in config.ini
- Will play .wav or .mp3 (mp3 requires codecs?)
- Right click task tray icon and choose "Quit" to exit
- 32 bit
- Can also play a sound when CPU goes above the set value. set to blank if not needed
- Source code is included in the .zip


Heres the core idea:
code:
	If (Toggle_Active = True)
	{
	CPU_Percent := CPULoad()
	Fn_InsertAverage(CPUAverage_Array, Options_TriggerHighUseSeconds, CPU_Percent)
	
	The_Average := Fn_GetAverage(CPUAverage_Array)
	
		If(The_Average >= Options_HighCPU && Trigger_HighCPU = False)
		{
		Trigger_HighCPU := True
		SoundPlay, %Options_HighCPUSound%, wait
		}
		
		If(The_Average <= Options_LowCPU && Trigger_HighCPU = True)
		{
		Trigger_HighCPU := False
		SoundPlay, %A_ScriptDir%\%Options_LowCPUSound%, wait
		}
	}

Hey! Thanks so much, works like a charm! I don't know what do you mean about averaging the CPU load but it works. Also, BTTF audio clips makes me happy :)

I don't know if this is asking too much, but can you make it so user can define what applications to watch for loading the CPU? For example, watch for Premiere loading the CPU but not After Effects? If you can't, no problem. Is it pretty good as it is.

Thank you again!

Sir_Substance
Dec 13, 2013

ElPipiripau posted:

I don't know if this is asking too much, but can you make it so user can define what applications to watch for loading the CPU? For example, watch for Premiere loading the CPU but not After Effects? If you can't, no problem. Is it pretty good as it is.

Just so you know, depending on what language he wrote it in, that might be a lot harder then just detecting CPU levels, but for what it's worth, I think you'd actually find that less helpful then a global setting. The CPU level settings would be way more finicky.

Chunjee
Oct 27, 2004

Unless I can find a library that shows the CPU usage of specific applications, it would be hard. But I can easily see what window the user has active, or has open in the background. Are you jumping between Premiere and Effects while the prerendering is taking place? If you just work on other things inside Premiere; I could easily only have it check while [Program] is active.

Glad you like it. :D


ElPipiripau posted:

Hey! Thanks so much, works like a charm! I don't know what do you mean about averaging the CPU load but it works.

Instead of checking that the CPU has been above [X] percent consecutively; we insert the CPU use into an array every one second then average it out over the user specified amount of seconds. So a set of CPU usage that looks like 100%,99%,55%,80% would average to 83%; while that would fail to consecutively be above 80%, it was easier for me to do at the time and I felt it had the advantage of still triggering if the CPU use drops for just one of the snapshots since CPUs usage seems to like to jump around wildly, though maybe this has improved with the use of more cores.

Now that I'm sitting and thinking about it; the average would be best for low_CPU checking and a consecutive might be best (and really not as hard as I imagined; just check what the lowest value in the array is) for high_CPU.

Chunjee fucked around with this message at 15:25 on Oct 14, 2014

ElPipiripau
Nov 20, 2005
STOP SIGNING YOUR POSTS WITH THAT GODDAMN EMOTICON

Chunjee posted:

Unless I can find a library that shows the CPU usage of specific applications, it would be hard. But I can easily see what window the user has active, or has open in the background. Are you jumping between Premiere and Effects while the prerendering is taking place? If you just work on other things inside Premiere; I could easily only have it check while [Program] is active.

Glad you like it. :D


Instead of checking that the CPU has been above [X] percent consecutively; we insert the CPU use into an array every one second then average it out over the user specified amount of seconds. So a set of CPU usage that looks like 100%,99%,55%,80% would average to 83%; while that would fail to consecutively be above 80%, it was easier for me to do at the time and I felt it had the advantage of still triggering if the CPU use drops for just one of the snapshots since CPUs usage seems to like to jump around wildly, though maybe this has improved with the use of more cores.

Now that I'm sitting and thinking about it; the average would be best for low_CPU checking and a consecutive might be best (and really not as hard as I imagined) for high_CPU.

Nice aproach. I'm using your application already, thanks again!

Peanut and the Gang
Aug 24, 2009

by exmarx
Can someone make a script to export SomethingAwful PM's into html? It'll load all your sent and received messages, put them all together into one big Html file (or just the html content in a textbox) ordered by date. It'll remove sigs, and have proper indication of who sent and received each message, which link to their profile. And also put noticeable dividers betwix each message. It doesn't need to fix broken quotes, but maybe have the bbcode for each message in a data attr or something if that's do-able.
This can be a greasemonkey. It doesn't have to be some Php thinger.
Thankies!

Edit: Maybe a json output too so peeps can load in and format messages how they want.

BurgerQuest
Mar 17, 2009

by Jeffrey of YOSPOS
Admit it, you're writing a collaborative novel via PM.

Peanut and the Gang
Aug 24, 2009

by exmarx

BurgerQuest posted:

Admit it, you're writing a collaborative novel via PM.

:blush:

Btw if anyone's working on this, please let me know. Otherwise I'll just make it when/if I get some free time at work.

some_admin
Oct 11, 2011

Grimey Drawer
How hard will it be for me to make or have made an iphone app that will do the following for me?
I need the screen to display solid green (indicating that the noise levels is below "A" setting)
display yellow (indicating noise level between "A" and "B"
display red (indicating noise level "C"

Basically I want to use my iphone to display a visual alarm according to how loud the room is, like a VU meter.
This is to use at band practice so everybody knows we have gotten too loud.
So say 80db is A, 86 is B, 92 is C, and leave it on the floor or table where everyone can see it.

NtotheTC
Dec 31, 2007


some_admin posted:

How hard will it be for me to make or have made an iphone app that will do the following for me?
I need the screen to display solid green (indicating that the noise levels is below "A" setting)
display yellow (indicating noise level between "A" and "B"
display red (indicating noise level "C"

Basically I want to use my iphone to display a visual alarm according to how loud the room is, like a VU meter.
This is to use at band practice so everybody knows we have gotten too loud.
So say 80db is A, 86 is B, 92 is C, and leave it on the floor or table where everyone can see it.

I would be shocked if something like this doesn't already exist

e: https://itunes.apple.com/us/app/db-meter-free/id635309215?mt=8

NtotheTC fucked around with this message at 15:40 on Nov 9, 2014

xenilk
Apr 17, 2004

ERRYDAY I BE SPLIT-TONING! Honestly, its the only skill I got other than shooting the back of women and calling it "Editorial".
I have a Google Form that feeds an online Google Spreadsheet.

Basically the form asks for data related to a receipt (Name of business, Amount, Date of receipt) which then feeds the Spreadsheet (fairly straight forward)

I want to do monthly summaries but I can't wrap my head around it (mainly because of inexperience when it comes to spreadsheets). Google doesn't seem to help and while I thought pivot table could be an option I can't figure out to do the right filter.

If anyone can point me to the right direction that would be awesome :)

Schweinhund
Oct 23, 2004

:derp:   :kayak:                                     
Can someone write a greasemonkey script that puts a link that shows all your posts in a thread on every page of every forum thread on this forum? In other words for this thread there would be this link for me at the top of the page in the post/reply bar preferably:

http://forums.somethingawful.com/showthread.php?threadid=2415898&userid=67042

I requested this multiple times via lowtax and via SALR but it never gets added despite it being a simple useful feature IMO. It doesn't have to automatically detect my userid, I can enter that manually into the script since I think that is the hardest part of this.

the littlest prince
Sep 23, 2006


Schweinhund posted:

Can someone write a greasemonkey script that puts a link that shows all your posts in a thread on every page of every forum thread on this forum? In other words for this thread there would be this link for me at the top of the page in the post/reply bar preferably:

http://forums.somethingawful.com/showthread.php?threadid=2415898&userid=67042

I requested this multiple times via lowtax and via SALR but it never gets added despite it being a simple useful feature IMO. It doesn't have to automatically detect my userid, I can enter that manually into the script since I think that is the hardest part of this.

code:
// ==UserScript==
// @name        sa_allposts
// @namespace   com.sa
// @include     *forums.somethingawful.com/showthread.php*
// @version     1
// @grant       none
// ==/UserScript==

var userid = 67042;

var url = window.location;

var argStart = url.toString().indexOf('threadid');
var argEnd = url.toString().indexOf('&', argStart);
var tid = url.toString().substring(argStart+'threadid'.length+1, argEnd)

var link = '<a href="showthread.php?threadid=' + tid + '&userid=' + userid +'">Check Out All My lovely Posts</a>';
$('div.top ul.postbuttons li:nth-child(2)').before(link);
$('div.bottom ul.postbuttons li:nth-child(1)').before(link);

Schweinhund
Oct 23, 2004

:derp:   :kayak:                                     
Works great, thank you!

Adbot
ADBOT LOVES YOU

Ceros_X
Aug 6, 2006

U.S. Marine

the littlest prince posted:

code:
// ==UserScript==
// @name        sa_allposts
// @namespace   com.sa
// @include     *forums.somethingawful.com/showthread.php*
// @version     1
// @grant       none
// ==/UserScript==

var userid = 67042;

var url = window.location;

var argStart = url.toString().indexOf('threadid');
var argEnd = url.toString().indexOf('&', argStart);
var tid = url.toString().substring(argStart+'threadid'.length+1, argEnd)

var link = '<a href="showthread.php?threadid=' + tid + '&userid=' + userid +'">Check Out All My lovely Posts</a>';
$('div.top ul.postbuttons li:nth-child(2)').before(link);
$('div.bottom ul.postbuttons li:nth-child(1)').before(link);


This works for me on this thread, but when I try it on some other forum threads I get an error "Specified thread was not found in the live forums. " and clicking the embedded link goes to http://forums.somethingawful.com/showthread.php?threadid=http://forums.somethingawful.com/showthread.php?threadid=&userid=101247 (userID changed to my user ID).

I think perhaps I installed it wrong but it seems to work on this page sooo... Neat script, it really would come in handy quite often.

  • Locked thread