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. #### Ceros_X posted: 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. It didn't work because the script expects there to be a & in the URL after the threadid part. If it doesn't (when you're on the first page of a thread, for example) it results in the malformed URL you got. So here's a corrected version. Also removed jQuery usage because Firefox didn't like that. ##### JavaScript code: // ==UserScript== // @name sa_allposts // @namespace com.sa // @include *forums.somethingawful.com/showthread.php* // @version 1.1 // @grant none // ==/UserScript== var userid = 169765; var tid = window.location.toString().match(/threadid=(\d+)/)[1]; var link = '<a href="showthread.php?threadid=' + tid + '&userid=' + userid +'">Check Out All My lovely Posts</a>'; var topButtons = document.querySelector('div.top ul.postbuttons li:nth-child(2)'); topButtons.insertAdjacentHTML('beforebegin', link); var bottomButtons = document.querySelector('div.bottom ul.postbuttons li:nth-child(1)'); bottomButtons.insertAdjacentHTML('beforebegin', link); Pollyzoid fucked around with this message at 12:03 on Nov 25, 2014  Adbot ADBOT LOVES YOU # ? Sep 26, 2022 12:16 #### Pollyzoid posted: It didn't work because the script expects there to be a & in the URL after the threadid part. If it doesn't (when you're on the first page of a thread, for example) it results in the malformed URL you got. So here's a corrected version. Also removed jQuery usage because Firefox didn't like that. ##### JavaScript code: // ==UserScript== // @name sa_allposts // @namespace com.sa // @include *forums.somethingawful.com/showthread.php* // @version 1.1 // @grant none // ==/UserScript== var userid = 169765; var tid = window.location.toString().match(/threadid=(\d+)/)[1]; var link = '<a href="showthread.php?threadid=' + tid + '&userid=' + userid +'">Check Out All My lovely Posts</a>'; var topButtons = document.querySelector('div.top ul.postbuttons li:nth-child(2)'); topButtons.insertAdjacentHTML('beforebegin', link); var bottomButtons = document.querySelector('div.bottom ul.postbuttons li:nth-child(1)'); bottomButtons.insertAdjacentHTML('beforebegin', link); You da man, works like a champ. Thanks! I was browsing a youtube-heavy thread on a slower machine the other day and it sucked bigtime. I switched the SA user option for video bb-code elements from embedded videos to just links and that was obviously faster, but ruined the point of the thread anyway. I started on this to convert the plain links to thumbnails: ##### code: // ==UserScript== // @name SA YT Links Thumbed // @namespace [url]http://*.somethingawful.com[/url] // @description Uses YT links to show thumbnails // @include [url]http://forums.somethingawful.com/*[/url] // @version 0.1 // @grant none // ==/UserScript== var vidList = document.getElementsByClassName('bbtag_video'); for (var i = 0; i < vidList.length; i++) { var p = /^.*youtube\.com\/watch\?v=([a-zA-Z0-9_-]{11}).*$/;
var vidId = (vidList[i].innerHTML.match(p));
if (vidId[1] == false) continue;
var image = document.createElement('img');
image.setAttribute('src', 'http://img.youtube.com/vi/' + vidId[1] + '/hqdefault.jpg');
vidList[i].innerHTML = '';
vidList[i].appendChild(image);
}
and it seems to work fine, but opening the link in a new tab is unsatisfying, too, and the image doesn't have a caption from the video title.

I can live without the thumbnail having a caption, but for some reason my attempts at removing the href of the link and instead using an onclick to have the element replace itself with something like this (let alone having it autoplay) is failing:
Would someone else like to take a crack at this? I'm surprised I didn't find a ready-made solution for converting Youtube text links to thumbnails on page load and to an embedded player on click.

 m2pt5 May 18, 2005 THAT GOD DAMN MOSQUITO JUST KEEPS COMING BACK It's not 100% what you're asking for but have you tried Youtube Link Title? # ? Dec 19, 2014 00:37
 gary oldmans diary Sep 26, 2005 That works great, thanks! I'll probably tinker with it just to switch around it displaying text with the thumbnail on hover. gary oldmans diary fucked around with this message at 01:09 on Dec 19, 2014 # ? Dec 19, 2014 01:05
 Sebbe Feb 29, 2004 In the same vein, there's also my extension Video Title Adder (if you use Chrome). (Though, no automatic conversion to thumbnails; it displays thumbnails on hover, though.) # ? Dec 21, 2014 00:13
 politicorific Sep 15, 2007 I'm not sure what keywords to use to find the program I need, but here's what I'm looking for: I have about 30GB of pictures going back about 15 years. Since I got a smart phone, it's become an unsorted mess. Using a mouse/touchpad or finder is too much work to get everything sorted. I want a program that displays a random photo, and be able to move it into a predefined folder. For example "Kenya Vacation", "Food", "Soccer Games", "Nature photos". Pressing the key 1, puts it in "Kenya Vacation". Pressing 3 puts it in "Food" and so on. One more key puts it in a "sort again with new categories" folder. A "too be deleted" folder would also be good. Does this exist? How about for OS X? # ? Dec 21, 2014 12:46
 Nam Taf Jun 25, 2005 I am Fat Man, hear me roar! Can you not just view them in a folder, sorted by date taken/date modified/GPS coordinates if available, and use that to quickly group them? That seems to me like it would be far faster than what you're thinking of. # ? Dec 21, 2014 13:52
 the littlest prince Sep 23, 2006 Plus, you're going to see a lot of random pictures without enough context in them to tell you where they came from. I guess you could show the date taken and maybe location, but still it probably wouldn't be enough. Google plus can autosort pictures sometimes. You could try syncing them to that. Of course that's a lot of data to sync and it wouldn't end up on your own computer. # ? Dec 21, 2014 14:41
 Flipperwaldt Nov 11, 2011 Won't somebody think of the starving hamsters in China? PhotoSift seems to be exactly the sort of thing he's looking for, except that it's for Windows. Would be a cool Android/iOS tablet app though, where it shows you the picture surrounded by a rectangular frame containing different target (network) folders. You could just swipe every picture in the right direction. Or buttons with customizable EXIF tags you could drag on top of the photo or something. Maybe that exists already, I don't know. I mean, that's if it's all so disorganised that you need to go through every photo one by one. There's probably still a lot that can be deduced from date taken as was suggested. e vvvv Yeah ok, that needs manual intervention. Flipperwaldt fucked around with this message at 15:52 on Dec 21, 2014 # ? Dec 21, 2014 15:43
 politicorific Sep 15, 2007 Real categories would be: "Selfies" "Food I made" "Electronics projects" "Building Photos" "Engrish" And the big one: "Pictures with ex girlfriends" My "photo stream" on my iPhone/iPad is a giant mixture. I tend to just dump photos off my phone into folders entitled "March 2014"; prior to getting a MacBook with iPhoto I would just periodically download my dropbox camera backup folder and then wipe out everything on my phone. # ? Dec 21, 2014 15:49

#### Flipperwaldt posted:

PhotoSift seems to be exactly the sort of thing he's looking for, except that it's for Windows.

Exactly what I'm looking for! Now the question is whether I install bootcamp just for this or borrow a friend's computer

 Flipperwaldt Nov 11, 2011 Won't somebody think of the starving hamsters in China? I cannot even make a proper assessment whether I'm wasting your time with this or what, because I have no idea what I'm talking about when it comes to Macs, but there's a pre-alpha build of Wine for OSX here. The sifter program might just be simple enough that it works in that. # ? Dec 21, 2014 16:17
 PPills Oct 5, 2004 I am looking for a chrome extension that can highlight multiple phrases, not just multiple words. https://chrome.google.com/webstore/detail/multi-highlight/pfgfgjlejbbpfmcfjhdmikihihddeeji?hl=en-US Multi-Highlight claims that it will support it in version 2.0 but it hasn't been updated since February 2014. # ? Jan 8, 2015 04:17
 Knifegrab Jul 30, 2014 Gadzooks! I'm terrified of this little child who is going to stab me with a knife. I must wrest the knife away from his control and therefore gain the upperhand. I was wondering if there were an app that could dim my monitors after I go idle for a set amount of time. Windows recently removed this functionality from 8.1. # ? Jan 9, 2015 19:09
 Chunjee Oct 27, 2004 PowerDimmer http://www.whitsoftdev.com/powerdimmer/ might work. It has to be installed as a screensaver. According to google searches; put it in C:\Windows\SysWOW64 on a 64-bit system. # ? Jan 9, 2015 21:01

#### Chunjee posted:

PowerDimmer http://www.whitsoftdev.com/powerdimmer/ might work. It has to be installed as a screensaver. According to google searches; put it in C:\Windows\SysWOW64 on a 64-bit system.

Unfortunately I want the program to work so when my custom screensaver comes on it is dimmer, so it cannot replace my screensaver. Thank you though.

 Chunjee Oct 27, 2004 If there isn't a good solution; tomorrow I will have time to try something. But are we talking about controlling the LCD backlight? Not sure how to do that but I do know how to overlay a transparent black box over the screen. # ? Jan 9, 2015 23:26

#### Chunjee posted:

If there isn't a good solution; tomorrow I will have time to try something. But are we talking about controlling the LCD backlight? Not sure how to do that but I do know how to overlay a transparent black box over the screen.

Not sure if that will apply the same type of effect but if you want to try I'd certainly appreciate it! Ideally lowering the backlight is what I am after.

 PleasureKevin Jan 2, 2011 Request: a Brackets plugin (Node/Javascript) to change the Ctrl+Tab/Ctrl+Shift+Tab behaviour so that it navigates between tabs from left-to-right or vice versa, rather than in whatever hosed up order it goes now. Let me just write this like a bug report so it's super clear. Reproduction Open Brackets Install a "file tabs" plugin (Brackets doesn't have native tabs rofl) open several files Press Ctrl+tab or Ctrl+shift+tab Expected The next tab to the right or left of the active tab should be selected. Actual The next tab selected when pressing Ctrl+tab will not be the tab to the right of the current active tab. It will be the next tab in the vertical list of files in the top right corner. Basically the same way most web browsers and Atom do it. I'm trying to suffer through Brackets because of the node-theseus debugging system for Node. You could also just recommend me something superior to that in another editor. Here's some current related projects if you want to just add to that: https://github.com/dnbard/brackets-documents-toolbar https://github.com/ohnnyj/brackets-numbertabs # ? Feb 3, 2015 02:25
 gary oldmans diary Sep 26, 2005 This seems like a good start: https://github.com/peterflynn/brackets-editor-nav # ? Feb 3, 2015 15:39
 PleasureKevin Jan 2, 2011 Well, that makes switching tabs a lot slower, and that's about it. # ? Feb 4, 2015 21:07
 gary oldmans diary Sep 26, 2005 Could someone make a cli app that accomplishes essentially nothing, but simply completes successfully after being piped exactly 1 line of (any) text? It's small, but I can't find a utility that fills this role. Say I have a great scripted program awesome.exe running days on end doing good work that sometimes let's you know it's about to waste time and screw up some data only by sending "Warning!!!" to stdout and it's own error handling is nonexistent otherwise. I noticed string filtering programs don't necessarily wait for the program to complete and work following along while the main program works, so what I would really like to have is a program I could fit in like this: awesome.exe | findstr.exe /i "warning!" | pokedwithastick.exe && taskkill.exe /im awesome.exe /f && echo The day is saved I tried: awesome.exe | for /f "delims=" %%W in ('findstr.exe /I "warning"') do taskkill.exe /im awesome.exe /f and it's ineffective and awkward. I thought this might work: awesome.exe | findstr.exe /I "warning" 1>&2 | taskkill.exe /im awesome.exe /f but there's no delay and redirecting ... nothing (?) to taskkill.exe just instantly runs it because it isn't that kind of program. Actually, I really don't even know if what I want would work either, but it's compelling. gary oldmans diary fucked around with this message at 02:52 on Feb 12, 2015 # ? Feb 12, 2015 02:40
I will counter with a PowerShell script instead of a separate program:
##### code:
$startInfo = New-Object System.Diagnostics.ProcessStartInfo$startInfo.FileName = "awesome.exe"
$startInfo.Arguments = ""$startInfo.UseShellExecute = $false$startInfo.RedirectStandardOutput = $true$process = [System.Diagnostics.Process]::Start($startInfo) while ($process.HasExited -eq $false) {$outputLine = $process.StandardOutput.ReadLine() if ($outputLine -ne $null) {$outputLine # Pass the output to the console
if ($outputLine.Contains("warning!")) {$process.Kill()
"The day is saved"
break
}
}
else
{
# Wait check for more output
Start-Sleep -s 1
}
}

Basically, this runs your program and captures the standard output from the process. It still echos the output to the console, but it examines each line and will kill the process if the line contains "Warning!".

e: You might also have to redirect standard error, depending on how the message is reported.

#### Knifegrab posted:

Unfortunately I want the program to work so when my custom screensaver comes on it is dimmer, so it cannot replace my screensaver. Thank you though.
While searching for a laptop extended monitor I ran into these in Amazon comments:

Dimmer v1, v2 - http://www.nelsonpires.com/software/dimmer/
Monitor-Brightness-Reducer - http://www.tucows.com/preview/513016/Monitor-Brightness-Reducer

 Srebrenica Surprise Aug 23, 2008 "L-O-V-E's just another word I never learned to pronounce." I work as a volunteer scanning documents and I could really use a program that essentially just lists files in subdirectories so I could dump them in an Excel cell next to the information for each document. I've been using Directory List and Print or something and even the pro version doesn't do what I want, bizarrely, requiring me to use an online tool to remove line breaks, and reformat stuff, remove thumbs.db, etc by hand. Essentially, it just needs to iterate through subdirectories and spit out a text file with a list of files (no paths, just files) separated by semicolons and with each subdirectory on a new line. Ideally it would skip thumbs.db. So something like this directory structure: C:\Blah\1995\Blah - January 1995.jpg C:\Blah\1995\Blah - February 1995.jpg C:\Blah\1995\Blah - March 1995.jpg C:\Blah\1996\Blah - January 1996.jpg C:\Blah\1996\Blah - February 1996.jpg C:\Blah\1996\Blah - March 1996.jpg would output as a text file like this: Blah - January 1995.jpg;Blah - February 1995.jpg;Blah - March 1995.jpg Blah - January 1996.jpg;Blah - February 1996.jpg;Blah - March 1996.jpg Then I could copy all the lines into Excel starting at the appropriate row. Any help or suggestions? # ? May 26, 2015 00:57
Something like this?

##### code:
import os
import sys

def listfiles(start):
for dirname, dirnames, filenames in os.walk(start):
directory = ''
for filename in filenames:
if filename is 'thumbs.db':
continue
directory += filename + ';'
directory = directory.rstrip(';')
print directory

def main():
try:
listfiles(sys.argv[1])
except IndexError:
print 'usage: python listfile.py C:\path\\to\\folder'

if __name__ == '__main__':
main()
Install Python 2.7, create a file named listfile.py with the contents of the code block above, open a terminal, drag the python file to it (the path to the file will auto complete) and then drag the parent folder.

ex: C:\PythonFolder\listfiles.py C:\path\to\directory

#### Srebrenica Surprise posted:

Any help or suggestions?
A basic windows script.

Setlocal EnableDelayedExpansion
for /f "delims=" %%D IN ('dir /b /s /ad "C:\blah"') DO (
set "BUTT= "
for /f "delims=" %%F IN ('dir /b /a-d /o-n "%%D"') DO SET "BUTT=%%F;%%BUTT%%"
)

I don't have time to test this. Requesting review.

 Srebrenica Surprise Aug 23, 2008 "L-O-V-E's just another word I never learned to pronounce." I'll try them both out tomorrow at work, thanks! # ? May 26, 2015 05:46
 Ceros_X Aug 6, 2006 U.S. Marine Does anyone know of an app where you can get take a list of file or folder names from an excel doc (or notepad list or whatever) and feed it into a program that would then (when pointed at the right directory) copy those files/folders to another directory? This is probably pretty niche usage but it would be super useful for what I am trying to do, any leads would be great. Ceros_X fucked around with this message at 20:33 on Jun 21, 2015 # ? Jun 21, 2015 20:27

#### Ceros_X posted:

Does anyone know of an app where you can get take a list of file or folder names from an excel doc (or notepad list or whatever) and feed it into a program that would then (when pointed at the right directory) copy those files/folders to another directory? This is probably pretty niche usage but it would be super useful for what I am trying to do, any leads would be great.
If you're on Linux or Mac, this is pretty easy with a bash one-liner. On windows if you can install Cygwin this should work as well:

##### code:
for file in $(<list_of_files.txt); do cp -r "$file" destination_folder_path; done

#### Trapick posted:

If you're on Linux or Mac, this is pretty easy with a bash one-liner. On windows if you can install Cygwin this should work as well:

##### code:
for file in $(<list_of_files.txt); do cp -r "$file" destination_folder_path; done

So this would be limited to file names only? I guess I could use Find and Replace to rename all of the file contents from folder names and then use this. Would this try and copy, say, 200 files sequentially or simultaneously?

edit: looks like -r means recursive and will get files inside a directory, so I might be able to leave the file names as is..

Ceros_X fucked around with this message at 21:11 on Jun 21, 2015

If you're on Windows, you don't have to bother with Cygwin unless you want it anyways -- use PowerShell instead:
Get-Content files.txt | Foreach-Object { Copy-Item -Recurse $_ C:\Some\DestinationFolder } #### Ceros_X posted: So this would be limited to file names only? I guess I could use Find and Replace to rename all of the file contents from folder names and then use this. Would this try and copy, say, 200 files sequentially or simultaneously? edit: looks like -r means recursive and will get files inside a directory, so I might be able to leave the file names as is.. Yeah, that would take a list of file or folder names. And as you found cp -r recursively copies, so that would copy the whole directory if you gave it a folder name. It would be sequential for each file/folder name (the for loop won't move to the next until the copy is done), I'm not sure of the internals of 'cp' but suspect it's sequential as well.  Corla Plankun May 8, 2007 improve the lives of everyone How hard would it be to alter my laptop's sound card driver to lower the gain on the audio? The lowest notch on the volume is still way too loud for my headphones and there is apparently no way to fix this in the OS. # ? Aug 15, 2015 17:13  gary oldmans diary Sep 26, 2005 Before adjusting volume with Volume Mixer, did you set the highest volume you would like for the device in Control Panel > Sound > (Device) > Properties > Levels ? # ? Aug 15, 2015 22:29 #### gary oldmans diary posted: Before adjusting volume with Volume Mixer, did you set the highest volume you would like for the device in Control Panel > Sound > (Device) > Properties > Levels ? Device properties are driver-dependent and on my laptop the only thing in that tab is a slider that maps 1-to-1 with the regular volume control slider. #### Mario posted: If you're on Windows, you don't have to bother with Cygwin unless you want it anyways -- use PowerShell instead: ##### code: Get-Content files.txt | Foreach-Object { Copy-Item -Recurse$_ C:\Some\DestinationFolder }

This is a late reply but I wound up using this (I am lazy and powershell is indeed installed on Windows 7 lol) to copy about 100 movies from one hard drive to another. Having used it, I ran into several weird issues and bugs.

If there is a bracket in the folder name it does not coy the folder. If there is a bracket in a file name, it copes the file without issue. [And without reporting an error or a failure to copy] If a subdirectory of a folder has a bracket in the name it is parsed like normal.
##### code:
\AFTER EARTH [2013]\ -> Skipped, with all files inside
\HANGOVER, THE 1-3\Hangover 3, The [2013] [Hardsubs] -> Copied without issue

The Directory lister program I used to make a list of folders capitalized the output - the folder names PowerShell created were all upper cased regardless of the case of the actual folder. The files inside retained their capitalization.

##### code:
About Last Night -> ABOUT LAST NIGHT
Not a huge issue, thought you might be interested in the trip report. I'll try the Cygwin method next time. Appreciate the advice!

Ceros_X fucked around with this message at 18:57 on Sep 8, 2015

#### Corla Plankun posted:

Device properties are driver-dependent and on my laptop the only thing in that tab is a slider that maps 1-to-1 with the regular volume control slider.

This seems to be the behavior of the default windows drivers, it's the same on my thinkpad. Maybe try installing vendor-supplied drivers in case they have more options?