topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday November 13, 2025, 1:14 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Recent Posts

Pages: prev1 ... 92 93 94 95 96 [97] 98 99 100 101 102 ... 225next
2401
General Software Discussion / Re: which forums you use for PC troubleshooting?
« Last post by 4wd on July 13, 2014, 02:51 PM »
2402
Code: Text [Select]
  1. REM Del0Files.cmd
  2. @echo off
  3. for /f "usebackq tokens=*" %%a in (`dir /os /b /s /a-d-s-h-l "%~1\*.*"`) do (if "%%~za"=="0" del "%%~a")

Call as:

Del0Files.cmd <path>

Change the:

del "%%~a"

to:

move "%%~a" "C:\Zero\%%~na"

if you want to move instead.

Here's a recursive commandline delete empty directory that I got from StackOverflow, (IIRC):

Code: Text [Select]
  1. rem Del0Dir.cmd <directory>
  2. @echo off
  3. for /f "usebackq delims=" %%a in (`dir /ad /b /s "%~1" ^| sort /r`) do rd "%%~a" 2>NUL

For cleaning up the dirs after you delete all the files :)

Test it first, the rd should fail if the directory isn't empty thus skipping it.
2403
General Software Discussion / Re: Windows 8 Pro
« Last post by 4wd on July 12, 2014, 10:46 AM »
I have a retail product key because I bought it from Microsoft Store. The problem is that it's Windows 8 Professional x64 key. I am neither able to download Windows 8.1 Pro nor able to activate it. I keep getting the message, this key is for a different version of Windows.

That's how I got my version of Windows 8 Pro x86 and x64 licenses, from the MS Store.

If you follow the steps given in the post I refer to, (starting at point 1 which refers you to this article at MakeUseOf), you should be able to download a Windows 8.1 Pro ISO.

Looks like the ***holes at MS have neutered that particular form of ISO download now, worked for me when I did it but that was a few months ago.  It might be different if tried from a previous Windows version, (I'm running 8.1 on my netbook so that might be screwing it up), as it says you should.

There's another way but we don't mention BitTorrent around here.  :P

Basically, if you can get an 8.1 Pro ISO you can activate, (not install), with an 8.0 key.
2404
Post New Requests Here / Re: IDEA: Image Append - Batch
« Last post by 4wd on July 12, 2014, 10:37 AM »
Thanks!

Although I missed the part where the images are in pairs in sub-dirs that are named according to page.

I think I would have gone with a folder/issue with images named Page01a.jpg, Page01b.jpg, etc - would be easy to see where a snafu occurred in appending then, (eg. Page01a + Page02b.jpg =  :huh: ).
2405
Post New Requests Here / Re: IDEA: Image Append - Batch
« Last post by 4wd on July 12, 2014, 08:43 AM »
2406
General Software Discussion / Re: The art of finding
« Last post by 4wd on July 12, 2014, 03:09 AM »
FF context menu I can search using whatever engine is in the search box.  But it would be nicer to have a submenu with all the search engines or some other approach that's not cumbersome.  :)

Advanced URL Builder

Clipboard Image.png

Disclaimer: I have no idea how the torrent and NZB search engines got there
2407
Post New Requests Here / Re: IDEA: Image Append - Batch
« Last post by 4wd on July 11, 2014, 04:34 PM »
2408
General Software Discussion / Re: The art of finding
« Last post by 4wd on July 11, 2014, 10:55 AM »
Perhaps refine your search terms:

Model number "power" "specification"

eg.

HS06THB "power" "specification"

Second answer, (for me), is the spec sheet at Seagate, (who took over Samsung' HDD assets).
2409
Post New Requests Here / Re: IDEA: Image Append - Batch
« Last post by 4wd on July 11, 2014, 10:31 AM »
Here's something that might make it easier: gmMontage

It's a simple program that will generate a batch script to be used with the GraphicsMagick program, (that means you need to install GraphicsMagick).

New v0.0.0.3:
Modified GUI
A few more colour choices for the separator
Generates the batch to call GM, just double-click it
Can generate Horizontal or Vertical GM batch file, so for the OP, run it first as Vertical, then run it as Horizontal on the resultant images from the Vertical run, and you'll get:

AC
BD


gmMontage1.png

Use the Path button to select an image in the folder you want to process, if Windows can read the image file the Width and Height values will be filled in along with the Path automatically.  You can enter the Width and Height manually if necessary, (eg. Windows can't read the info from the file) - any values you enter will be overwritten if you then choose another file.

Select a separator colour from the drop down list, (I can add more if necessary), set the separator width.  The Shave checkbox lets you remove the borders that get added at the top/bottom or left/right of the final image.

After it's finished you'll get the following window:

gmMontage2.png

NOTES:
1) It outputs a PNG file, the file will be named <image1>+<image2>.png.  Thus the output is lossless but will result in larger file sizes - you can always recompress as JPG to a level that's acceptable.
2) If there's an odd number of images in the folder, the last one won't be used.
3) This was written with the constraints of the OP in mind, ie. images are all the same dimensions, orientation, and vertical/horizontal appending of two images was required.

With any luck after executing the batch file you'll get the following result:

20140601-201827+20140601-201836.jpg

Here's the source, executable attached:
Code: AutoIt [Select]
  1. #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
  2. #AutoIt3Wrapper_Res_Fileversion=0.0.0.3
  3. #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
  4. #include <File.au3>
  5. #include <FileConstants.au3>
  6. #include <MsgBoxConstants.au3>
  7. #include <GDIPlus.au3>
  8. #include <ButtonConstants.au3>
  9. #include <ComboConstants.au3>
  10. #include <EditConstants.au3>
  11. #include <GUIConstantsEx.au3>
  12. #include <StaticConstants.au3>
  13. #include <WindowsConstants.au3>
  14.  
  15. _GUISetup()
  16. _Main()
  17. _Exit()
  18.  
  19.  
  20. Func _GUISetup()
  21.         #Region ### START Koda GUI section ### Form=d:\docs\autoit\_coding snacks\gmmontage\gmmontage.kxf
  22.         $Form1 = GUICreate("gmMontage", 347, 219, 335, 196)
  23.         Global $Input1 = GUICtrlCreateInput("", 16, 16, 265, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_READONLY))
  24.         GUICtrlSetTip(-1, "Path to images to process")
  25.         Global $Button1 = GUICtrlCreateButton("Path", 296, 13, 35, 25)
  26.         GUICtrlSetTip(-1, "Select an image file in the folder to process")
  27.         Global $Input2 = GUICtrlCreateInput("", 120, 56, 65, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NUMBER))
  28.         GUICtrlSetTip(-1, "Width of the SOURCE images")
  29.         Global $Input3 = GUICtrlCreateInput("", 216, 56, 65, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NUMBER))
  30.         GUICtrlSetTip(-1, "Height of the SOURCE images")
  31.         GUICtrlCreateLabel("X", 197, 60, 11, 17)
  32.         Global $Button2 = GUICtrlCreateButton("Generate Vertical", 16, 184, 123, 25)
  33.         GUICtrlSetTip(-1, "Generate batch file for GraphicsMagick (Append Vertical)")
  34.         Global $Button3 = GUICtrlCreateButton("Generate Horizontal", 157, 183, 123, 25)
  35.         GUICtrlSetTip(-1, "Generate batch file for GraphicsMagick (Append Horizontal)")
  36.         GUICtrlCreateLabel("Image dimensions:", 16, 59, 91, 17)
  37.         GUICtrlSetTip(-1, "Dimensions of the SOURCE images")
  38.         $Group1 = GUICtrlCreateGroup("Separator", 16, 88, 265, 81)
  39.         Global $Combo1 = GUICtrlCreateCombo("BLACK", 22, 128, 121, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
  40.         GUICtrlSetData(-1, "WHITE|YELLOW|GREEN|OLIVE|BLUE|DARKBLUE|GRAY42|ORANGE|RED")
  41.         GUICtrlSetTip(-1, "Colour of the separator line between images")
  42.         Global $Input4 = GUICtrlCreateInput("0", 160, 128, 41, 21, BitOR($GUI_SS_DEFAULT_INPUT, $ES_NUMBER))
  43.         GUICtrlSetTip(-1, "Pixel width of separator line," & @CRLF & "line will be DOUBLE this value." & @CRLF & "Max value: 20")
  44.         $Updown1 = GUICtrlCreateUpdown($Input4)
  45.         GUICtrlSetLimit(-1, 20, 0)
  46.         Global $Checkbox1 = GUICtrlCreateCheckbox("Shave", 217, 129, 52, 17)
  47.         GUICtrlSetTip(-1, "Shave added pixels from unused borders")
  48.         GUICtrlCreateLabel("Colour", 63, 108, 34, 17)
  49.         GUICtrlCreateLabel("Width", 163, 108, 32, 17)
  50.         GUICtrlCreateGroup("", -99, -99, 1, 1)
  51.         GUISetState(@SW_SHOW)
  52.         #EndRegion ### END Koda GUI section ###
  53. EndFunc   ;==>_GUISetup
  54.  
  55.  
  56. Func _Main()
  57.         While 1
  58.                 $nMsg = GUIGetMsg()
  59.                 Switch $nMsg
  60.                         Case $Button1
  61.                                 Local $sTemp = FileOpenDialog("gmMontage", "", "All (*.*)", $FD_FILEMUSTEXIST + $FD_PATHMUSTEXIST)
  62.                                 If @error > 0 Then ContinueLoop
  63.                                 Global $sSrce = StringLeft($sTemp, StringInStr($sTemp, "\", 0, -1))
  64.                                 GUICtrlSetData($Input1, $sSrce)
  65.                                 Local $sTempImage = $sSrce & StringMid($sTemp, StringInStr($sTemp, "\", 0, -1) + 1)
  66.                                 Global $sExt = StringMid($sTempImage, StringInStr($sTempImage, ".", 0, -1))
  67.                                 Global $iWidth = _GetDim($sTempImage, True)
  68.                                 Global $iHeight = _GetDim($sTempImage, False)
  69.                                 GUICtrlSetData($Input2, $iWidth)
  70.                                 GUICtrlSetData($Input3, $iHeight)
  71.                         Case $Button2, $Button3
  72.                                 Global $iWidth = GUICtrlRead($Input2)
  73.                                 Global $iHeight = GUICtrlRead($Input3)
  74.                                 If $iWidth = 0 Or $iHeight = 0 Or $sSrce = "" Then
  75.                                         MsgBox($MB_ICONERROR, "gmMontage", "Check PATH, WIDTH or HEIGHT values")
  76.                                         ContinueLoop
  77.                                 EndIf
  78.                                 If GUICtrlRead($Input4) > 20 Then GUICtrlSetData($Input4, "20")
  79.                                 If $nMsg = $Button3 Then
  80.                                         _GenBatch(True)
  81.                                 Else
  82.                                         _GenBatch(False)
  83.                                 EndIf
  84.                         Case $GUI_EVENT_CLOSE
  85.                                 Exit
  86.                 EndSwitch
  87.         WEnd
  88. EndFunc   ;==>_Main
  89.  
  90.  
  91. Func _GenBatch($bTemp)
  92.         Local $sGeometry = "1x2"
  93.         Local $sOutfile = $sSrce & "gmBatch-V.txt"
  94.         If $bTemp Then
  95.                 $sGeometry = "2x1"
  96.                 $sOutfile = "gmBatch-H.txt"
  97.         EndIf
  98.         Local $bShave = (GUICtrlRead($Checkbox1) = 1)
  99.         Local $iSep = GUICtrlRead($Input4)
  100.         Local $sColour = GUICtrlRead($Combo1)
  101.         Local $sTempFile = $sSrce & "gmMontage.txt"
  102.         Local $DOScmd = "dir /b /on *" & $sExt & " > " & $sTempFile
  103.         RunWait(@ComSpec & " /c " & $DOScmd, $sSrce, @SW_HIDE)
  104.         Local $aFiles = FileReadToArray($sTempFile)
  105.         If @error > 0 Or Not IsArray($aFiles) Then
  106.                 MsgBox($MB_ICONERROR, "gmMontage", "No " & StringUpper(StringMid($sExt, 2)) & "s found")
  107.                 Return
  108.         EndIf
  109.         FileDelete($sTempFile)
  110.  
  111.         Local $iCount = UBound($aFiles)
  112.         If Mod($iCount, 2) = 1 Then
  113.                 If MsgBox($MB_OKCANCEL + $MB_ICONWARNING, "gmMontage", "Odd number of " & StringUpper(StringMid($sExt, 2)) & "s found," & @CRLF & "skipping last image.") = $IDCANCEL Then Return
  114.                 $iCount -= 1
  115.         EndIf
  116.  
  117.         Local $hFile = FileOpen($sOutfile, $FO_OVERWRITE)
  118.         For $i = 0 To $iCount - 1 Step 2
  119.                 Local $sOutname = StringLeft($aFiles[$i], StringLen($aFiles[$i]) - 4) & "+" & StringLeft($aFiles[$i + 1], StringLen($aFiles[$i + 1]) - 4) & ".png"
  120.                 Local $sBatch = "montage -tile " & $sGeometry & " -background " & $sColour & " -geometry " & $iWidth & "x" & $iHeight
  121.                 If $bTemp Then
  122.                         $sBatch &= "+" & $iSep & "+0 " & $aFiles[$i] & " " & $aFiles[$i + 1]
  123.                 Else
  124.                         $sBatch &= "+0+" & $iSep & " " & $aFiles[$i] & " " & $aFiles[$i + 1]
  125.                 EndIf
  126.                 If $bShave And $iSep > 0 Then
  127.                         If $bTemp Then
  128.                                 $sBatch &= " temp.bmp" & @CRLF & "convert -shave " & $iSep & "x0 temp.bmp " & $sOutname
  129.                         Else
  130.                                 $sBatch &= " temp.bmp" & @CRLF & "convert -shave 0x" & $iSep & " temp.bmp " & $sOutname
  131.                         EndIf
  132.                 Else
  133.                         $sBatch &= " " & $sOutname
  134.                 EndIf
  135.                 FileWriteLine($hFile, $sBatch)
  136.         Next
  137.         FileClose($hFile)
  138.         $hFile = FileOpen($sSrce & "gmMontage.cmd", $FO_OVERWRITE)
  139.         FileWriteLine($hFile, StringLeft($sSrce, 2) & @CRLF & "cd " & StringMid($sSrce, 3) & @CRLF & _
  140.                         "gm batch -echo on -feedback on " & $sOutfile & @CRLF & _
  141.                         "del temp.bmp")
  142.         FileClose($hFile)
  143.         MsgBox($MB_OK + $MB_ICONINFORMATION, "gmMontage", "GraphicsMagick batch file created." & @CRLF & @CRLF & _
  144.                         "Double-click on the file 'gmMontage.cmd' in the image folder.")
  145. EndFunc   ;==>_GenBatch
  146.  
  147.  
  148. Func _GetDim($sTemp, $i = True)
  149.         _GDIPlus_Startup()
  150.         Local $hImage = _GDIPlus_ImageLoadFromFile($sTemp)
  151.         If $i Then
  152.                 Return _GDIPlus_ImageGetWidth($hImage)
  153.         Else
  154.                 Return _GDIPlus_ImageGetHeight($hImage)
  155.         EndIf
  156.         _GDIPlus_ImageDispose($hImage)
  157.         _GDIPlus_Shutdown()
  158. EndFunc   ;==>_GetDim
  159.  
  160.  
  161. Func _Exit()
  162.         Exit
  163. EndFunc   ;==>_Exit
2410
General Software Discussion / Re: Windows 8 Pro
« Last post by 4wd on July 10, 2014, 11:50 AM »
Are we talking OEM or Retail?

OEM = No
Retail = Yes

See here.

If it's a clean install of 8.1 Pro RETAIL, then from point 4 onwards should work fine - I've done a clean install 8.1 Pro and activation using 8.0 Pro keys at least 3 times without a problem.
2411
Found Deals and Discounts / Re: free galileo board from MS
« Last post by 4wd on July 09, 2014, 03:32 AM »
It's sufficiently vague in what it says that I suspect no hardware is forthcoming, ie.

Pre-submit:

We’ll provide samples and documentation and we’ll show you how to create your own fun projects ...

This is in reference to the SDK/software.

Post-submit, the wording was along the lines of, (IIRC): "... we'll let you know when your kit has shipped ..."

Still sufficiently vague as it could be just a CD/DVD with requisite documentation/software.

Be that as it may, since I can't get the followup email maybe I'm just skeptical.  ;)
2412
Found Deals and Discounts / Re: free galileo board from MS
« Last post by 4wd on July 08, 2014, 09:00 AM »
Sweet Fanny Adamsw is the clean version, Sweet F*** All is the more generic term.
2413
Found Deals and Discounts / Re: free galileo board from MS
« Last post by 4wd on July 08, 2014, 04:54 AM »
Are they actually sending a board? All I see mentioned is an SDK. Is it just software for the board? :huh:

Also questioned in the OzB comments, nowhere did/does it say you receive any hardware.

And, while I thought I might sign up on the off chance ... two attempts, two different email addresses ... two lots of SFA in reply.
2414
Maybe overkill but when I have files/dirs I can't rename/delete due to weird characters, I usually boot into a Linux LiveCD and fix things.

One of the guys here could probably knock up a perl/bash script if you provide before/after examples of the names.
2415
Living Room / Re: Movies or films you've seen lately
« Last post by 4wd on July 07, 2014, 02:14 PM »
Repo Men always kind of reminded me of the earlier Race Against Time with Eric Roberts.

The switch being that when you don't pay your medical bills, they come after you for your organs.

RAT.jpg

When a man faces surmounting bills for his dying son's hospital stay, he enters into an agreement to sell his body for organ transplants to pay the bills. However, when he is advised that the doctors want to claim his organs immediately, he goes on the run.
2416
Can you change read/write permissions on the folders, or get your sysadmin to do it for you?  I'm wondering if it would help to partially invert the logic.  That is, force  all users to write into the top-level or another holding folder, by giving them write permissions to that one only, with read-only permissions to the alphabetized folders inside.  Then, keep running your script as before on a schedule or via File Notify.  That way, everyone only need remember a single target location, the only one they can write to anyway, and the script moves the files into their correct destinations automatically.

+1  Requires no simulated thought on the part of the users :)
2417
Forgot to change the copy to a move for your purposes, (used for testing).

You can also concat the second for and the if statements into one, saves doing the extra call.

ie.

Code: Text [Select]
  1. @echo off
  2. for /f "usebackq" %%a in (`dir /a-d-s-h-r-l /b d:\*.*`) do (call :extractChar %%a)
  3.  
  4. goto :END
  5.  
  6. :extractChar
  7. set test=%~1
  8. set char=%test:~0,1%
  9. for %%b in (0,1,2,3,4,5,6,7,8,9) do (if %%b == %char% set char=a)
  10. move "%~1" "output\%char%\%1"
  11. goto :EOF
  12.  
  13. :END

There's no need to use tr to change lower to uppercase, MS-DOS is case agnostic.  Just create the dirs first as upper or lower case ... or incorporate this to avoid extraneous programs.
2418
I'll leave it to you to work out what to do if the first character is a space :)

Code: Text [Select]
  1. @echo off
  2. for /f "usebackq" %%a in (`dir /a-d-s-h-r-l /b d:\*.*`) do (call :extractChar %%a)
  3.  
  4. goto :END
  5.  
  6. :extractChar
  7. set test=%~1
  8. set char=%test:~0,1%
  9. for %%b in (0,1,2,3,4,5,6,7,8,9) do (call :compRep %%b %char%)
  10. rem Throw a mkdir in here if you want to make the dirs on the fly
  11. copy "%~1" "output\%char%\%1"
  12. goto :EOF
  13.  
  14. :compRep
  15. if %1 == %2 set char=a
  16. goto :EOF
  17.  
  18. :END

Call it every x minutes using Task Scheduler or use something like FileNotify to detect file creation in the directory and then call it.
2419
As an example, the following worked fine for me, (Win8Pro x86):

sc failure browser actions=restart/60000/restart/60000/restart/60000 reset=86400

First, Second, and Subsequent actions Restart after 60 seconds, failure counter reset after 1 day for service Computer Browser (service name = browser).

Naturally, you need admin privileges.
2420
Living Room / Re: Movies or films you've seen lately
« Last post by 4wd on June 24, 2014, 01:20 PM »
The Host
 (see attachment in previous post)
At almost 2 hours long, it is long, but by no means drawn out. They use those 2 hours very well.

If you like sci-fi, chances are you'll love this.

Count me out, much prefer the Korean version: The Host

The stories are totally different - same title, but not the same story.

I did see the Korean one, but I didn't know that it was also put out in English.

Must remember to use more emoticons.

In order:
I know they're different, (only watched about 10 minutes of the one you mention before I gave up on it).
The Korean film doesn't come in English language, which would completely ruin it as has English dubs done to countless previous films.

:)
2421
Living Room / Re: Movies or films you've seen lately
« Last post by 4wd on June 23, 2014, 03:22 PM »
The Host
 (see attachment in previous post)
At almost 2 hours long, it is long, but by no means drawn out. They use those 2 hours very well.

If you like sci-fi, chances are you'll love this.

Count me out, much prefer the Korean version: The Host
2422
Yes! And I think one of the first worldwide TV broadcasts might have been the 1936 Summer Olympics in Nazi Germany.

I prefer to think of them watching more interesting things like Nosferatu, Frankenstein, Godzilla, etc.
2423
Living Room / Re: Interesting "stuff"
« Last post by 4wd on May 28, 2014, 03:53 PM »
And for the most part the snakes and spiders aren't great beach goers :Thmbsup: :Thmbsup:

I think the sharks would go on strike if the spiders/snakes started encroaching on their traditional territory.

it's all relative - I don't know how people live in a place where carrying personal weapons is an accepted norm

+1 Give me the excitement of a possible agonizing death by a black widow in your thunderbox over the boredom of being shot amongst the endless concrete/bitumen of "civilisation" any day.

:)
2424
Living Room / Re: Our experiences with LED light bulb replacements
« Last post by 4wd on May 18, 2014, 05:57 AM »
Replaced all the MR16/GU10 50W Halogens with LEDs, (3-4W), almost all others are CFL.  I don't think I've had to replace a CFL in the last 5-8 years, (they're all used in ventilated fittings that stay on for an hour or two at the least).

I only use LEDs or CFLs with a colour temperature that approximates daylight, (~5000K), as I find the yellowish/reddish hue of warm white annoying, (if I buy a "white" light, I want white dammit!!).

Apart from a driver failing in one of the LED GU10s, (which I replaced), they've been working for the last 4 years or so without problem.  All of the LEDs came from a generic Chinese goods online store, (cheaper than local prices), as either assembled or separate LED/driver/bodies.

I also installed a couple of 10W LED floodlights before leaving the country at the start of April, don't know if they're still working.
2425
That said you might look at something like Argon Switcher to set up a couple network profiles.

You can also use the Windows netsh command - set things up how you want, then 'netsh dump >worknet.cmd'

The resultant command file will allow you to restore the network configuration at any time.

Low-tech but it works.
Pages: prev1 ... 92 93 94 95 96 [97] 98 99 100 101 102 ... 225next